mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Joe Thornber <joe@fib011235813.fsnet.co.uk>
To: Neil Brown <neilb@cse.unsw.edu.au>
Cc: Jens Axboe <axboe@suse.de>,
	linux-lvm@sistina.com, linux-kernel@vger.kernel.org,
	Andrew Morton <akpm@zip.com.au>
Subject: Re: [linux-lvm] LVM2 modifies the buffer_head struct?
Date: Thu, 4 Jul 2002 08:45:34 +0100	[thread overview]
Message-ID: <20020704074534.GA884@fib011235813.fsnet.co.uk> (raw)
In-Reply-To: <15651.54044.557070.109158@notabene.cse.unsw.edu.au>

On Thu, Jul 04, 2002 at 02:46:20PM +1000, Neil Brown wrote:
> I think this can work sanely and is something I have considered for
> raid1-read and multipath in md.
> 
> struct privatebit {
>   bio_end_io_t  *oldend;
>   void          *oldprivate;
>   ...other...stuff;
> };
> 
> make_request(struct request_queue_t *q, struct buffer_head *bh, int rw)
> {
> 
>  struct privatebit *pb = kmalloc(...);
> 
>   pb->oldend = bh->b_end_io;
>   pb->oldprivate = bh->b_private;
>   bh->b_private = pb;
>   bh->b_end_io = my_end_handler;
> 
>   ..remap b_rdev, b_rsector ...
> 
>   generic_make_request(bh, rw);
> 
> }
> 
> Then my_end_handler have do some local cleanup,
> re-instate oldend and oldprivate, and pass the bh back up.
> For raid1/multipath it would arrange to resubmit the request if there
> as an error.
> 
> This stacks nicely and allows for the extra bit to be alloced to be
> minimal.

This is exactly what I'm doing in device-mapper :)

> Ofcourse this ceases to be an issue in 2.5 because the filesys uses 
> pages or buffer_heads and the device driver uses bios.

y, 2.5 is fine.

- Joe

  parent reply	other threads:[~2002-07-04  7:43 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <F19741gcljD2E2044cY00004523@hotmail.com>
2002-07-02 14:17 ` Joe Thornber
2002-07-03 10:08   ` Jens Axboe
2002-07-03 10:28     ` Andrew Morton
2002-07-03 12:01     ` Joe Thornber
2002-07-03 12:10       ` Jens Axboe
2002-07-04  4:46         ` Neil Brown
2002-07-04  5:44           ` Andrew Morton
2002-07-04  7:45           ` Joe Thornber [this message]
2002-07-04  7:58           ` Jens Axboe
2002-07-04  8:40             ` Andrew Morton
2002-07-04  8:39               ` Jens Axboe
2002-07-04  8:57                 ` Joe Thornber
2002-07-04  9:00                   ` Jens Axboe
2002-07-04  9:44                 ` Andrew Morton
2002-07-07 20:51                   ` Joe Thornber
2002-07-05 15:23 Mark Peloquin

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=20020704074534.GA884@fib011235813.fsnet.co.uk \
    --to=joe@fib011235813.fsnet.co.uk \
    --cc=akpm@zip.com.au \
    --cc=axboe@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-lvm@sistina.com \
    --cc=neilb@cse.unsw.edu.au \
    /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

all inboxes | Powered by JetHome®