Linux block layer
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Damien Le Moal <damien.lemoal@wdc.com>
Cc: Jens Axboe <axboe@kernel.dk>,
	linux-block@vger.kernel.org, Shaun Tancheff <shaun@tancheff.com>
Subject: Re: [PATCH] sd: Check for unaligned partial completion
Date: Tue, 14 Feb 2017 00:23:14 -0800	[thread overview]
Message-ID: <20170214082314.GA31838@infradead.org> (raw)
In-Reply-To: <20170214081030.24558-1-damien.lemoal@wdc.com>

> +	unsigned int sector_sz = SCpnt->device->sector_size;

Can you spell out size?

> +	/*
> +	 * In case of bogus fw or device, we could end up having
> +	 * unaligned partial completion. Check this here.
> +	 */
> +	resid = scsi_get_resid(SCpnt);
> +	if (SCpnt->request->cmd_type == REQ_TYPE_FS &&
> +	    resid & (sector_sz - 1)) {

->done is only called for fs requests, so you can remove this check.

      reply	other threads:[~2017-02-14  8:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-14  8:10 [PATCH] sd: Check for unaligned partial completion Damien Le Moal
2017-02-14  8:23 ` Christoph Hellwig [this message]

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=20170214082314.GA31838@infradead.org \
    --to=hch@infradead.org \
    --cc=axboe@kernel.dk \
    --cc=damien.lemoal@wdc.com \
    --cc=linux-block@vger.kernel.org \
    --cc=shaun@tancheff.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