4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 only,
8 * as published by the Free Software Foundation.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License version 2 for more details. A copy is
14 * included in the COPYING file that accompanied this code.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 * Copyright (c) 2012, 2017, Intel Corporation.
24 * Use is subject to license terms.
27 * Author: Brian Behlendorf <behlendorf1@llnl.gov>
29 #include "mount_utils.h"
34 #include <sys/systeminfo.h>
36 /* Persistent mount data is stored in these user attributes */
37 #define LDD_PREFIX "lustre:"
38 #define LDD_VERSION_PROP LDD_PREFIX "version"
39 #define LDD_FLAGS_PROP LDD_PREFIX "flags"
40 #define LDD_INDEX_PROP LDD_PREFIX "index"
41 #define LDD_FSNAME_PROP LDD_PREFIX "fsname"
42 #define LDD_SVNAME_PROP LDD_PREFIX "svname"
43 #define LDD_UUID_PROP LDD_PREFIX "uuid"
44 #define LDD_USERDATA_PROP LDD_PREFIX "userdata"
45 #define LDD_MOUNTOPTS_PROP LDD_PREFIX "mountopts"
47 /* This structure is used to help bridge the gap between the ZFS
48 * properties Lustre uses and their corresponding internal LDD fields.
49 * It is meant to be used internally by the mount utility only. */
50 struct zfs_ldd_prop_bridge {
51 /* Contains the publicly visible name for the property
52 * (i.e. what is shown when running "zfs get") */
54 /* Contains the offset into the lustre_disk_data structure where
55 * the value of this property is or will be stored. (i.e. the
56 * property is read from and written to this offset within ldd) */
58 /* Function pointer responsible for reading in the @prop
59 * property from @zhp and storing it in @ldd_field */
60 int (*zlpb_get_prop_fn)(zfs_handle_t *zhp, char *prop, void *ldd_field);
61 /* Function pointer responsible for writing the value of @ldd_field
62 * into the @prop dataset property in @zhp */
63 int (*zlpb_set_prop_fn)(zfs_handle_t *zhp, char *prop, void *ldd_field);
66 /* Forward declarations needed to initialize the ldd prop bridge list */
67 static int zfs_get_prop_int(zfs_handle_t *, char *, void *);
68 static int zfs_set_prop_int(zfs_handle_t *, char *, void *);
69 static int zfs_get_prop_str(zfs_handle_t *, char *, void *);
70 static int zfs_set_prop_str(zfs_handle_t *, char *, void *);
72 /* Helper for initializing the entries in the special_ldd_prop_params list.
73 * - @name: stored directly in the zlpb_prop_name field
74 * (e.g. lustre:fsname, lustre:version, etc.)
75 * - @field: the field in the lustre_disk_data which directly maps to
76 * the @name property. (e.g. ldd_fsname, ldd_config_ver, etc.)
77 * - @type: The type of @field. Only "int" and "str" are supported.
79 #define ZLB_INIT(name, field, type) \
81 .zlpb_prop_name = name, \
82 .zlpb_ldd_offset = offsetof(struct lustre_disk_data, field), \
83 .zlpb_get_prop_fn = zfs_get_prop_ ## type, \
84 .zlpb_set_prop_fn = zfs_set_prop_ ## type \
87 /* These ldd properties are special because they all have their own
88 * individual fields in the lustre_disk_data structure, as opposed to
89 * being globbed into the ldd_params field. As such, these need special
90 * handling when reading/writing the ldd structure to/from persistent
92 struct zfs_ldd_prop_bridge special_ldd_prop_params[] = {
93 ZLB_INIT(LDD_VERSION_PROP, ldd_config_ver, int),
94 ZLB_INIT(LDD_FLAGS_PROP, ldd_flags, int),
95 ZLB_INIT(LDD_INDEX_PROP, ldd_svindex, int),
96 ZLB_INIT(LDD_FSNAME_PROP, ldd_fsname, str),
97 ZLB_INIT(LDD_SVNAME_PROP, ldd_svname, str),
98 ZLB_INIT(LDD_UUID_PROP, ldd_uuid, str),
99 ZLB_INIT(LDD_USERDATA_PROP, ldd_userdata, str),
100 ZLB_INIT(LDD_MOUNTOPTS_PROP, ldd_mount_opts, str),
104 /* indicate if the ZFS OSD has been successfully setup */
105 static int osd_zfs_setup = 0;
107 static libzfs_handle_t *g_zfs;
111 static int zfs_set_prop_int(zfs_handle_t *zhp, char *prop, void *val)
116 (void) snprintf(str, sizeof (str), "%i", *(int *)val);
117 vprint(" %s=%s\n", prop, str);
118 ret = zfs_prop_set(zhp, prop, str);
124 * Write the zfs property string, note that properties with a NULL or
125 * zero-length value will not be written and 0 returned.
127 static int zfs_set_prop_str(zfs_handle_t *zhp, char *prop, void *val)
131 if (val && strlen(val) > 0) {
132 vprint(" %s=%s\n", prop, (char *)val);
133 ret = zfs_prop_set(zhp, prop, (char *)val);
140 * Remove a property from zfs property dataset
142 static int zfs_remove_prop(zfs_handle_t *zhp, nvlist_t *nvl, char *propname)
144 nvlist_remove_all(nvl, propname);
145 /* XXX: please replace zfs_prop_inherit() if there is a better function
146 * to call zfs_ioctl() to update data on-disk.
148 return zfs_prop_inherit(zhp, propname, false);
151 static int zfs_erase_prop(zfs_handle_t *zhp, char *param)
154 char propname[ZFS_MAXPROPLEN];
155 int len = strlen(param) + strlen(LDD_PREFIX);
157 if (len > ZFS_MAXPROPLEN) {
158 fprintf(stderr, "%s: zfs prop to erase is too long-\n%s\n",
163 nvl = zfs_get_user_props(zhp);
167 snprintf(propname, len + 1, "%s%s", LDD_PREFIX, param);
168 return zfs_remove_prop(zhp, nvl, propname);
171 static int zfs_is_special_ldd_prop_param(char *name)
175 for (i = 0; special_ldd_prop_params[i].zlpb_prop_name != NULL; i++)
176 if (!strcmp(name, special_ldd_prop_params[i].zlpb_prop_name))
182 static int zfs_erase_allprops(zfs_handle_t *zhp)
186 size_t str_size = 1024 * 1024;
190 strs = malloc(str_size);
195 props = zfs_get_user_props(zhp);
201 while (nvp = nvlist_next_nvpair(props, nvp), nvp) {
202 if (strncmp(nvpair_name(nvp), LDD_PREFIX, strlen(LDD_PREFIX)))
205 if (zfs_is_special_ldd_prop_param(nvpair_name(nvp)))
208 rc = snprintf(cur, str_size - (cur - strs), "%s",
210 if (rc != strlen(nvpair_name(nvp))) {
211 fprintf(stderr, "%s: zfs has too many properties to erase, please repeat\n",
216 cur += strlen(cur) + 1;
219 while ( cur < (strs + str_size) && strlen(cur) > 0) {
220 zfs_prop_inherit(zhp, cur, false);
221 cur += strlen(cur) + 1;
229 * Map '<key>=<value> ...' pairs in the passed string to dataset properties
230 * of the form 'lustre:<key>=<value>'. "<key>=" means to remove this key
233 static int zfs_set_prop_params(zfs_handle_t *zhp, char *params)
235 char *params_dup, *token, *key, *value;
236 char *save_token = NULL;
237 char propname[ZFS_MAXPROPLEN];
240 params_dup = strdup(params);
241 if (params_dup == NULL)
244 token = strtok_r(params_dup, " ", &save_token);
246 key = strtok(token, "=");
250 value = strtok(NULL, "=");
252 /* remove this prop when its value is null */
253 ret = zfs_erase_prop(zhp, key);
257 snprintf(propname, strlen(LDD_PREFIX) + strlen(key) + 1,
258 "%s%s", LDD_PREFIX, key);
259 vprint(" %s=%s\n", propname, value);
261 ret = zfs_prop_set(zhp, propname, value);
266 token = strtok_r(NULL, " ", &save_token);
274 static int zfs_check_hostid(struct mkfs_opts *mop)
276 unsigned long hostid;
278 if (strstr(mop->mo_ldd.ldd_params, PARAM_FAILNODE) == NULL)
281 hostid = get_system_hostid();
283 if (mop->mo_flags & MO_NOHOSTID_CHECK) {
284 fprintf(stderr, "WARNING: spl_hostid not set. ZFS has "
285 "no zpool import protection\n");
288 fprintf(stderr, "spl_hostid not set. See %s(8)",
297 static int osd_check_zfs_setup(void)
299 if (osd_zfs_setup == 0) {
302 fprintf(stderr, "Failed to initialize ZFS library. Are the ZFS "
303 "packages and modules correctly installed?\n");
305 return osd_zfs_setup == 1;
308 /* Write the server config as properties associated with the dataset */
309 int zfs_write_ldd(struct mkfs_opts *mop)
311 struct lustre_disk_data *ldd = &mop->mo_ldd;
312 char *ds = mop->mo_device;
314 struct zfs_ldd_prop_bridge *bridge;
317 if (osd_check_zfs_setup() == 0)
320 zhp = zfs_open(g_zfs, ds, ZFS_TYPE_FILESYSTEM);
322 fprintf(stderr, "Failed to open zfs dataset %s\n", ds);
326 ret = zfs_check_hostid(mop);
330 vprint("Writing %s properties\n", ds);
332 if (mop->mo_flags & MO_ERASE_ALL) {
333 ret = zfs_erase_allprops(zhp);
335 fprintf(stderr, "zfs_erase_allprops Failed: %d\n", ret);
339 ret = zfs_set_prop_params(zhp, ldd->ldd_params);
341 for (i = 0; special_ldd_prop_params[i].zlpb_prop_name != NULL; i++) {
342 bridge = &special_ldd_prop_params[i];
343 ret = bridge->zlpb_set_prop_fn(zhp, bridge->zlpb_prop_name,
344 (void *)ldd + bridge->zlpb_ldd_offset);
355 /* Mark a property to be removed by the form of "key=" */
356 int zfs_erase_ldd(struct mkfs_opts *mop, char *param)
358 char key[ZFS_MAXPROPLEN] = "";
360 if (strlen(LDD_PREFIX) + strlen(param) > ZFS_MAXPROPLEN) {
361 fprintf(stderr, "%s: zfs prop to erase is too long-\n%s\n",
365 snprintf(key, strlen(param) + 2, "%s=", param);
366 return add_param(mop->mo_ldd.ldd_params, key, "");
369 static int zfs_get_prop_int(zfs_handle_t *zhp, char *prop, void *val)
375 ret = nvlist_lookup_nvlist(zfs_get_user_props(zhp), prop, &propval);
379 ret = nvlist_lookup_string(propval, ZPROP_VALUE, &propstr);
384 *(__u32 *)val = strtoul(propstr, NULL, 10);
391 static int zfs_get_prop_str(zfs_handle_t *zhp, char *prop, void *val)
397 ret = nvlist_lookup_nvlist(zfs_get_user_props(zhp), prop, &propval);
401 ret = nvlist_lookup_string(propval, ZPROP_VALUE, &propstr);
405 (void) strcpy(val, propstr);
410 static int zfs_get_prop_params(zfs_handle_t *zhp, char *param)
414 char key[ZFS_MAXPROPLEN] = "";
415 char value[PARAM_MAX] = "";
418 props = zfs_get_user_props(zhp);
423 while (nvp = nvlist_next_nvpair(props, nvp), nvp) {
424 ret = zfs_get_prop_str(zhp, nvpair_name(nvp), value);
428 if (strncmp(nvpair_name(nvp), LDD_PREFIX, strlen(LDD_PREFIX)))
431 if (zfs_is_special_ldd_prop_param(nvpair_name(nvp)))
434 sprintf(key, "%s=", nvpair_name(nvp) + strlen(LDD_PREFIX));
435 ret = add_param(param, key, value);
444 * Read the server config as properties associated with the dataset.
445 * Missing entries as not treated error and are simply skipped.
447 int zfs_read_ldd(char *ds, struct lustre_disk_data *ldd)
450 struct zfs_ldd_prop_bridge *bridge;
453 if (osd_check_zfs_setup() == 0)
456 zhp = zfs_open(g_zfs, ds, ZFS_TYPE_FILESYSTEM);
458 zhp = zfs_open(g_zfs, ds, ZFS_TYPE_SNAPSHOT);
463 for (i = 0; special_ldd_prop_params[i].zlpb_prop_name != NULL; i++) {
464 bridge = &special_ldd_prop_params[i];
465 ret = bridge->zlpb_get_prop_fn(zhp, bridge->zlpb_prop_name,
466 (void *)ldd + bridge->zlpb_ldd_offset);
467 if (ret && (ret != ENOENT))
471 ret = zfs_get_prop_params(zhp, ldd->ldd_params);
472 if (ret && (ret != ENOENT))
475 ldd->ldd_mount_type = LDD_MT_ZFS;
478 if (strstr(ldd->ldd_params, PARAM_FAILNODE) != NULL) {
479 zpool_handle_t *pool = zfs_get_pool_handle(zhp);
480 uint64_t mh = zpool_get_prop_int(pool, ZPOOL_PROP_MULTIHOST,
483 fprintf(stderr, "%s: %s is configured for failover "
484 "but zpool does not have multihost enabled\n",
495 /* Print ldd params */
496 void zfs_print_ldd_params(struct mkfs_opts *mop)
498 char *from = mop->mo_ldd.ldd_params;
502 vprint("Parameters:");
504 /* skip those keys to be removed in the form of "key=" */
505 to = strstr(from, "= ");
507 /* "key=" may be in the end */
508 if (*(from + strlen(from) - 1) == '=')
509 to = from + strlen(from) - 1;
511 /* find " " inward */
514 len = strlen(from) - strlen(to);
515 while ((*(from + len) != ' ') && len)
519 /* no space in the end */
520 vprint("%*.*s", len, len, from);
522 /* If there is no "key=" or "key=" is in the end, stop. */
523 if (!to || strlen(to) == 1)
531 int zfs_is_lustre(char *ds, unsigned *mount_type)
533 struct lustre_disk_data tmp_ldd;
536 if (osd_zfs_setup == 0)
539 ret = zfs_read_ldd(ds, &tmp_ldd);
540 if ((ret == 0) && (tmp_ldd.ldd_config_ver > 0) &&
541 (strlen(tmp_ldd.ldd_svname) > 0)) {
542 *mount_type = tmp_ldd.ldd_mount_type;
549 static char *zfs_mkfs_opts(struct mkfs_opts *mop, char *str, int len)
553 if (strlen(mop->mo_mkfsopts) != 0)
554 snprintf(str, len, " -o %s", mop->mo_mkfsopts);
555 if (mop->mo_device_kb)
556 snprintf(str, len, " -o quota=%llu",
557 (unsigned long long)mop->mo_device_kb * 1024);
562 static int zfs_create_vdev(struct mkfs_opts *mop, char *vdev)
566 /* Silently ignore reserved vdev names */
567 if ((strncmp(vdev, "disk", 4) == 0) ||
568 (strncmp(vdev, "file", 4) == 0) ||
569 (strncmp(vdev, "mirror", 6) == 0) ||
570 (strncmp(vdev, "raidz", 5) == 0) ||
571 (strncmp(vdev, "spare", 5) == 0) ||
572 (strncmp(vdev, "log", 3) == 0) ||
573 (strncmp(vdev, "cache", 5) == 0))
577 * Verify a file exists at the provided absolute path. If it doesn't
578 * and mo_device_kb is set attempt to create a file vdev to be used.
579 * Relative paths will be passed directly to 'zpool create' which
580 * will check multiple multiple locations under /dev/.
582 if (vdev[0] == '/') {
583 ret = access(vdev, F_OK);
590 fprintf(stderr, "Unable to access required vdev "
591 "for pool %s (%d)\n", vdev, ret);
595 if (mop->mo_device_kb == 0) {
597 fprintf(stderr, "Unable to create vdev due to "
598 "missing --device-size=#N(KB) parameter\n");
602 ret = file_create(vdev, mop->mo_device_kb);
605 fprintf(stderr, "Unable to create vdev %s (%d)\n",
614 int zfs_make_lustre(struct mkfs_opts *mop)
619 char *mkfs_cmd = NULL;
620 char *mkfs_tmp = NULL;
621 char *ds = mop->mo_device;
622 int pool_exists = 0, ret;
624 if (osd_check_zfs_setup() == 0)
627 /* no automatic index with zfs backend */
628 if (mop->mo_ldd.ldd_flags & LDD_F_NEED_INDEX) {
630 fprintf(stderr, "The target index must be specified with "
635 ret = zfs_check_hostid(mop);
643 mkfs_cmd = malloc(PATH_MAX);
644 if (mkfs_cmd == NULL) {
649 mkfs_tmp = malloc(PATH_MAX);
650 if (mkfs_tmp == NULL) {
655 /* Due to zfs_prepare_lustre() check the '/' must exist */
656 strchr(pool, '/')[0] = '\0';
658 /* If --reformat was given attempt to destroy the previous dataset */
659 if ((mop->mo_flags & MO_FORCEFORMAT) &&
660 ((zhp = zfs_open(g_zfs, ds, ZFS_TYPE_FILESYSTEM)) != NULL)) {
662 ret = zfs_destroy(zhp, 0);
665 fprintf(stderr, "Failed destroy zfs dataset %s (%d)\n",
674 * Create the zpool if the vdevs have been specified and the pool
675 * does not already exists. The pool creation itself will be done
676 * with the zpool command rather than the zpool_create() library call
677 * so the existing zpool error handling can be leveraged.
679 php = zpool_open(g_zfs, pool);
682 zpool_set_prop(php, "canmount", "off");
686 if ((mop->mo_pool_vdevs != NULL) && (pool_exists == 0)) {
688 memset(mkfs_cmd, 0, PATH_MAX);
689 snprintf(mkfs_cmd, PATH_MAX,
690 "zpool create -f -O canmount=off %s", pool);
692 /* Append the vdev config and create file vdevs as required */
693 while (*mop->mo_pool_vdevs != NULL) {
694 strscat(mkfs_cmd, " ", PATH_MAX);
695 strscat(mkfs_cmd, *mop->mo_pool_vdevs, PATH_MAX);
697 ret = zfs_create_vdev(mop, *mop->mo_pool_vdevs);
701 mop->mo_pool_vdevs++;
704 vprint("mkfs_cmd = %s\n", mkfs_cmd);
705 ret = run_command(mkfs_cmd, PATH_MAX);
708 fprintf(stderr, "Unable to create pool %s (%d)\n",
715 * Set Options on ZPOOL
717 * ALL - canmount=off (set above)
718 * 0.7.0 - multihost=on
719 * 0.7.0 - feature@userobj_accounting=enabled
721 php = zpool_open(g_zfs, pool);
723 zpool_set_prop(php, "multihost", "on");
724 zpool_set_prop(php, "feature@userobj_accounting", "enabled");
729 * Create the ZFS filesystem with any required mkfs options:
730 * - canmount=off is set to prevent zfs automounting
732 memset(mkfs_cmd, 0, PATH_MAX);
733 snprintf(mkfs_cmd, PATH_MAX,
734 "zfs create -o canmount=off %s %s",
735 zfs_mkfs_opts(mop, mkfs_tmp, PATH_MAX), ds);
737 vprint("mkfs_cmd = %s\n", mkfs_cmd);
738 ret = run_command(mkfs_cmd, PATH_MAX);
741 fprintf(stderr, "Unable to create filesystem %s (%d)\n",
747 * Attempt to set dataset properties to reasonable defaults
748 * to optimize performance, unless the values were specified
749 * at the mkfs command line. Some ZFS pools or ZFS versions
750 * do not support these properties. We can safely ignore the
751 * errors and continue in those cases.
753 * zfs 0.6.1 - system attribute based xattrs
754 * zfs 0.6.5 - large block support
755 * zfs 0.7.0 - large dnode support
757 * Check if zhp is NULL as a defensive measure. Any dataset
758 * validation errors that would cause zfs_open() to fail
759 * should have been caught earlier.
761 zhp = zfs_open(g_zfs, ds, ZFS_TYPE_FILESYSTEM);
763 /* zfs 0.6.1 - system attribute based xattrs */
764 if (!strstr(mop->mo_mkfsopts, "xattr="))
765 zfs_set_prop_str(zhp, "xattr", "sa");
767 /* zfs 0.7.0 - large dnode support */
768 if (!strstr(mop->mo_mkfsopts, "dnodesize=") &&
769 !strstr(mop->mo_mkfsopts, "dnsize="))
770 zfs_set_prop_str(zhp, "dnodesize", "auto");
772 if (IS_OST(&mop->mo_ldd)) {
773 /* zfs 0.6.5 - large block support */
774 if (!strstr(mop->mo_mkfsopts, "recordsize=") &&
775 !strstr(mop->mo_mkfsopts, "recsize="))
776 zfs_set_prop_str(zhp, "recordsize", "1M");
786 if (mkfs_cmd != NULL)
789 if (mkfs_tmp != NULL)
795 int zfs_enable_quota(struct mkfs_opts *mop)
797 fprintf(stderr, "this option is not only valid for zfs\n");
801 int zfs_prepare_lustre(struct mkfs_opts *mop,
802 char *wanted_mountopts, size_t len)
804 if (osd_check_zfs_setup() == 0)
807 if (zfs_name_valid(mop->mo_device, ZFS_TYPE_FILESYSTEM) == 0) {
809 fprintf(stderr, "Invalid filesystem name %s\n", mop->mo_device);
813 if (strchr(mop->mo_device, '/') == NULL) {
815 fprintf(stderr, "Missing pool in filesystem name %s\n",
823 int zfs_tune_lustre(char *dev, struct mount_opts *mop)
825 if (osd_check_zfs_setup() == 0)
831 int zfs_label_lustre(struct mount_opts *mop)
836 if (osd_check_zfs_setup() == 0)
839 zhp = zfs_open(g_zfs, mop->mo_source, ZFS_TYPE_FILESYSTEM);
843 ret = zfs_set_prop_str(zhp, LDD_SVNAME_PROP, mop->mo_ldd.ldd_svname);
849 int zfs_rename_fsname(struct mkfs_opts *mop, const char *oldname)
851 struct mount_opts opts;
852 char mntpt[] = "/tmp/mntXXXXXX";
856 /* Change the filesystem label. */
857 opts.mo_ldd = mop->mo_ldd;
858 opts.mo_source = mop->mo_device;
859 ret = zfs_label_lustre(&opts);
863 fprintf(stderr, "Can't change filesystem label: %s\n",
868 /* Mount this device temporarily in order to write these files */
869 if (mkdtemp(mntpt) == NULL) {
872 fprintf(stderr, "Can't create temp mount point %s: %s\n",
873 mntpt, strerror(ret));
877 cmd_buf = malloc(PATH_MAX);
883 memset(cmd_buf, 0, PATH_MAX);
884 snprintf(cmd_buf, PATH_MAX - 1, "zfs set mountpoint=%s %s && "
885 "zfs set canmount=on %s && zfs mount %s",
886 mntpt, mop->mo_device, mop->mo_device, mop->mo_device);
887 ret = run_command(cmd_buf, PATH_MAX);
891 fprintf(stderr, "Unable to mount %s (%s)\n",
892 mop->mo_device, strerror(ret));
894 fprintf(stderr, "Is the %s module available?\n",
895 MT_STR(&mop->mo_ldd));
899 ret = lustre_rename_fsname(mop, mntpt, oldname);
900 memset(cmd_buf, 0, PATH_MAX);
901 snprintf(cmd_buf, PATH_MAX - 1, "zfs umount %s && "
902 "zfs set canmount=off %s && zfs set mountpoint=none %s",
903 mop->mo_device, mop->mo_device, mop->mo_device);
904 run_command(cmd_buf, PATH_MAX);
917 g_zfs = libzfs_init();
920 /* Try to load zfs.ko and retry libzfs_init() */
922 ret = system("/sbin/modprobe -q zfs");
925 g_zfs = libzfs_init();
934 fprintf(stderr, "Failed to initialize ZFS library: %d\n", ret);
949 struct module_backfs_ops zfs_ops = {
952 .read_ldd = zfs_read_ldd,
953 .write_ldd = zfs_write_ldd,
954 .erase_ldd = zfs_erase_ldd,
955 .print_ldd_params = zfs_print_ldd_params,
956 .is_lustre = zfs_is_lustre,
957 .make_lustre = zfs_make_lustre,
958 .prepare_lustre = zfs_prepare_lustre,
959 .tune_lustre = zfs_tune_lustre,
960 .label_lustre = zfs_label_lustre,
961 .enable_quota = zfs_enable_quota,
962 .rename_fsname = zfs_rename_fsname,
964 #endif /* PLUGIN_DIR */