[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <749e8de5-8bbb-4fb5-a0c0-82937a9dfa38@oracle.com>
Date: Tue, 13 Feb 2024 08:15:08 +0000
From: John Garry <john.g.garry@...cle.com>
To: Christoph Hellwig <hch@....de>
Cc: axboe@...nel.dk, kbusch@...nel.org, sagi@...mberg.me, jejb@...ux.ibm.com,
martin.petersen@...cle.com, djwong@...nel.org, viro@...iv.linux.org.uk,
brauner@...nel.org, dchinner@...hat.com, jack@...e.cz,
linux-block@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-nvme@...ts.infradead.org, linux-xfs@...r.kernel.org,
linux-fsdevel@...r.kernel.org, tytso@....edu, jbongio@...gle.com,
linux-scsi@...r.kernel.org, ming.lei@...hat.com, ojaswin@...ux.ibm.com,
bvanassche@....org
Subject: Re: [PATCH v3 07/15] block: Limit atomic write IO size according to
atomic_write_max_sectors
On 13/02/2024 06:26, Christoph Hellwig wrote:
> On Wed, Jan 24, 2024 at 11:38:33AM +0000, John Garry wrote:
>> Currently an IO size is limited to the request_queue limits max_sectors.
>> Limit the size for an atomic write to queue limit atomic_write_max_sectors
>> value.
>
> Same here. Please have one patch that actually adds useful atomic write
> support to the block layer. That doesn't include fs stuff like
> IOCB_ATOMIC or the block file operation support, but to have a reviewable
> chunk I'd really like to see the full block-layer support for the limits,
> enforcing them, the merge prevention in a single commit with an extensive
> commit log explaining the semantics. That allows a useful review without
> looking at the full tree, and also will help with people reading history
> in the future.
Fine, so essentially merge 1, 2, 5, 7, 8, 9
BTW, I was also going to add this function which ensures that partitions
are properly aligned:
bool bdev_can_atomic_write(struct block_device *bdev)
{
struct request_queue *bd_queue = bdev->bd_queue;
struct queue_limits *limits = &bd_queue->limits;
if(!limits->atomic_write_unit_min_sectors)
return false;
if (bdev_is_partition(bdev)) {
unsigned int granularity = max(limits->atomic_write_unit_min_sectors,
limits->atomic_write_hw_boundary_sectors);
if (bdev->bd_start_sect % granularity)
return false;
}
return true;
}
I'm note sure if that would be better in the fops.c patch (or not added)
Thanks,
John
Powered by blists - more mailing lists