aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/ctree.h
diff options
context:
space:
mode:
authorLi Dongyang <lidongyang@novell.com>2011-03-24 10:24:27 +0000
committerroot <Chris Mason chris.mason@oracle.com>2011-03-28 05:37:46 -0400
commit5378e60734f5b7bfe1b43dc191aaf6131c1befe7 (patch)
treeb02c78e744a2a148b60a9c8046abef3f4381f544 /fs/btrfs/ctree.h
parentfce3bb9a1bd492793170e117c60d5718b7896af4 (diff)
downloadkernel_samsung_smdk4412-5378e60734f5b7bfe1b43dc191aaf6131c1befe7.zip
kernel_samsung_smdk4412-5378e60734f5b7bfe1b43dc191aaf6131c1befe7.tar.gz
kernel_samsung_smdk4412-5378e60734f5b7bfe1b43dc191aaf6131c1befe7.tar.bz2
Btrfs: adjust btrfs_discard_extent() return errors and trimmed bytes
Callers of btrfs_discard_extent() should check if we are mounted with -o discard, as we want to make fitrim to work even the fs is not mounted with -o discard. Also we should use REQ_DISCARD to map the free extent to get a full mapping, last we only return errors if 1. the error is not a EOPNOTSUPP 2. no device supports discard Signed-off-by: Li Dongyang <lidongyang@novell.com> Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/ctree.h')
-rw-r--r--fs/btrfs/ctree.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index 9e21176..a18b7bc 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -2229,7 +2229,7 @@ u64 btrfs_account_ro_block_groups_free_space(struct btrfs_space_info *sinfo);
int btrfs_error_unpin_extent_range(struct btrfs_root *root,
u64 start, u64 end);
int btrfs_error_discard_extent(struct btrfs_root *root, u64 bytenr,
- u64 num_bytes);
+ u64 num_bytes, u64 *actual_bytes);
int btrfs_force_chunk_alloc(struct btrfs_trans_handle *trans,
struct btrfs_root *root, u64 type);