Re: [PATCH] Btrfs: fix truncate down when no_holes feature is enabled

2016-11-23 Thread David Sterba
On Tue, Nov 22, 2016 at 12:08:47PM -0800, Liu Bo wrote: > On Tue, Nov 22, 2016 at 02:13:21PM -0500, Chris Mason wrote: > > On 11/11/2016 05:27 PM, Liu Bo wrote: > > > For such a file mapping, > > > > > > [0-4k][hole][8k-12k] > > > > > > In NO_HOLES mode, we don't have the [hole] extent any more.

Re: [PATCH] Btrfs: fix truncate down when no_holes feature is enabled

2016-11-22 Thread Liu Bo
On Tue, Nov 22, 2016 at 02:13:21PM -0500, Chris Mason wrote: > On 11/11/2016 05:27 PM, Liu Bo wrote: > > For such a file mapping, > > > > [0-4k][hole][8k-12k] > > > > In NO_HOLES mode, we don't have the [hole] extent any more. > > Commit c1aa45759e90 ("Btrfs: fix shrinking truncate when the no_ho

Re: [PATCH] Btrfs: fix truncate down when no_holes feature is enabled

2016-11-22 Thread Chris Mason
On 11/11/2016 05:27 PM, Liu Bo wrote: For such a file mapping, [0-4k][hole][8k-12k] In NO_HOLES mode, we don't have the [hole] extent any more. Commit c1aa45759e90 ("Btrfs: fix shrinking truncate when the no_holes feature is enabled") fixed disk isize not being updated in NO_HOLES mode when d

[PATCH] Btrfs: fix truncate down when no_holes feature is enabled

2016-11-11 Thread Liu Bo
For such a file mapping, [0-4k][hole][8k-12k] In NO_HOLES mode, we don't have the [hole] extent any more. Commit c1aa45759e90 ("Btrfs: fix shrinking truncate when the no_holes feature is enabled") fixed disk isize not being updated in NO_HOLES mode when data is not flushed. However, even if da