Re: [PATCH 5/5] nvmet: add support for the Write Zeroes command

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Nov 16, 2016 at 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.
--
To unsubscribe from this list: send the line "unsubscribe linux-block" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux