From: ashwin chaugule <ashwin.chaugule@gmail.com>
To: LVM general discussion and development <linux-lvm@redhat.com>
Subject: Re: [linux-lvm] Re: raid 1 on a single disk
Date: Sun, 14 Nov 2004 23:11:30 +0530 [thread overview]
Message-ID: <89af10f90411140941260b4b4b@mail.gmail.com> (raw)
In-Reply-To: <04sj62-uei.ln1@news.it.uc3m.es>
ok , here is what ive done ...
for my particular disk : when there's a write request, I duplicate the
req struct first(using kmalloc ), call a function to put in custom
values into the respective registers ( LBA format) using 'block' .
Then I set the interupt handler to a custom routine, where it will put
the correct desired LBA addr into the IDE_DATA_REG ( by calling
ata_output_data) ... after which without calling end_request i let the
_original_ request struct do its thing , by calling the default
interrupt handler which later calls an end_request.
That way , on one knows(or atleast i hope) that i've performed a
duplicate write. Ive verified this, the file gets duplicated.
BUT ! for some unknown reason, when I unmount the partition , it hangs !
Why would this be happening ? Why should the filesystem be affected,
if it doesnt even know that i've performed a duplicate write !
Im still working on the read requests...
On Sun, 14 Nov 2004 12:28:32 +0100, Peter T. Breuer <ptb@lab.it.uc3m.es> wrote:
> ashwin chaugule <ashwin.chaugule@gmail.com> wrote:
> > I've also managed to hack into the kernel IDE susbsys. (ide-disk.c) to
> > duplicate the writes and reads for this particular disk.
>
> It's extremely unlikely you got this right. Recall that the driver has
> to work when out of memory, and that if you generate another write
> request like the request you received, then you will need another
> request struct and another bh struct for each one in the original. You
> also have to point them at the buffers in the original request, and
> make sue that the original request's end_bh (end_bio :) functions do
> not free the original buffers, but wait till your extra request has
> completed too. Those structs take memory, and have to come from
> somewhere.
>
> In other words, you have to do what the raid1 driver does. Maintain a
> local pool.
>
> Note that the raid1 driver chooses to be synchronous on write, that is
> not ack your original request until all the copies have finished. It
> has to do that because it can't mark sections of the target as out of
> date on disk, so it has to complete all writes while the knowledge
> that it has to is still in memory. It can't pick up later and complete
> them. You may wish to improve that (the FR1 driver, mine, at
> fr1.sf.net, can also go async on write if you want it to).
>
> > RAID 1 is useful here (although its on one disk) because , data will
> > not be written / read _very_ often to/from the device. And in the
> > event that the media is flaky, will provide like a backup. The other
>
> Provided that you know WHICH of the copies is right :-).
>
> > benefit is, I dont have to worry about the i/o errors (or any other
> > for that matter) while reading the contents back, the best copy
> > *should* be picked up by the md subsys itself.
>
> Best?
>
> Peter
>
> _______________________________________________
>
>
> linux-lvm mailing list
> linux-lvm@redhat.com
> https://www.redhat.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
>
--
Ashwin Chaugule
Embedded Systems Engineer
Aftek Infosys ltd.
[Embedded Division]
next prev parent reply other threads:[~2004-11-14 17:41 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-13 10:17 [linux-lvm] raid 1 on a single disk ashwin chaugule
2004-11-13 10:33 ` [linux-lvm] " Peter T. Breuer
2004-11-13 10:41 ` ashwin chaugule
2004-11-13 11:03 ` Piete Brooks
2004-11-13 12:59 ` Peter T. Breuer
2004-11-13 13:38 ` Piete Brooks
2004-11-13 15:04 ` Peter T. Breuer
2004-11-13 13:38 ` ashwin chaugule
2004-11-13 21:13 ` Graham Wood
2004-11-13 22:00 ` Greg Freemyer
2004-11-14 0:41 ` Måns Rullgård
2004-11-14 5:44 ` ashwin chaugule
2004-11-14 11:28 ` Peter T. Breuer
2004-11-14 17:41 ` ashwin chaugule [this message]
2004-11-14 18:04 ` Peter T. Breuer
2004-11-14 19:02 ` ashwin chaugule
2004-11-14 21:01 ` Peter T. Breuer
2004-11-15 6:09 ` ashwin chaugule
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=89af10f90411140941260b4b4b@mail.gmail.com \
--to=ashwin.chaugule@gmail.com \
--cc=linux-lvm@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.