From: Malcolm Beattie <mbeattie@clueful.co.uk>
To: Jeff Garzik <jgarzik@mandrakesoft.com>
Cc: bert hubert <ahu@ds9a.nl>, Alan Cox <alan@lxorguk.ukuu.org.uk>,
Linus Torvalds <torvalds@transmeta.com>,
Bill Davidsen <davidsen@tmr.com>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: ide filters / 'ide dump' / 'bio dump'
Date: Wed, 13 Mar 2002 12:05:09 +0000 [thread overview]
Message-ID: <20020313120509.A11043@clueful.co.uk> (raw)
In-Reply-To: <E16kcTV-0002ar-00@the-village.bc.nu> <3C8D6CA4.8060604@mandrakesoft.com> <20020313091422.A23422@outpost.ds9a.nl> <3C8F25BE.9040000@mandrakesoft.com>
In-Reply-To: <3C8F25BE.9040000@mandrakesoft.com>; from jgarzik@mandrakesoft.com on Wed, Mar 13, 2002 at 05:11:10AM -0500
Jeff Garzik writes:
> bert hubert wrote:
>
> ># biodump /dev/hda
> >09:09:33.023 READ block 12345 [10 blocks]
> >09:09:33.024 READ block 12355 [10 blocks]
> >09:09:33.025 READ block 12365 [10 blocks]
> >09:09:34.000 WRITE block 12345 [1 block]
> >
>
>
> Definitely an interesting idea... With this new stuff Linus talked
> about in his proposal and what I'm thinking about, it shouldn't be too
> hard to do.
I wrote a basic version of that (reqlog) a couple of years ago (with
the writing of the rw/block/size info inline in the kernel rather than
via a nice separate filter). The use I put it to was for migrating
block devices live (i.e. while being read/written) without having to
quiesce the readers/writers except for a few seconds at the end. The
idea is that you set up (as an ordinary userland process) a bitmap
in memory for all the blocks on the device. You start with them all
marked dirty. You then do two loops concurrently (select() or threads):
while (1) {
read next block/size touched
mark corresponding bits dirty in bitmap
}
and
while (1) {
while (find_next_dirty_bit_in_bitmap()) {
mark bit clean
read corresponding block from device
send blocknumber, blockdata to remote peer
}
go back to start of bitmap
}
The remote peer is a daemon which just reads the (blocknumber,data)
pairs and writes the data to the snapshot-to-be device at its end.
Eventually, the bitmap gets mostly clean and the migrating process
has "caught up" and is just siphoning newly dirtied data off to the
remote end in real time. At that point, you quiesce the writing
applications nicely for a few seconds (database, serving daemons or
whatever is writing to the device) and let the migrator clean the
bitmap fully (the last few blocks) and at that point you have a
point-in-time safe snapshot at the remote end.
With filters available (presumably as modules) for the bio stuff,
this will become possible without having to patch the kernel (I think
I submitted the reqlog and bufflink patches for inclusion but
didn't care enough to keep trying).
See
http://www.clueful.co.uk/mbeattie/linux-kernel.html#reqlog
and bmigrate and bufflink on the same page for the "old" way. It's
basic stuff and new APIs mean a rewrite will be much easier but I
thought you may be interested in another application of such logging.
--Malcolm
--
Malcolm Beattie <mbeattie@clueful.co.uk>
Linux Technical Consultant
IBM EMEA Enterprise Server Group...
...from home, speaking only for myself
next prev parent reply other threads:[~2002-03-13 12:03 UTC|newest]
Thread overview: 107+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-03-11 15:13 [patch] My AMD IDE driver, v2.7 Vojtech Pavlik
2002-03-11 16:36 ` Martin Dalecki
2002-03-11 20:49 ` Rik van Riel
2002-03-11 22:45 ` Alan Cox
2002-03-11 22:39 ` Linus Torvalds
2002-03-11 22:45 ` Vojtech Pavlik
2002-03-11 22:53 ` Linus Torvalds
2002-03-12 0:14 ` Bill Davidsen
2002-03-12 0:34 ` Jeff Garzik
2002-03-12 0:58 ` Erik Andersen
2002-03-12 1:33 ` Jeff Garzik
2002-03-12 1:41 ` Linus Torvalds
2002-03-12 1:50 ` Jeff Garzik
2002-03-11 18:50 ` gmack
2002-03-12 2:19 ` Linus Torvalds
2002-03-12 2:34 ` Jeff Garzik
2002-03-12 11:21 ` Martin Dalecki
2002-03-12 2:54 ` J. Dow
2002-03-12 6:32 ` Vojtech Pavlik
2002-03-14 15:12 ` Pavel Machek
2002-03-13 18:42 ` Horst von Brand
2002-03-13 19:11 ` Andre Hedrick
2002-03-12 6:25 ` Vojtech Pavlik
2002-03-12 7:13 ` Erik Andersen
2002-03-12 16:40 ` Bill Davidsen
2002-03-12 0:51 ` Linus Torvalds
2002-03-12 1:41 ` Jeff Garzik
2002-03-12 1:44 ` Linus Torvalds
2002-03-12 2:22 ` Jeff Garzik
2002-03-12 2:33 ` Linus Torvalds
2002-03-12 2:37 ` Jeff Garzik
2002-03-12 3:34 ` Olivier Galibert
2002-03-12 4:13 ` Jeff Garzik
2002-03-14 14:13 ` Pavel Machek
2002-03-15 11:05 ` Jeff Garzik
2002-03-18 19:20 ` Pavel Machek
2002-03-19 9:29 ` Vojtech Pavlik
2002-03-19 21:21 ` Pavel Machek
2002-03-19 21:56 ` Vojtech Pavlik
2002-03-20 8:00 ` Daniela Engert
2002-03-20 18:11 ` Bill Davidsen
2002-03-20 18:46 ` Daniela Engert
2002-03-20 22:15 ` Pavel Machek
2002-03-20 23:09 ` Daniel Kobras
2002-03-19 22:33 ` Andre Hedrick
2002-03-20 0:25 ` Alan Cox
2002-03-15 14:45 ` Alan Cox
2002-03-12 11:23 ` Martin Dalecki
2002-03-12 2:50 ` J. Dow
2002-03-12 3:10 ` Jeff Garzik
2002-03-12 3:28 ` Linus Torvalds
2002-03-12 3:46 ` Jeff Garzik
2002-03-12 6:10 ` J. Dow
2002-03-12 3:58 ` Linus Torvalds
2002-03-12 4:26 ` Jeff Garzik
2002-03-12 4:40 ` Linus Torvalds
2002-03-12 6:26 ` J. Dow
2002-03-12 11:44 ` Martin Dalecki
2002-03-12 4:31 ` Linus Torvalds
2002-03-12 5:05 ` Jeff Garzik
2002-03-12 5:20 ` Linus Torvalds
2002-03-12 11:39 ` Martin Dalecki
2002-03-12 4:49 ` Erik Andersen
2002-03-12 5:08 ` Linus Torvalds
2002-03-12 11:36 ` Martin Dalecki
2002-03-12 6:05 ` J. Dow
2002-03-12 4:41 ` Erik Andersen
2002-03-12 4:48 ` Jeff Garzik
2002-03-12 6:30 ` J. Dow
2002-03-12 6:29 ` J. Dow
2002-03-12 16:36 ` Bill Davidsen
2002-03-12 2:57 ` Alan Cox
2002-03-12 2:49 ` Jeff Garzik
2002-03-12 11:17 ` Alan Cox
2002-03-13 8:14 ` ide filters / 'ide dump' / 'bio dump' bert hubert
2002-03-13 10:11 ` Jeff Garzik
2002-03-13 12:05 ` Malcolm Beattie [this message]
2002-03-13 17:17 ` Linus Torvalds
2002-03-12 11:10 ` [patch] My AMD IDE driver, v2.7 Martin Dalecki
2002-03-12 0:33 ` benh
2002-03-12 20:21 ` Gunther Mayer
2002-03-12 16:33 ` Bill Davidsen
2002-03-12 11:00 ` Martin Dalecki
2002-03-12 15:59 ` Vojtech Pavlik
2002-03-12 16:11 ` Martin Dalecki
2002-03-12 16:21 ` Vojtech Pavlik
2002-03-12 16:26 ` Martin Dalecki
2002-03-12 16:33 ` Vojtech Pavlik
2002-03-12 16:41 ` Martin Dalecki
2002-03-13 0:01 ` Russell King
2002-03-12 16:43 ` Martin Dalecki
2002-03-12 16:50 ` Vojtech Pavlik
2002-03-12 16:58 ` Martin Dalecki
2002-03-14 14:02 ` Pavel Machek
2002-03-15 11:13 ` Vojtech Pavlik
2002-03-18 19:21 ` Pavel Machek
2002-03-13 19:43 ` Bill Davidsen
2002-03-12 16:44 ` Sebastian Droege
2002-03-12 16:17 ` Martin Dalecki
2002-03-12 16:27 ` Vojtech Pavlik
2002-03-12 16:32 ` Martin Dalecki
2002-03-12 20:00 ` [patch] PIIX driver rewrite Vojtech Pavlik
2002-03-12 20:35 ` Sebastian Droege
2002-03-12 20:34 ` Vojtech Pavlik
2002-03-12 21:07 ` Sebastian Droege
2002-03-12 21:19 ` Vojtech Pavlik
2002-03-11 23:01 ` [patch] My AMD IDE driver, v2.7 Alan Cox
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=20020313120509.A11043@clueful.co.uk \
--to=mbeattie@clueful.co.uk \
--cc=ahu@ds9a.nl \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=davidsen@tmr.com \
--cc=jgarzik@mandrakesoft.com \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@transmeta.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
all inboxes | Powered by JetHome®