lkml.org 
[lkml]   [2021]   [Aug]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v7 7/8] fsdax: Introduce dax_iomap_ops for end of reflink
On Fri, Aug 20, 2021 at 08:18:44AM -0700, Dan Williams wrote:
> I notice that the @iomap argument to ->iomap_end() is reliably coming
> from @iter. So you could do the following in your iomap_end()
> callback:
>
> struct iomap_iter *iter = container_of(iomap, typeof(*iter), iomap);
> struct xfs_inode *ip = XFS_I(inode);
> ssize_t written = iter->processed;
> bool cow = xfs_is_cow_inode(ip);
>
> if (cow) {
> if (written <= 0)
> xfs_reflink_cancel_cow_range(ip, pos, length, true)
> }

I think this might be ok for now (with a big comment). Willy's original
iomap iter series replaced the iomap_begin and iomap_end with a single
next callback that takes the iomap_iter, which would solve this issue.
My plan is to look into a series that implements this and sees if this
is indeed a net win.

\
 
 \ /
  Last update: 2021-08-23 15:04    [W:0.064 / U:0.396 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site