diff options
author | Li Dongyang <lidongyang@novell.com> | 2011-03-24 06:24:28 -0400 |
---|---|---|
committer | root <Chris Mason chris.mason@oracle.com> | 2011-03-28 05:37:47 -0400 |
commit | f7039b1d5c32241f87a513e33120db36bf30264d (patch) | |
tree | e911bc79c795fceb3e9a618d8f18571c2a776307 /fs/btrfs/ctree.h | |
parent | 5378e60734f5b7bfe1b43dc191aaf6131c1befe7 (diff) |
Btrfs: add btrfs_trim_fs() to handle FITRIM
We take an free extent out from allocator, trim it, then put it back,
but before we trim the block group, we should make sure the block group is
cached, so plus a little change to make cache_block_group() run without a
transaction.
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.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index a18b7bc2b22c..93a0191aded6 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h | |||
@@ -2232,6 +2232,7 @@ int btrfs_error_discard_extent(struct btrfs_root *root, u64 bytenr, | |||
2232 | u64 num_bytes, u64 *actual_bytes); | 2232 | u64 num_bytes, u64 *actual_bytes); |
2233 | int btrfs_force_chunk_alloc(struct btrfs_trans_handle *trans, | 2233 | int btrfs_force_chunk_alloc(struct btrfs_trans_handle *trans, |
2234 | struct btrfs_root *root, u64 type); | 2234 | struct btrfs_root *root, u64 type); |
2235 | int btrfs_trim_fs(struct btrfs_root *root, struct fstrim_range *range); | ||
2235 | 2236 | ||
2236 | /* ctree.c */ | 2237 | /* ctree.c */ |
2237 | int btrfs_bin_search(struct extent_buffer *eb, struct btrfs_key *key, | 2238 | int btrfs_bin_search(struct extent_buffer *eb, struct btrfs_key *key, |