[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <54d83775-7497-4fae-a9ea-bec8008557aa@oracle.com>
Date: Thu, 10 Jul 2025 16:18:32 +0100
From: John Garry <john.g.garry@...cle.com>
To: Jens Axboe <axboe@...nel.dk>, agk@...hat.com, snitzer@...nel.org,
mpatocka@...hat.com, song@...nel.org, yukuai3@...wei.com, hch@....de,
nilay@...ux.ibm.com, cem@...nel.org
Cc: dm-devel@...ts.linux.dev, linux-kernel@...r.kernel.org,
linux-raid@...r.kernel.org, linux-block@...r.kernel.org,
ojaswin@...ux.ibm.com, martin.petersen@...cle.com,
akpm@...ux-foundation.org, linux-xfs@...r.kernel.org,
djwong@...nel.org
Subject: Re: [PATCH v5 2/6] block: sanitize chunk_sectors for atomic write
limits
On 10/07/2025 16:08, Jens Axboe wrote:
>> + chunk_bytes = lim->chunk_sectors << SECTOR_SHIFT;
>> + if (chunk_bytes) {
>> + if (WARN_ON_ONCE(lim->atomic_write_hw_unit_max >
>> + chunk_bytes))
>> + goto unsupported;
>> + }
> Unnecessary indentation here. Why not just:
>
> chunk_bytes = lim->chunk_sectors << SECTOR_SHIFT;
> if (WARN_ON_ONCE(chunk_bytes &&
> lim->atomic_write_hw_unit_max > chunk_bytes))
> goto unsupposed.
>
> Also avoids splitting a comparison over multiple lines, which is always
> annoying to read.
ok, I can tidy that up.
Thanks,
John
Powered by blists - more mailing lists