[lustre-devel] [PATCH 28/37] lustre: remove scope and source from class_incref and class_decref.

Andreas Dilger adilger at whamcloud.com
Tue Feb 26 22:52:17 PST 2019


On Feb 18, 2019, at 17:09, NeilBrown <neilb at suse.com> wrote:
> 
> These arguments are no longer used, so we can discard them.
> 
> Signed-off-by: NeilBrown <neilb at suse.com>

Well, they are no longer used, because you've removed the users.

> -struct obd_device *class_incref(struct obd_device *obd,
> -				const char *scope, const void *source)
> +struct obd_device *class_incref(struct obd_device *obd)
> {
> 	atomic_inc(&obd->obd_refcount);
> 	CDEBUG(D_INFO, "incref %s (%p) now %d\n", obd->obd_name, obd,
> @@ -528,12 +527,12 @@ struct obd_device *class_incref(struct obd_device *obd,
> }
> EXPORT_SYMBOL(class_incref);
> 
> -void class_decref(struct obd_device *obd, const char *scope, const void *source)
> +void class_decref(struct obd_device *obd)
> {
> 	int last;
> 
> -	CDEBUG(D_INFO, "Decref %s (%p) now %d - %s\n", obd->obd_name, obd,
> -	       atomic_read(&obd->obd_refcount), scope);
> +	CDEBUG(D_INFO, "Decref %s (%p) now %d\n", obd->obd_name, obd,
> +	       atomic_read(&obd->obd_refcount));

In particular, the scope (object type) is printed, which allows debugging the
generic incref/decref of these objects (similar to class_get_export() and
class_put_export() as mentioned in my other email).  If we at least can keep
the scope and source, then these generic refcount functions could still be used
for debugging.

Cheers, Andreas
---
Andreas Dilger
Principal Lustre Architect
Whamcloud









More information about the lustre-devel mailing list