lkml.org 
[lkml]   [2000]   [Dec]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: e2fs block to physical block translation
From

[Al Peat]
> Quick question about blocks:
>
> If I assume my hard drive uses 512 blocks, and my
> ext2 filesystem uses 4k blocks, can I assume the
> following formula for translation?
>
> physical block # / 8 = e2fs block #

Not if you have a partition table. If you take into account the
individual partition offset, I think your formula is ok.

On a floppy (no partition table) you'd be fine.

It's not always that easy, of course. Think of RAID (logical block
mapping can be a complex formula), LVM (the mapping is stored in a
table in the volume group metadata), CD-ROMs (what exactly do you mean
by "block"...?) and other such.

Peter
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:28    [W:0.077 / U:0.144 seconds]
©2003-2014 Jasper Spaans. Advertise on this site