Re: [PATCH 8/8] xfs: only clear preallocated COW blocks in xfs_reflink_clear_inode_flag

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Mar 13, 2018 at 03:36:01PM +0100, Christoph Hellwig wrote:
> Currently these are the only ones that should exist at this point anyway,
> but with O_ATOMIC writes we might have legit extents around in the COW
> fork even when clearing the reflink flag.

Hmmm... so I assume that the premise of the O_ATOMIC write series is
still that we use the cow fork to stage writes until fsync, and the
presence of a cow fork is now separate from the reflink inode flag?

Therefore, it's perfectly legit to have a !reflink inode with real
extents sitting in the cow fork and legit to be clearing the reflink
iflag with real extents sitting around.

I think this is ok but I'd sure like to see the atomic writes patches
before I pull this one in.

--D

> 
> Signed-off-by: Christoph Hellwig <hch@xxxxxx>
> ---
>  fs/xfs/xfs_reflink.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/xfs/xfs_reflink.c b/fs/xfs/xfs_reflink.c
> index 85d3379a81df..8ab9c73b430e 100644
> --- a/fs/xfs/xfs_reflink.c
> +++ b/fs/xfs/xfs_reflink.c
> @@ -1570,7 +1570,7 @@ xfs_reflink_clear_inode_flag(
>  	 * We didn't find any shared blocks so turn off the reflink flag.
>  	 * First, get rid of any leftover CoW mappings.
>  	 */
> -	error = xfs_reflink_cancel_cow_blocks(ip, tpp, 0, NULLFILEOFF, true);
> +	error = xfs_reflink_cancel_cow_blocks(ip, tpp, 0, NULLFILEOFF, false);
>  	if (error)
>  		return error;
>  
> -- 
> 2.14.2
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux