bug-parted
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: RFC: block size identification


From: Patrick Leslie Polzer
Subject: Re: RFC: block size identification
Date: Sun, 29 Jan 2006 14:47:12 +0100

On Fri, 27 Jan 2006 08:10:58 +0100
Sven Luther <Sven Luther <address@hidden>> wrote:

 | I don't like this, it is indeed in line with Andrew's way of doing stuff, and
 | helps with recovery, but i believe also somewhat error prone.
Why?  Where do you see the possibility of error?

  Look at this:

  - we mistakenly calculate the wrong block size
  - there is always the right one, so we have two blocksize possibilities
  - always fall back to partition table when there are two possiblities
  - problem fixed

 | How can you check the possible ends ? I am not all that familiar with block
 | endings though.
Example for an affs with bs=1024 on a hdd with bs=512:

  1. check if bs=512:
      - read  512/512=1 sectors into buf
      - check whether the aforementioned conditions are true for buf
          -> they shouldn't be, so the bs is not 512

  2. check if bs=1024:
      - read  1024/512=2 sectors into buf
      - check whether the aforementioned conditions are true for buf
          -> they will definitely be, so the bs is 1024

  3. check if bs=2048:
      [...]

  4. check if bs=4096:
      [...]

  last step: check whether this algorithm found multiple block sizes.
             if yes, fall back to partition table.

Let me know of more things unclear.

Best wishes,

Leslie

-- 
gpg --keyserver pgp.mit.edu --recv-keys 0x52D70289

Attachment: pgpXc8F_4Ub2o.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]