Whamcloud - gitweb
LU-8386 zfs: Use ZFS_MAXPROPLEN instead of ZFS_MAXNAMELEN 51/21251/2
authorChristopher J. Morrone <morrone2@llnl.gov>
Mon, 11 Jul 2016 23:10:29 +0000 (16:10 -0700)
committerOleg Drokin <oleg.drokin@intel.com>
Wed, 20 Jul 2016 17:42:35 +0000 (17:42 +0000)
ZFS_MAXNAMELEN was removed on zfs's master branch.  We
substitue ZFS_MAXPROPLEN in its place.  We only used this
macro in the get and set zfs property functions, so this
should be a reasonable exchange.

ZFS_MAXPROPLEN has also been around for a long time, so there
is no need to extra logic to make lustre lustre backwards
compatible with older ZFS releases.

Change-Id: I7292194f1a4e0311477954f7f83a3c353e785ac8
Test-Parameters: trivial
Signed-off-by: Christopher J. Morrone <morrone2@llnl.gov>
Reviewed-on: http://review.whamcloud.com/21251
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
lustre/utils/mount_utils_zfs.c

index 60d5552..592f18d 100644 (file)
@@ -142,7 +142,7 @@ static int zfs_set_prop_params(zfs_handle_t *zhp, char *params)
 {
        char *params_dup, *token, *key, *value;
        char *save_token = NULL;
-       char prop_name[ZFS_MAXNAMELEN];
+       char prop_name[ZFS_MAXPROPLEN];
        int ret = 0;
 
        params_dup = strdup(params);
@@ -320,7 +320,7 @@ static int zfs_get_prop_params(zfs_handle_t *zhp, char *param, int len)
 {
        nvlist_t *props;
        nvpair_t *nvp;
-       char key[ZFS_MAXNAMELEN];
+       char key[ZFS_MAXPROPLEN];
        char *value;
        int ret = 0;