From: Christoph Hellwig on
On Sat, Jun 26, 2010 at 03:56:51PM -0400, Mike Snitzer wrote:
> Don't alloc discard bio with a biovec in blkdev_issue_discard. Doing so
> means bio_has_data() will not be true until the SCSI layer adds the
> payload to the discard request via blk_add_request_payload.
>
> bio_{enable,disable}_inline_vecs are not expected to be widely used so
> they were exported using EXPORT_SYMBOL_GPL.

Why do we need them exported at all? Also some comments on these
functions would be useful.

Otherwise it looks good to me.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Christoph Hellwig on
Looks good,


Reviewed-by: Christoph Hellwig <hch(a)lst.de>

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Christoph Hellwig on
On Mon, Jun 28, 2010 at 02:41:30PM +0200, Jens Axboe wrote:
> The horrible part is working around that issue by fiddling with the
> assignment of the internal vec. THAT looks like a horrible solution
> to that problem.
>
> How about just adding a check to bio_has_data() for non-zero
> bio->bi_vcnt?

The question is how a discard request from the block layer should look
like. With Mike's patch we have the same situation as for a barrier
request: absolutely no data transferred and no indicator of it. IHMO
that's much better than any partially constructed request. And yes,
that means enabling the payload later in the driver.

The other option would be to not reuse the request at all and just
allocate a new request and use that from sd_prep_fn. That's what
I tried to implement first, but I couldn't get it to work. Given
all the issue we have with the current approach I'm almost tempted
to try that again.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/