From: Mikhail Pershin Date: Wed, 6 Mar 2024 09:12:33 +0000 (+0300) Subject: LU-17611 utils: fix wrong static declarations X-Git-Tag: 2.15.62~133 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=f45a0288b00597bc797963f7aa01cae5167b024e;p=fs%2Flustre-release.git LU-17611 utils: fix wrong static declarations Revert wrong changes made to zfs mount utils Fixes: c7e9bdf8d4 ("LU-8191 utils: remove unused, fix non-static functions") Signed-off-by: Mikhail Pershin Change-Id: I162d349ebadbf93a89abf49bd41465979d561423 Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54293 Tested-by: jenkins Reviewed-by: Timothy Day Reviewed-by: Sebastien Buisson Reviewed-by: Andreas Dilger Reviewed-by: Oleg Drokin --- diff --git a/lustre/utils/libmount_utils_zfs.c b/lustre/utils/libmount_utils_zfs.c index f47568d..f6eb764 100644 --- a/lustre/utils/libmount_utils_zfs.c +++ b/lustre/utils/libmount_utils_zfs.c @@ -320,7 +320,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; @@ -367,7 +367,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] = ""; @@ -470,7 +470,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; @@ -519,7 +519,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; @@ -554,7 +554,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; @@ -637,7 +637,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; @@ -818,13 +818,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) @@ -846,7 +846,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; @@ -854,7 +854,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; @@ -872,7 +872,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"; @@ -936,7 +936,7 @@ out_rmdir: return ret; } -static int zfs_init(void) +int zfs_init(void) { int ret = 0;