lkml.org 
[lkml]   [2021]   [Feb]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC PATCH v5 3/4] nvme: add simple copy support
On Fri, Feb 19, 2021 at 06:15:16PM +0530, SelvaKumar S wrote:
> + struct nvme_copy_range *range = NULL;
[...]
> + range = kmalloc_array(nr_range, sizeof(*range),
> + GFP_ATOMIC | __GFP_NOWARN);
[...]
> + req->special_vec.bv_page = virt_to_page(range);
> + req->special_vec.bv_offset = offset_in_page(range);
> + req->special_vec.bv_len = sizeof(*range) * nr_range;
[...]
> +struct nvme_copy_range {
> + __le64 rsvd0;
> + __le64 slba;
> + __le16 nlb;
> + __le16 rsvd18;
> + __le32 rsvd20;
> + __le32 eilbrt;
> + __le16 elbat;
> + __le16 elbatm;
> +};

so ... at 32 bytes, you can get 128 per 4kB page. What happens if you
try to send down a command that attempts to copy 129 ranges?

\
 
 \ /
  Last update: 2021-02-20 04:41    [W:0.163 / U:3.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site