diff --git a/include/sys/refcount.h b/include/sys/refcount.h index 3f50cddb6f51..e83ef42289f0 100644 --- a/include/sys/refcount.h +++ b/include/sys/refcount.h @@ -49,6 +49,39 @@ typedef struct reference { uint8_t *ref_removed; } reference_t; +/* + * Starting with 4.11, the linux kernel defines a refcount_t type of its + * own. This macro effectively renames the refcount_t type defined within + * zfs so that it does not conflict, without requiring that the name of the + * type be changed within the ZFS code. It also renames the functions + * that operate on the type as some of their names likely also conflict, and + * doing this for all cases makes it clearer to anyone changing the interface + * in the future. + */ + +#define refcount_t zfs_refcount_t + +#define refcount_add zfs_refcount_add +#define refcount_add_many zfs_refcount_add_many +#define refcount_count zfs_refcount_count +#define refcount_create zfs_refcount_create +#define refcount_create_tracked zfs_refcount_create_tracked +#define refcount_create_untracked zfs_refcount_create_untracked +#define refcount_destroy zfs_refcount_destroy +#define refcount_destroy_many zfs_refcount_destroy_many +#define refcount_fini zfs_refcount_fini +#define refcount_held zfs_refcount_held +#define refcount_init zfs_refcount_init +#define refcount_is_zero zfs_refcount_is_zero +#define refcount_not_held zfs_refcount_not_held +#define refcount_remove zfs_refcount_remove +#define refcount_remove_many zfs_refcount_remove_many +#define refcount_transfer zfs_refcount_transfer +#define refcount_transfer_ownership zfs_refcount_transfer_ownership + +/* + * end linux 4.11 compat + */ typedef struct refcount { kmutex_t rc_mtx; boolean_t rc_tracked; diff --git a/man/man8/zdb.8 b/man/man8/zdb.8 index 02137e97faa5..10833e4c683e 100644 --- a/man/man8/zdb.8 +++ b/man/man8/zdb.8 @@ -178,7 +178,8 @@ transaction type. .sp .6 .RS 4n Read the vdev labels from the specified device. \fBzdb -l\fR will return 0 if -valid label was found, 1 if error occured, and 2 if no valid labels were found. +valid configuration nvlist was found, 1 if error occured, and 2 if no valid +labels were found. .P If the \fB-u\fR option is also specified, also display the uberblocks on this device.