linux-nvme.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: hch@infradead.org (Christoph Hellwig)
Subject: [PATCH 5/5] nvmet: add support for the Write Zeroes command
Date: Thu, 17 Nov 2016 02:28:03 -0800	[thread overview]
Message-ID: <20161117102803.GA8295@infradead.org> (raw)
In-Reply-To: <6591bf30-6f66-c4e6-e304-9b580489a9b9@grimberg.me>

On Wed, Nov 16, 2016@06:47:22PM +0200, Sagi Grimberg wrote:
> > +	if (__blkdev_issue_zeroout(req->ns->bdev, sector, nr_sector,
> > +				GFP_KERNEL, &bio, false))
> > +		status = NVME_SC_INTERNAL | NVME_SC_DNR;
> > +
> > +	if (bio) {
> > +		bio->bi_private = req;
> > +		bio->bi_end_io = nvmet_bio_done;
> > +		if (status) {
> 
> if (status != NVME_SC_SUCCESS) can this happen?
> can we end up with a bio if __blkdev_issue_zeroout
> failed?

This can't happen, it's copy and paste from deallocate which operates on a
range, and where it could happen.

> > +			bio->bi_error = -EIO;
> > +			bio_endio(bio);
> 
> Something looks odd here, how does the status propagate in
> this case?

We'd only need the -EIO - but as said this can't actually happen and
we can just remove it.

  reply	other threads:[~2016-11-17 10:28 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-16  6:50 [PATCHSET] Add support for write zeroes operation in Block layer and NVMe Driver Chaitanya Kulkarni
2016-11-16  6:50 ` [PATCH 1/5] block: add async variant of blkdev_issue_zeroout Chaitanya Kulkarni
2016-11-17 10:29   ` Christoph Hellwig
2016-11-16  6:50 ` [PATCH 2/5] block: add support for REQ_OP_WRITE_ZEROES Chaitanya Kulkarni
2016-11-16 17:59   ` Keith Busch
2016-11-17  2:48     ` Martin K. Petersen
2016-11-17 22:28       ` chaitany kulkarni
2016-11-16  6:50 ` [PATCH 4/5] nvme: add support for the Write Zeroes command Chaitanya Kulkarni
2016-11-16 16:48   ` Sagi Grimberg
2016-11-16  6:50 ` [PATCH 5/5] nvmet: " Chaitanya Kulkarni
2016-11-16 16:47   ` Sagi Grimberg
2016-11-17 10:28     ` Christoph Hellwig [this message]
2016-11-17 10:28   ` 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=20161117102803.GA8295@infradead.org \
    --to=hch@infradead.org \
    /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).