stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ming Lei <ming.lei@redhat.com>
To: Sagi Grimberg <sagi@grimberg.me>
Cc: Christoph Hellwig <hch@lst.de>,
	linux-nvme@lists.infradead.org, Yi Zhang <yi.zhang@redhat.com>,
	stable@vger.kernel.org,
	Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Subject: Re: [PATCH 1/2] nvme: target: fix nvmet_file_init_bvec()
Date: Tue, 26 Mar 2019 10:16:28 +0800	[thread overview]
Message-ID: <20190326021627.GE30669@ming.t460p> (raw)
In-Reply-To: <a850ff6c-f006-9b1b-5425-19cc6a1693c7@grimberg.me>

On Mon, Mar 25, 2019 at 07:03:23PM -0700, Sagi Grimberg wrote:
> 
> > > The scatterlist in the nvme target is always allocated by the nvmet
> > > code itself an thus never contains multi-page sg list entries.
> > 
> > I am wondering if it is true.
> > 
> > Not look at other target code yet, however seems it isn't true for loop,
> > see the following code in nvme_loop_queue_rq():
> > 
> > 	iod->req.sg = iod->sg_table.sgl;
> > 	iod->req.sg_cnt = blk_rq_map_sg(req->q, req, iod->sg_table.sgl);
> > 	iod->req.transfer_len = blk_rq_payload_bytes(req);
> > 
> > And it has been triggered by nvme/011 in Yi's test.
> 
> Yes, loop is an exception in this case.

Thanks for the clarification!

Another candidate fix is to set nvmet-loop's queue segment boundary mask
as PAGE_SIZE - 1.

Also there is the same issue for block device backed target.

If no one objects, I'd like to take the approach of adjusting segment
boundary mask.

Thanks,
Ming

  reply	other threads:[~2019-03-26  2:16 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20190325100708.24172-1-ming.lei@redhat.com>
2019-03-25 10:07 ` [PATCH 1/2] nvme: target: fix nvmet_file_init_bvec() Ming Lei
2019-03-25 10:52   ` Christoph Hellwig
2019-03-26  1:39     ` Ming Lei
2019-03-26  2:03       ` Sagi Grimberg
2019-03-26  2:16         ` Ming Lei [this message]
2019-03-26  7:32           ` Christoph Hellwig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190326021627.GE30669@ming.t460p \
    --to=ming.lei@redhat.com \
    --cc=chaitanya.kulkarni@wdc.com \
    --cc=hch@lst.de \
    --cc=linux-nvme@lists.infradead.org \
    --cc=sagi@grimberg.me \
    --cc=stable@vger.kernel.org \
    --cc=yi.zhang@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).