lkml.org 
[lkml]   [2023]   [Oct]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    SubjectRe: [PATCH 21/21] nvme: Support atomic writes
    From
    On 05/10/2023 14:32, Pankaj Raghav wrote:
    >>> te_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 think that max_bytes does not need to be a power-of-2 and could be
    relaxed.

    Having said that, max_bytes comes into play for merging of bios - so if
    we are in a scenario with no merging, then may a well leave
    atomic_write_max_bytes == atomic_write_unit_max.

    But let us check this proposal to relax.

    >
    > 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);

    Yeah, right, we want unit_min to be the logical block size.

    Thanks,
    John


    \
     
     \ /
      Last update: 2023-10-05 18:23    [W:6.573 / U:0.160 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site