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: <259e6f94-282a-449e-9ef3-85469b8457d5@oracle.com>
Date: Mon, 24 Jun 2024 08:34:32 +0100
From: John Garry <john.g.garry@...cle.com>
To: "Darrick J. Wong" <djwong@...nel.org>
Cc: chandan.babu@...cle.com, dchinner@...hat.com, hch@....de,
        viro@...iv.linux.org.uk, brauner@...nel.org, jack@...e.cz,
        linux-xfs@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-fsdevel@...r.kernel.org, catherine.hoang@...cle.com,
        martin.petersen@...cle.com
Subject: Re: [PATCH 09/13] xfs: Update xfs_inode_alloc_unitsize_fsb() for
 forcealign

On 21/06/2024 19:38, Darrick J. Wong wrote:
> On Fri, Jun 21, 2024 at 10:05:36AM +0000, John Garry wrote:
>> For forcealign enabled, the allocation unit size is in ip->i_extsize, and
>> this must never be zero.
>>
>> Signed-off-by: John Garry<john.g.garry@...cle.com>
>> ---
>>   fs/xfs/xfs_inode.c | 2 ++
>>   1 file changed, 2 insertions(+)
>>
>> diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c
>> index 994fb7e184d9..cd07b15478ac 100644
>> --- a/fs/xfs/xfs_inode.c
>> +++ b/fs/xfs/xfs_inode.c
>> @@ -4299,6 +4299,8 @@ xfs_inode_alloc_unitsize(
>>   {
>>   	unsigned int		blocks = 1;
>>   
>> +	if (xfs_inode_has_forcealign(ip))
>> +		return ip->i_extsize;
> i_extsize is in units of fsblocks, whereas this function returns bytes.
> I think you need XFS_FSB_TO_B here?

Right, that was a copy-and-paste error from the previous series.

Thanks,
John

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ