From ee9f3bca5574192589d7c7734fdc81b361aa77db Mon Sep 17 00:00:00 2001 From: Andriy Gapon Date: Fri, 2 Sep 2022 23:31:19 +0300 Subject: Add zfs.sync.snapshot_rename Only the single snapshot rename is provided. The recursive or more complex rename can be scripted. Reviewed-by: Brian Behlendorf Reviewed-by: George Melikov Signed-off-by: Andriy Gapon Closes #13802 --- module/zfs/dsl_dataset.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'module/zfs/dsl_dataset.c') diff --git a/module/zfs/dsl_dataset.c b/module/zfs/dsl_dataset.c index 8f3240a5d..44da6a3f0 100644 --- a/module/zfs/dsl_dataset.c +++ b/module/zfs/dsl_dataset.c @@ -2915,14 +2915,6 @@ dsl_dataset_modified_since_snap(dsl_dataset_t *ds, dsl_dataset_t *snap) return (B_FALSE); } -typedef struct dsl_dataset_rename_snapshot_arg { - const char *ddrsa_fsname; - const char *ddrsa_oldsnapname; - const char *ddrsa_newsnapname; - boolean_t ddrsa_recursive; - dmu_tx_t *ddrsa_tx; -} dsl_dataset_rename_snapshot_arg_t; - static int dsl_dataset_rename_snapshot_check_impl(dsl_pool_t *dp, dsl_dataset_t *hds, void *arg) @@ -2953,7 +2945,7 @@ dsl_dataset_rename_snapshot_check_impl(dsl_pool_t *dp, return (error); } -static int +int dsl_dataset_rename_snapshot_check(void *arg, dmu_tx_t *tx) { dsl_dataset_rename_snapshot_arg_t *ddrsa = arg; @@ -3015,7 +3007,7 @@ dsl_dataset_rename_snapshot_sync_impl(dsl_pool_t *dp, return (0); } -static void +void dsl_dataset_rename_snapshot_sync(void *arg, dmu_tx_t *tx) { dsl_dataset_rename_snapshot_arg_t *ddrsa = arg; -- cgit v1.2.3