Yes this works fine, as long as you assert that stacking is an entity of
the b_end_io functions, ie you dont rely on the state of the buffer_head
before i/o completion. But it breaks for ext3.
I'm inclined to say that I think 2.4 mappers should go the full length
like I did in loop, which is always safe (although it does eat more
memory, of course, buffer_heads aren't exactly lite :)
int make_request(struct request_queue_t *q, struct buffer_head *bh, int rw)
{
struct buffer_head *stack_bh = some_pool_alloc(...);
stack_bh->b_private = bh;
stack_bh->b_end_io = my_end_handler;
/* setup b_rdev and b_rsector, etc */
generic_make_request(stack_bh, rw);
return 0;
}
> We just want ext3/jbd to make sure that it only calls bh2jh on
> an unlocked buffer... is that easy?
That's the question indeed, someone with a good grasp of jbd should make
that call. If that is the only 'violator' (depending on your point of
view), then yes lets just fix that up and say that the above is pb
private is valid.
> Ofcourse this ceases to be an issue in 2.5 because the filesys uses
> pages or buffer_heads and the device driver uses bios.
Yep, no such problem in 2.5
-- Jens Axboe- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/