[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAOSviJ2+tUZ=jiOnPSi8=mOzjANwvuNXAkAG6f3ADGi=M=F5PQ@mail.gmail.com>
Date: Mon, 14 Aug 2023 22:31:53 +0530
From: Nitesh Shetty <nitheshshetty@...il.com>
To: Bart Van Assche <bvanassche@....org>
Cc: Nitesh Shetty <nj.shetty@...sung.com>,
Jens Axboe <axboe@...nel.dk>, Jonathan Corbet <corbet@....net>,
Alasdair Kergon <agk@...hat.com>,
Mike Snitzer <snitzer@...nel.org>, dm-devel@...hat.com,
Keith Busch <kbusch@...nel.org>,
Christoph Hellwig <hch@....de>,
Sagi Grimberg <sagi@...mberg.me>,
Chaitanya Kulkarni <kch@...dia.com>,
Alexander Viro <viro@...iv.linux.org.uk>,
Christian Brauner <brauner@...nel.org>,
martin.petersen@...cle.com, linux-doc@...r.kernel.org,
gost.dev@...sung.com, Anuj Gupta <anuj20.g@...sung.com>,
linux-kernel@...r.kernel.org, linux-nvme@...ts.infradead.org,
linux-block@...r.kernel.org, mcgrof@...nel.org, dlemoal@...nel.org,
linux-fsdevel@...r.kernel.org
Subject: Re: [dm-devel] [PATCH v14 03/11] block: add copy offload support
On Sat, Aug 12, 2023 at 3:10 AM Bart Van Assche <bvanassche@....org> wrote:
>
> On 8/11/23 03:52, Nitesh Shetty wrote:
> > + * Description:
> > + * Copy source offset to destination offset within block device, using
> > + * device's native copy offload feature.
>
> Offloading the copy operation is not guaranteed so I think that needs to
> be reflected in the above comment.
>
Acked.
> > + * We perform copy operation by sending 2 bio's.
> > + * 1. We take a plug and send a REQ_OP_COPY_SRC bio along with source
> > + * sector and length. Once this bio reaches request layer, we form a
> > + * request and wait for dst bio to arrive.
>
> What will happen if the queue depth of the request queue at the bottom
> is one?
>
For any reason if a request reaches the driver with only one of the src/dst bio,
copy will fail. This design requires only one request to do a copy,
so it should work fine.
> > + blk_start_plug(&plug);
> > + dst_bio = blk_next_bio(src_bio, bdev, 0, REQ_OP_COPY_DST, gfp);
>
> blk_next_bio() can return NULL so its return value should be checked.
>
Acked.
Thank you,
Nitesh Shetty
Powered by blists - more mailing lists