[prev in list] [next in list] [prev in thread] [next in thread]
List: btrfs-devel
Subject: [btrfs-devel]i_blocks and delay allocation
From: yanzheng () 21cn ! com (Yan Zheng)
Date: 2007-09-19 6:52:47
Message-ID: 3d0408630709190652j3b43c550q74f874f42efc6ab7 () mail ! gmail ! com
[Download RAW message or body]
Hello
I found that after defrag a file, the corresponding inode's i_blocks
become incorrect. I hope
following description address the real reason.
i_blocks is decreased in 'btrfs_drop_extents' when something are
drop/truncated and 'run_delalloc_range' calls 'btrfs_drop_extents' at
first place, so 'run_delalloc_range' may decrease the i_blocks.
('btrfs_drop_extents' doesn't increase i_blocks). In normal write
operation, i_blocks is increased in advance in
'dirty_and_release_pages', then decreased in 'run_delalloc_range' , so
final result is correct. But when do file defrag or mmap write,
i_blocks is only decreased by 'run_delalloc_range', i_blocks may
underflow quickly.
Regards
YZ
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic