From: Hans Reiser <reiser@namesys.com>
To: Chris Hiszpanski <hiszpans@its.caltech.edu>, vitaly@thebsh.namesys.com
Cc: reiserfs-list@namesys.com
Subject: Re: Contribution
Date: Mon, 28 Mar 2005 09:24:32 -0800 [thread overview]
Message-ID: <42483DD0.3020904@namesys.com> (raw)
In-Reply-To: <20050326085141.GA29906@sue.caltech.edu>
Suggestion: If you want casual people to actually read code, you need to
send it as uncompressed patches. Vitaly, please look at this.
I think we would only want to use the algorithm you describe below after
extensively warning the user that they should instead first copy it to a
working hard drive, and warning them that if fsck does not have a good
hard drive under it can make things far worse rather than better, and
having them rerun with the option
--continue-to-trust-my-data-to-failing-hardware
Thanks for the contribution, it sounds useful.
Hans
Chris Hiszpanski wrote:
>Hi,
>
>Recently, I ran a --rebuild-tree on a reiserfs partition in an attempt to
>restore several files that I had accidentally deleted. Due to my own stupidity
>I did not back up my files on the partition before doing this (!).
>
>What can go wrong did, and --rebuild-tree stopped at the first bad block,
>leaving an unmountable /home partition.
>
>I ran badblocks on the partition and passed this to reiserfsck. Some of the
>bad blocks were journal superblocks, and reiserfsck gave up at this point. Web
>documentation suggested running a dd_rescue. Since I was working on a remote
>machine and had no extra drives available this wasn't an open option.
>
>I noticed that writing to the badblocks should cause the hard disk to remap the
>blocks, making reiserfsck happy, though losing data (turned out that apparently
>not much data was stored in these blocks, and this data was inaccessible
>anyway, so not a big loss :).
>
>The non-destructive write (i.e. badblocks -n ...) didn't remap the blocks. Only
>the destructive writes (i.e. badblocks -w) did. Therefore, I modified the
>lib/io.c code with a pretty trivial update that others in this situation may
>find useful.
>
>The contribution adds two options as #define in lib/io.c, NOSUPERDIE and NODIE.
>When NOSUPERDIE is 1, the bread function calls badblocks -w to destructively
>write the bad block, hopefully remapping it (since the remapped block is
>meaningless data, I didn't worry about having bh point to meaningful data).
>When NOSUPERDIE is 0, but NODIE is 1, the bread function returns a 0, acting
>as if the block was in the bad blocks list, avoiding the need for running
>bad blocks separately. When both NOSUPERDIE and NODIE are 0, the code compiles
>unaltered.
>
>The point of this contribution is to prevent reiserfsck from dieing on bad
>blocks, to get it to finish, so that the file system, what's left of it, can
>be mounted.
>
>The results that I received were pretty good. I was able to recover most of
>my files, and the file system appears to be in tact. Can anyone tell me how
>in tact is actually is? I'm not exactly sure what was destroyed when I remapped
>the journal superblocks.
>
>I'd appreciate some feedback on this hack, any problems with it especially.
>
>Hopefully the community finds this useful.
>
>Cheers,
>Chris
>
>(attached reiserfsprogs-3.6.19-hiszpans.tar.gz)
>(http://www.its.caltech.edu/~hiszpans/pub/reiserfsprogs-3.6.19-hiszpans.tar.gz)
>
>
>
next prev parent reply other threads:[~2005-03-28 17:24 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-26 8:51 Contribution Chris Hiszpanski
2005-03-26 14:17 ` flush file system John Sconiers
2005-03-26 19:36 ` Simon Raffeiner
2005-03-28 17:24 ` Hans Reiser [this message]
[not found] <mailman.65479.1492027745.22739.grub-devel@gnu.org>
2017-04-12 20:57 ` Contribution Nicole
[not found] <mailman.37.1492012806.25481.grub-devel@gnu.org>
2017-04-12 16:51 ` Contribution Nicole
2017-04-12 17:03 ` Contribution Xen
2017-04-12 20:06 ` Contribution Vladimir 'phcoder' Serbinenko
[not found] <mailman.65311.1491983735.22739.grub-devel@gnu.org>
2017-04-12 10:36 ` Contribution Nicole
2017-04-12 10:41 ` Contribution Vladimir 'phcoder' Serbinenko
-- strict thread matches above, loose matches on Subject: below --
2014-05-28 14:58 Contribution Alexandre MALKI
[not found] <CAA8043idUL1qbWfrBffhYXL8JX0LZ+WsMseUypatret7PrxBGw@mail.gmail.com>
[not found] ` <CABBk=J9-hrMgGJ6ofvR0uuzX_gTfKJhH_TFCS4fR6m6gD=UBmg@mail.gmail.com>
[not found] ` <CAA8043g_vkZvx_ErHZbF8eq12T2bvvXGWA_u=NRdwEWnmaqaug@mail.gmail.com>
2013-07-01 19:52 ` Contribution christophe courtaut
2013-07-01 20:23 ` Contribution Yehuda Sadeh
2013-07-04 13:58 ` Contribution christophe courtaut
2013-07-05 7:05 ` Contribution Yehuda Sadeh
2013-07-10 15:24 ` Contribution christophe courtaut
2013-07-10 16:08 ` Contribution Yehuda Sadeh
2013-06-27 14:38 Contribution christophe courtaut
2009-01-10 6:48 Contribution Mehdi Sheikhalishahi
2004-11-26 10:13 contribution Artem B. Bityuckiy
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=42483DD0.3020904@namesys.com \
--to=reiser@namesys.com \
--cc=hiszpans@its.caltech.edu \
--cc=reiserfs-list@namesys.com \
--cc=vitaly@thebsh.namesys.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.