Re: [PATCH 2/4] Btrfs: clear_dirty only on pages only in compression range

2017-10-13 Thread Timofey Titovets
2017-10-10 19:22 GMT+03:00 David Sterba : > On Tue, Oct 03, 2017 at 06:06:02PM +0300, Timofey Titovets wrote: >> We need to call extent_range_clear_dirty_for_io() >> on compression range to prevent application from changing >> page content, while pages compressing. >> >> but "(end

Re: [PATCH 2/4] Btrfs: clear_dirty only on pages only in compression range

2017-10-10 Thread David Sterba
On Tue, Oct 03, 2017 at 06:06:02PM +0300, Timofey Titovets wrote: > We need to call extent_range_clear_dirty_for_io() > on compression range to prevent application from changing > page content, while pages compressing. > > but "(end - start)" can be much (up to 1024 times) bigger > then

[PATCH 2/4] Btrfs: clear_dirty only on pages only in compression range

2017-10-03 Thread Timofey Titovets
We need to call extent_range_clear_dirty_for_io() on compression range to prevent application from changing page content, while pages compressing. but "(end - start)" can be much (up to 1024 times) bigger then compression range (BTRFS_MAX_UNCOMPRESSED), so optimize that by calculating compression