diff options
author | Sage Weil <sage@newdream.net> | 2010-10-29 15:41:32 -0400 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2010-10-29 21:42:10 -0400 |
commit | 531cb13f1e417c060b54f979e1659ecd69bea650 (patch) | |
tree | 6b421ac1ddf7cad271cd0c767f0c19e6c4f826df /fs | |
parent | 72fd032e94240d001b1d22f2c1dfd2592b02e44e (diff) |
Btrfs: make SNAP_DESTROY async
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>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/btrfs/ioctl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index e8a26a3aac3e..fdd88f2f1ece 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c | |||
@@ -1351,7 +1351,7 @@ static noinline int btrfs_ioctl_snap_destroy(struct file *file, | |||
1351 | BUG_ON(ret); | 1351 | BUG_ON(ret); |
1352 | } | 1352 | } |
1353 | 1353 | ||
1354 | ret = btrfs_commit_transaction(trans, root); | 1354 | ret = btrfs_end_transaction(trans, root); |
1355 | BUG_ON(ret); | 1355 | BUG_ON(ret); |
1356 | inode->i_flags |= S_DEAD; | 1356 | inode->i_flags |= S_DEAD; |
1357 | out_up_write: | 1357 | out_up_write: |