Skip to content

Commit

Permalink
Btrfs: make SNAP_DESTROY async
Browse files Browse the repository at this point in the history
There is no reason to force an immediate commit when deleting a snapshot.
Users have some expectation that space from a deleted snapshot be freed
immediately, but even if we do commit the reclaim is a background process.

If users _do_ want the deletion to be durable, they can call 'sync'.

Signed-off-by: Sage Weil <sage@newdream.net>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
  • Loading branch information
Sage Weil authored and Chris Mason committed Oct 30, 2010
1 parent 72fd032 commit 531cb13
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/btrfs/ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1351,7 +1351,7 @@ static noinline int btrfs_ioctl_snap_destroy(struct file *file,
BUG_ON(ret);
}

ret = btrfs_commit_transaction(trans, root);
ret = btrfs_end_transaction(trans, root);
BUG_ON(ret);
inode->i_flags |= S_DEAD;
out_up_write:
Expand Down

0 comments on commit 531cb13

Please sign in to comment.