[PATCH] btrfs: ignore unfragmented file checks in defrag when compression enabled - rebased

2012-06-19 Thread Andrew Mahone
Rebased on btrfs-next and retested. Inform should_defrag_range if BTRFS_DEFRAG_RANGE_COMPRESS is set. If so, skip checks for adjacent extents and extent size when deciding whether to defrag, as these can prevent an uncompressed and unfragmented file from being compressed as requested. Signed-off-

Re: [PATCH] btrfs: ignore unfragmented file checks in defrag when compression enabled

2012-06-19 Thread Josef Bacik
On Mon, Jun 18, 2012 at 01:27:37PM -0400, Andrew Mahone wrote: > Inform should_defrag_range if BTRFS_DEFRAG_RANGE_COMPRESS is set. If so, skip > checks for adjacent extents and extent size when deciding whether to defrag, > as these can prevent an uncompressed and unfragmented file from being > com

[PATCH] btrfs: ignore unfragmented file checks in defrag when compression enabled

2012-06-18 Thread Andrew Mahone
Inform should_defrag_range if BTRFS_DEFRAG_RANGE_COMPRESS is set. If so, skip checks for adjacent extents and extent size when deciding whether to defrag, as these can prevent an uncompressed and unfragmented file from being compressed as requested. Signed-off-by: Andrew Mahone --- fs/btrfs/ioct