mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 18:40:43 +03:00
Allow rewrite skip cloned and snapshotted blocks
Rewrite of cloned and snapshotted blocks can allocate additional space, that may be undesired. In some cases it may have sense to still rewrite snapshotted blocks, expecting the snapshots to rotate with time, freeing space. In other cases rewrite of cloned blocks may be acceptable, despite persistent space usage increase. For this reason add them as separate flags to `zfs rewrite`. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Rob Norris <robn@despairlabs.com> Reviewed-by: Ameer Hamza <ahamza@ixsystems.com> Signed-off-by: Alexander Motin <alexander.motin@TrueNAS.com> Closes #18179
This commit is contained in:
@@ -1638,7 +1638,9 @@ typedef struct zfs_rewrite_args {
|
||||
} zfs_rewrite_args_t;
|
||||
|
||||
/* zfs_rewrite_args flags */
|
||||
#define ZFS_REWRITE_PHYSICAL 0x1 /* Preserve logical birth time. */
|
||||
#define ZFS_REWRITE_PHYSICAL 0x1 /* Preserve logical birth time. */
|
||||
#define ZFS_REWRITE_SKIP_SNAPSHOT 0x2 /* Skip snapshot-shared blocks. */
|
||||
#define ZFS_REWRITE_SKIP_BRT 0x4 /* Skip BRT-cloned blocks. */
|
||||
|
||||
#define ZFS_IOC_REWRITE _IOW(0x83, 3, zfs_rewrite_args_t)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user