Mailinglist Archive: packet-writing (42 mails)

< Previous Next >
Re: ext2 on a CD-RW
  • From: Jens Axboe <axboe@xxxxxxx>
  • Date: Fri, 2 Jan 2004 12:19:10 +0000 (UTC)
  • Message-id: <20040102121904.GQ5523@xxxxxxx>
On Fri, Jan 02 2004, Peter Osterlund wrote:
> > Does UDF use mpage? The fact that it doesn't trigger on UDF doesn't mean
> > that packet writing isn't breaking the API :)
>
> Agreed, this was not meant to excuse the packet writing code, just
> some additional trivia.
>
> Btw, is this API documented somewhere, or does it have to be reverse
> engineered by means of understanding implementation details in
> mpage_writepage() and similar functions? ;) May I suggest this patch?
>
> --- linux/drivers/block/ll_rw_blk.c.old 2004-01-02 12:56:55.000000000 +0100
> +++ linux/drivers/block/ll_rw_blk.c 2004-01-02 13:07:25.000000000 +0100
> @@ -173,9 +173,11 @@
> * are dynamic, and thus we have to query the queue whether it is ok to
> * add a new bio_vec to a bio at a given offset or not. If the block device
> * has such limitations, it needs to register a merge_bvec_fn to control
> - * the size of bio's sent to it. Per default now merge_bvec_fn is defined for
> - * a queue, and only the fixed limits are honored.
> - *
> + * the size of bio's sent to it. Note that a block device *must* allow a
> + * single page to be added to an empty bio. The block device driver may want
> + * to use the bio_split() function to deal with these bio's. Per default
> + * no merge_bvec_fn is defined for a queue, and only the fixed limits are
> + * honored.
> */
> void blk_queue_merge_bvec(request_queue_t *q, merge_bvec_fn *mbfn)
> {

I just looked but could not find anything about it, there's been some
talk on this list. But it doesn't look like it ever got documented in
text writing. That needs to be fixed for sure, thanks for the patch. It
probably wants documenting in fs/bio.c:bio_add_page() too.

--
Jens Axboe


< Previous Next >
List Navigation
This Thread