* [PATCH stable only] nvmet: set loop queue's segment boundary mask as PAGE_SIZE - 1
@ 2019-03-27 9:02 Ming Lei
2019-03-27 16:16 ` Sasha Levin
0 siblings, 1 reply; 5+ messages in thread
From: Ming Lei @ 2019-03-27 9:02 UTC (permalink / raw)
NVMe target only accepts single-page sg list, either file or block
device backed target code follows this assumption.
However, loop target is one exception, given the sg list is from
the host queue directly.
This patch sets loop queue's segment boundary mask as PAGE_SIZE - 1
for following NVMe target assumption.
Reported-by: Yi Zhang <yi.zhang at redhat.com>
Fixes: 3a85a5de29ea ("nvme-loop: add a NVMe loopback host driver")
Cc: Yi Zhang <yi.zhang at redhat.com>
Cc: Sagi Grimberg <sagi at grimberg.me>
Cc: Chaitanya Kulkarni <chaitanya.kulkarni at wdc.com>
Cc: <stable at vger.kernel.org>
Signed-off-by: Ming Lei <ming.lei at redhat.com>
---
drivers/nvme/target/loop.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/nvme/target/loop.c b/drivers/nvme/target/loop.c
index b9f623ab01f3..7194f86b9dac 100644
--- a/drivers/nvme/target/loop.c
+++ b/drivers/nvme/target/loop.c
@@ -549,6 +549,9 @@ static int nvme_loop_create_io_queues(struct nvme_loop_ctrl *ctrl)
if (ret)
goto out_cleanup_connect_q;
+ /* target only accepts single-page sg list */
+ blk_queue_segment_boundary(ctrl->ctrl.connect_q, PAGE_SIZE - 1);
+
return 0;
out_cleanup_connect_q:
--
2.9.5
^ permalink raw reply related [flat|nested] 5+ messages in thread* [PATCH stable only] nvmet: set loop queue's segment boundary mask as PAGE_SIZE - 1
2019-03-27 9:02 [PATCH stable only] nvmet: set loop queue's segment boundary mask as PAGE_SIZE - 1 Ming Lei
@ 2019-03-27 16:16 ` Sasha Levin
2019-03-28 0:55 ` Ming Lei
0 siblings, 1 reply; 5+ messages in thread
From: Sasha Levin @ 2019-03-27 16:16 UTC (permalink / raw)
On Wed, Mar 27, 2019@05:02:30PM +0800, Ming Lei wrote:
>NVMe target only accepts single-page sg list, either file or block
>device backed target code follows this assumption.
>
>However, loop target is one exception, given the sg list is from
>the host queue directly.
>
>This patch sets loop queue's segment boundary mask as PAGE_SIZE - 1
>for following NVMe target assumption.
>
>Reported-by: Yi Zhang <yi.zhang at redhat.com>
>Fixes: 3a85a5de29ea ("nvme-loop: add a NVMe loopback host driver")
>Cc: Yi Zhang <yi.zhang at redhat.com>
>Cc: Sagi Grimberg <sagi at grimberg.me>
>Cc: Chaitanya Kulkarni <chaitanya.kulkarni at wdc.com>
>Cc: <stable at vger.kernel.org>
>Signed-off-by: Ming Lei <ming.lei at redhat.com>
Could you provide some background as to why this is -stable only in the
commit message?
--
Thanks,
Sasha
^ permalink raw reply [flat|nested] 5+ messages in thread* [PATCH stable only] nvmet: set loop queue's segment boundary mask as PAGE_SIZE - 1
2019-03-27 16:16 ` Sasha Levin
@ 2019-03-28 0:55 ` Ming Lei
2019-04-01 13:55 ` Greg KH
0 siblings, 1 reply; 5+ messages in thread
From: Ming Lei @ 2019-03-28 0:55 UTC (permalink / raw)
On Wed, Mar 27, 2019@12:16:58PM -0400, Sasha Levin wrote:
> On Wed, Mar 27, 2019@05:02:30PM +0800, Ming Lei wrote:
> > NVMe target only accepts single-page sg list, either file or block
> > device backed target code follows this assumption.
> >
> > However, loop target is one exception, given the sg list is from
> > the host queue directly.
> >
> > This patch sets loop queue's segment boundary mask as PAGE_SIZE - 1
> > for following NVMe target assumption.
> >
> > Reported-by: Yi Zhang <yi.zhang at redhat.com>
> > Fixes: 3a85a5de29ea ("nvme-loop: add a NVMe loopback host driver")
> > Cc: Yi Zhang <yi.zhang at redhat.com>
> > Cc: Sagi Grimberg <sagi at grimberg.me>
> > Cc: Chaitanya Kulkarni <chaitanya.kulkarni at wdc.com>
> > Cc: <stable at vger.kernel.org>
> > Signed-off-by: Ming Lei <ming.lei at redhat.com>
>
> Could you provide some background as to why this is -stable only in the
> commit message?
Multi-page bvec has been merged to linus tree already, so the following
patch simply can fix the current issue without needing to limit the segment
size for nvme-loop:
http://lists.infradead.org/pipermail/linux-nvme/2019-March/023105.html
Thanks,
Ming
^ permalink raw reply [flat|nested] 5+ messages in thread* [PATCH stable only] nvmet: set loop queue's segment boundary mask as PAGE_SIZE - 1
2019-03-28 0:55 ` Ming Lei
@ 2019-04-01 13:55 ` Greg KH
2019-04-02 1:05 ` Ming Lei
0 siblings, 1 reply; 5+ messages in thread
From: Greg KH @ 2019-04-01 13:55 UTC (permalink / raw)
On Thu, Mar 28, 2019@08:55:06AM +0800, Ming Lei wrote:
> On Wed, Mar 27, 2019@12:16:58PM -0400, Sasha Levin wrote:
> > On Wed, Mar 27, 2019@05:02:30PM +0800, Ming Lei wrote:
> > > NVMe target only accepts single-page sg list, either file or block
> > > device backed target code follows this assumption.
> > >
> > > However, loop target is one exception, given the sg list is from
> > > the host queue directly.
> > >
> > > This patch sets loop queue's segment boundary mask as PAGE_SIZE - 1
> > > for following NVMe target assumption.
> > >
> > > Reported-by: Yi Zhang <yi.zhang at redhat.com>
> > > Fixes: 3a85a5de29ea ("nvme-loop: add a NVMe loopback host driver")
> > > Cc: Yi Zhang <yi.zhang at redhat.com>
> > > Cc: Sagi Grimberg <sagi at grimberg.me>
> > > Cc: Chaitanya Kulkarni <chaitanya.kulkarni at wdc.com>
> > > Cc: <stable at vger.kernel.org>
> > > Signed-off-by: Ming Lei <ming.lei at redhat.com>
> >
> > Could you provide some background as to why this is -stable only in the
> > commit message?
>
> Multi-page bvec has been merged to linus tree already, so the following
> patch simply can fix the current issue without needing to limit the segment
> size for nvme-loop:
>
> http://lists.infradead.org/pipermail/linux-nvme/2019-March/023105.html
Can you resend the patch with this needed information in it? Also, I
don't understand what you are referring to with that url, why can't we
just use that patch?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 5+ messages in thread* [PATCH stable only] nvmet: set loop queue's segment boundary mask as PAGE_SIZE - 1
2019-04-01 13:55 ` Greg KH
@ 2019-04-02 1:05 ` Ming Lei
0 siblings, 0 replies; 5+ messages in thread
From: Ming Lei @ 2019-04-02 1:05 UTC (permalink / raw)
On Mon, Apr 01, 2019@03:55:09PM +0200, Greg KH wrote:
> On Thu, Mar 28, 2019@08:55:06AM +0800, Ming Lei wrote:
> > On Wed, Mar 27, 2019@12:16:58PM -0400, Sasha Levin wrote:
> > > On Wed, Mar 27, 2019@05:02:30PM +0800, Ming Lei wrote:
> > > > NVMe target only accepts single-page sg list, either file or block
> > > > device backed target code follows this assumption.
> > > >
> > > > However, loop target is one exception, given the sg list is from
> > > > the host queue directly.
> > > >
> > > > This patch sets loop queue's segment boundary mask as PAGE_SIZE - 1
> > > > for following NVMe target assumption.
> > > >
> > > > Reported-by: Yi Zhang <yi.zhang at redhat.com>
> > > > Fixes: 3a85a5de29ea ("nvme-loop: add a NVMe loopback host driver")
> > > > Cc: Yi Zhang <yi.zhang at redhat.com>
> > > > Cc: Sagi Grimberg <sagi at grimberg.me>
> > > > Cc: Chaitanya Kulkarni <chaitanya.kulkarni at wdc.com>
> > > > Cc: <stable at vger.kernel.org>
> > > > Signed-off-by: Ming Lei <ming.lei at redhat.com>
> > >
> > > Could you provide some background as to why this is -stable only in the
> > > commit message?
> >
> > Multi-page bvec has been merged to linus tree already, so the following
> > patch simply can fix the current issue without needing to limit the segment
> > size for nvme-loop:
> >
> > http://lists.infradead.org/pipermail/linux-nvme/2019-March/023105.html
>
> Can you resend the patch with this needed information in it? Also, I
> don't understand what you are referring to with that url, why can't we
> just use that patch?
Sure, will resend the patch with the above info soon.
Thanks,
Ming
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-04-02 1:05 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-03-27 9:02 [PATCH stable only] nvmet: set loop queue's segment boundary mask as PAGE_SIZE - 1 Ming Lei
2019-03-27 16:16 ` Sasha Levin
2019-03-28 0:55 ` Ming Lei
2019-04-01 13:55 ` Greg KH
2019-04-02 1:05 ` Ming Lei
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox