lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7c9b72fa-652a-44d5-9d51-85b609676901@oracle.com>
Date: Mon, 17 Mar 2025 09:17:10 +0000
From: John Garry <john.g.garry@...cle.com>
To: Christoph Hellwig <hch@....de>
Cc: brauner@...nel.org, djwong@...nel.org, cem@...nel.org, dchinner@...hat.com,
        linux-xfs@...r.kernel.org, linux-fsdevel@...r.kernel.org,
        linux-kernel@...r.kernel.org, ojaswin@...ux.ibm.com,
        ritesh.list@...il.com, martin.petersen@...cle.com, tytso@....edu,
        linux-ext4@...r.kernel.org
Subject: Re: [PATCH v6 04/13] xfs: pass flags to xfs_reflink_allocate_cow()

On 17/03/2025 06:15, Christoph Hellwig wrote:
> On Thu, Mar 13, 2025 at 05:13:01PM +0000, John Garry wrote:
>> @@ -823,6 +824,9 @@ xfs_direct_write_iomap_begin(
>>   	if (xfs_is_shutdown(mp))
>>   		return -EIO;
>>   
>> +	if (flags & IOMAP_DIRECT || IS_DAX(inode))
>> +		reflink_flags |= XFS_REFLINK_CONVERT_UNWRITTEN;
> 
> Given that this is where the policy is implemented now, this comment:
> 
> 	/*
> 	 * COW fork extents are supposed to remain unwritten until we're ready
>           * to initiate a disk write.  For direct I/O we are going to write the
> 	 * data and need the conversion, but for buffered writes we're done.
>           */
> 
> from xfs_reflink_convert_unwritten should probably move here now.

ok, fine, I can relocate this comment to xfs_direct_write_iomap_begin(), 
but please let me know if you prefer an rewording.

> 
>> -	return xfs_reflink_convert_unwritten(ip, imap, cmap, convert_now);
>> +	return xfs_reflink_convert_unwritten(ip, imap, cmap,
>> +			flags & XFS_REFLINK_CONVERT_UNWRITTEN);
> 
> I'd probably thread the flags argument all the way through
> xfs_reflink_convert_unwritten as that documents the intent better.

ok


> 
>> +/*
>> + * Flags for xfs_reflink_allocate_cow() and callees
>> + */
> 
> And the full sentence with a .?
> 
ok

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ