]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: add btrfs_trim_fs() to handle FITRIM
authorLi Dongyang <lidongyang@novell.com>
Thu, 24 Mar 2011 10:24:28 +0000 (10:24 +0000)
committerroot <Chris Mason chris.mason@oracle.com>
Mon, 28 Mar 2011 09:37:47 +0000 (05:37 -0400)
commitfd331a813fa4c0dea66788e1369e51fa208b4e37
treee911bc79c795fceb3e9a618d8f18571c2a776307
parentbfd726623504f79943f4e7e2e043e612e0b5ecfd
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>
fs/btrfs/ctree.h
fs/btrfs/extent-tree.c
fs/btrfs/free-space-cache.c
fs/btrfs/free-space-cache.h
fs/btrfs/ioctl.c