linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bill Davidsen <davidsen@tmr.com>
To: Rene Herman <rene.herman@gmail.com>
Cc: Jan-Benedict Glaw <jbglaw@lug-owl.de>,
	Theodore Tso <tytso@mit.edu>,
	linux-fsdevel@vger.kernel.org, Al Boldi <a1426z@gawab.com>,
	linux-raid@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [RFH] Partition table recovery
Date: Mon, 23 Jul 2007 16:22:29 -0400	[thread overview]
Message-ID: <46A50E05.3080905@tmr.com> (raw)
In-Reply-To: <46A488EB.2050305@gmail.com>

Rene Herman wrote:
> On 07/23/2007 10:41 AM, Jan-Benedict Glaw wrote:
>
>> As multibyte on-disk variables, these will need LE/BE conversion.
>
> Indeed, thanks -- has been updated in the version that is attached.
>
> Also fixes a bug that snuck in (failed to add offset to entry->start).
>
>>> struct entry {
>>>     uint8_t flags;
>>>     uint8_t type;
>>>     uint16_t __1;
>>>     uint64_t start;
>>>     uint32_t size;
>>
>> Dito.
>
> This can stay for now. The partition table backup would indeed need 
> some defined byte-order but it might be "whatever order the filesystem 
> it's backed up onto uses". Since it's not directly written to any 
> filesystem for now, host order will do currently.
>
>> Looks like a useful program, but you'd definively fix the LE/BE issues.
>> If you do that, it'll be able to even run on BE machines, too.
>
> I might disagree with the usefulness. I believe that preferably a 
> backup should be made with help from the kernel (if only by walking 
> sysfs) to avoid things getting out of sync between kernel and backup 
> program.
>
> (this program largely does the same as the kernel does but even now 
> there's already a difference in so far that I didn't bother to 
> de-garbage the 3rd and 4th entries in the second level extendeds).
>
How can I politely say this code really needs comments?
To quote the late R. W. Benway, "If it was hard to write it should be 
hard to understand."
(regarding code in FORTRAN II on punched cards, ca 1965)
> Rene.

-- 
bill davidsen <davidsen@tmr.com>
  CTO TMR Associates, Inc
  Doing interesting things with small computers since 1979


  parent reply	other threads:[~2007-07-23 20:21 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200707200813.03553.a1426z@gawab.com>
     [not found] ` <46A24846.7050803@gmail.com>
     [not found]   ` <20070722011141.GJ26752@thunk.org>
2007-07-22  4:10     ` [RFH] Partition table recovery Al Boldi
2007-07-22 16:28       ` Theodore Tso
2007-07-22 19:05         ` Al Boldi
2007-07-22 21:23         ` Indan Zupancic
2007-07-23  8:15         ` Rene Herman
2007-07-23  8:41           ` Jan-Benedict Glaw
2007-07-23 10:54             ` Rene Herman
2007-07-23 12:39               ` Rene Herman
2007-07-23 13:15                 ` Jan-Benedict Glaw
2007-07-23 13:32                   ` Rene Herman
2007-07-23 20:22               ` Bill Davidsen [this message]
2007-07-23 13:58           ` Theodore Tso
2007-07-24  4:08             ` Rene Herman

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=46A50E05.3080905@tmr.com \
    --to=davidsen@tmr.com \
    --cc=a1426z@gawab.com \
    --cc=jbglaw@lug-owl.de \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-raid@vger.kernel.org \
    --cc=rene.herman@gmail.com \
    --cc=tytso@mit.edu \
    /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;
as well as URLs for NNTP newsgroup(s).