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 compression range (BTRFS_MAX_UNCOMPRESSED), so optimize that
> by calculating compression range for
> that loop iteration, and flip bits only on that range

I'm not sure this is safe to do. Compress_file_range gets the whole
range [start,end] from async_cow_start, and other parts of code might
rely on the status of the whole range, ie. not partially redirtied.
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to