Btrfs: use flag EXTENT_DEFRAG for snapshot-aware defrag
authorLiu Bo <bo.li.liu@oracle.com>
Thu, 6 Sep 2012 01:10:51 +0000 (19:10 -0600)
committerChris Mason <chris.mason@fusionio.com>
Mon, 1 Oct 2012 19:19:15 +0000 (15:19 -0400)
commit9e8a4a8b0b9484e8d14674fc62c9ad8ac9dbce5b
treed1c2cc07c1d016b6d9e8352a41247e1da2778f28
parent3d6b5c3b5c0b970ce8a9d3bac6854f5c0ce0295a
Btrfs: use flag EXTENT_DEFRAG for snapshot-aware defrag

We're going to use this flag EXTENT_DEFRAG to indicate which range
belongs to defragment so that we can implement snapshow-aware defrag:

We set the EXTENT_DEFRAG flag when dirtying the extents that need
defragmented, so later on writeback thread can differentiate between
normal writeback and writeback started by defragmentation.

Original-Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
fs/btrfs/extent_io.c
fs/btrfs/extent_io.h
fs/btrfs/file.c
fs/btrfs/inode.c
fs/btrfs/ioctl.c