[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <83f58662-d737-44b0-9899-c0519a75968a@samsung.com>
Date: Thu, 5 Oct 2023 15:32:29 +0200
From: Pankaj Raghav <p.raghav@...sung.com>
To: John Garry <john.g.garry@...cle.com>,
Alan Adamson <alan.adamson@...cle.com>
CC: <axboe@...nel.dk>, <kbusch@...nel.org>, <hch@....de>,
<sagi@...mberg.me>, <jejb@...ux.ibm.com>,
<martin.petersen@...cle.com>, <djwong@...nel.org>,
<viro@...iv.linux.org.uk>, <brauner@...nel.org>,
<chandan.babu@...cle.com>, <dchinner@...hat.com>,
<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-api@...r.kernel.org>
Subject: Re: [PATCH 21/21] nvme: Support atomic writes
>>> + blk_queue_atomic_write_max_bytes(disk->queue, atomic_bs);
>>> + blk_queue_atomic_write_unit_min_sectors(disk->queue, 1);
>>> + blk_queue_atomic_write_unit_max_sectors(disk->queue,
>>> + atomic_bs / bs);
>> blk_queue_atomic_write_unit_[min| max]_sectors expects sectors (512 bytes unit)
>> as input but no conversion is done here from device logical block size
>> to SECTORs.
>
> Yeah, you are right. I think that we can just use:
>
> blk_queue_atomic_write_unit_max_sectors(disk->queue,
> atomic_bs >> SECTOR_SHIFT);
>
Makes sense.
I still don't grok the difference between max_bytes and unit_max_sectors here.
(Maybe NVMe spec does not differentiate it?)
I assume min_sectors should be as follows instead of setting it to 1 (512 bytes)?
blk_queue_atomic_write_unit_min_sectors(disk->queue, bs >> SECTORS_SHIFT);
> Thanks,
> John
>
>>> + blk_queue_atomic_write_boundary_bytes(disk->queue, boundary);
>>> + } else {
>>> + dev_err(ns->ctrl->device, "Unsupported atomic boundary=0x%x\n",
>>> + boundary);
>>> + }
>>>
>
Powered by blists - more mailing lists