Whamcloud - gitweb
LU-17611 utils: fix wrong static declarations
authorMikhail Pershin <mpershin@whamcloud.com>
Fri, 29 Mar 2024 08:12:21 +0000 (01:12 -0700)
committerAndreas Dilger <adilger@whamcloud.com>
Sat, 30 Mar 2024 07:34:02 +0000 (07:34 +0000)
Revert wrong changes made to zfs mount utils

Lustre-change: https://review.whamcloud.com/54293
Lustre-commit: f45a0288b00597bc797963f7aa01cae5167b024e

Test-Parameters: trivial
Fixes: c7e9bdf8d4 ("LU-8191 utils: remove unused, fix non-static functions")
Signed-off-by: Mikhail Pershin <mpershin@whamcloud.com>
Change-Id: I162d349ebadbf93a89abf49bd41465979d561423
Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/54630
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
lustre/utils/libmount_utils_zfs.c

index 9b7f241..8067801 100644 (file)
@@ -423,7 +423,7 @@ static int osd_check_zfs_setup(void)
 }
 
 /* Write the server config as properties associated with the dataset */
-static int zfs_write_ldd(struct mkfs_opts *mop)
+int zfs_write_ldd(struct mkfs_opts *mop)
 {
        struct lustre_disk_data *ldd = &mop->mo_ldd;
        char *ds = mop->mo_device;
@@ -465,7 +465,7 @@ out:
 }
 
 /* Mark a property to be removed by the form of "key=" */
-static int zfs_erase_ldd(struct mkfs_opts *mop, char *param)
+int zfs_erase_ldd(struct mkfs_opts *mop, char *param)
 {
        char key[ZFS_MAXPROPLEN] = "";
 
@@ -556,7 +556,7 @@ static int zfs_get_prop_params(zfs_handle_t *zhp, char *param)
  * Read the server config as properties associated with the dataset.
  * Missing entries as not treated error and are simply skipped.
  */
-static int zfs_read_ldd(char *ds,  struct lustre_disk_data *ldd)
+int zfs_read_ldd(char *ds,  struct lustre_disk_data *ldd)
 {
        zfs_handle_t *zhp;
        struct zfs_ldd_prop_bridge *bridge;
@@ -607,7 +607,7 @@ out:
 }
 
 /* Print ldd params */
-static void zfs_print_ldd_params(struct mkfs_opts *mop)
+void zfs_print_ldd_params(struct mkfs_opts *mop)
 {
        char *from = mop->mo_ldd.ldd_params;
        char *to;
@@ -642,7 +642,7 @@ static void zfs_print_ldd_params(struct mkfs_opts *mop)
        }
 }
 
-static int zfs_is_lustre(char *ds, unsigned int *mount_type)
+int zfs_is_lustre(char *ds, unsigned int *mount_type)
 {
        struct lustre_disk_data tmp_ldd;
        int ret;
@@ -725,7 +725,7 @@ static int zfs_create_vdev(struct mkfs_opts *mop, char *vdev)
        return ret;
 }
 
-static int zfs_make_lustre(struct mkfs_opts *mop)
+int zfs_make_lustre(struct mkfs_opts *mop)
 {
        zfs_handle_t *zhp;
        zpool_handle_t *php;
@@ -912,13 +912,13 @@ out:
        return ret;
 }
 
-static int zfs_enable_quota(struct mkfs_opts *mop)
+int zfs_enable_quota(struct mkfs_opts *mop)
 {
        fprintf(stderr, "this option is not only valid for zfs\n");
        return ENOSYS;
 }
 
-static int zfs_prepare_lustre(struct mkfs_opts *mop,
+int zfs_prepare_lustre(struct mkfs_opts *mop,
                              char *wanted_mountopts, size_t len)
 {
        if (osd_check_zfs_setup() == 0)
@@ -940,7 +940,7 @@ static int zfs_prepare_lustre(struct mkfs_opts *mop,
        return 0;
 }
 
-static int zfs_tune_lustre(char *dev, struct mount_opts *mop)
+int zfs_tune_lustre(char *dev, struct mount_opts *mop)
 {
        if (osd_check_zfs_setup() == 0)
                return EINVAL;
@@ -948,7 +948,7 @@ static int zfs_tune_lustre(char *dev, struct mount_opts *mop)
        return 0;
 }
 
-static int zfs_label_lustre(struct mount_opts *mop)
+int zfs_label_lustre(struct mount_opts *mop)
 {
        zfs_handle_t *zhp;
        int ret;
@@ -966,7 +966,7 @@ static int zfs_label_lustre(struct mount_opts *mop)
        return ret;
 }
 
-static int zfs_rename_fsname(struct mkfs_opts *mop, const char *oldname)
+int zfs_rename_fsname(struct mkfs_opts *mop, const char *oldname)
 {
        struct mount_opts opts;
        char mntpt[] = "/tmp/mntXXXXXX";
@@ -1030,7 +1030,7 @@ out_rmdir:
        return ret;
 }
 
-static int zfs_init(void)
+int zfs_init(void)
 {
        int ret = 0;