aboutsummaryrefslogtreecommitdiffstats
path: root/module/zfs/dsl_dataset.c
diff options
context:
space:
mode:
authorAndriy Gapon <[email protected]>2022-09-02 23:31:19 +0300
committerGitHub <[email protected]>2022-09-02 13:31:19 -0700
commitee9f3bca5574192589d7c7734fdc81b361aa77db (patch)
treec0e9bbb8314b9188bca19858ec3973f112a9b02c /module/zfs/dsl_dataset.c
parent7bb707ffafbea79c5b2f9ea24959825a3c4b8802 (diff)
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 <[email protected]> Reviewed-by: George Melikov <[email protected]> Signed-off-by: Andriy Gapon <[email protected]> Closes #13802
Diffstat (limited to 'module/zfs/dsl_dataset.c')
-rw-r--r--module/zfs/dsl_dataset.c12
1 files changed, 2 insertions, 10 deletions
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;