lkml.org 
[lkml]   [2022]   [Feb]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] xfs: add missing cmap->br_state = XFS_EXT_NORM update
On Fri, Feb 18, 2022 at 01:55:37PM +0800, Gao Xiang wrote:
> Hi Darrick,
>
> On Thu, Feb 17, 2022 at 09:40:32PM -0800, Darrick J. Wong wrote:
> > On Thu, Feb 17, 2022 at 05:55:42PM +0800, Gao Xiang wrote:
> > > COW extents are already converted into written real extents after
> > > xfs_reflink_convert_cow_locked(), therefore cmap->br_state should
> > > reflect it.
> > >
> > > Otherwise, there is another necessary unwritten convertion
> > > triggered in xfs_dio_write_end_io() for direct I/O cases.
> > >
> > > Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
> >
> > I /think/ this looks ok. Does it test ok too? AFAICT nothing in the
> > iomap/writeback machinery cares the incorrect state because we always
> > set IOMAP_F_SHARED (which triggers COW) so I think this is simply a fix
> > for directio, like you said?
>
> Yeah, I think so, from the code logic buffered i/o seems no impacted...
> And the unnecessary unwritten convertion under direct i/o takes
> noticeable extra overhead in our workloads...
>
> I checked my last night xfstests, it seems it stops unexpectedly (maybe
> due to some environmental problem). I will rerun tests today and
> feedback later.

On my test environment machine, with linux 5.17-rc4,
both w/ and w/o the patch, it fails:

generic/594 generic/600 xfs/158 xfs/160

I think no issue with this patch.

Thanks,
Gao Xiang

\
 
 \ /
  Last update: 2022-02-18 12:31    [W:0.042 / U:0.280 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site