From: Peter Samuelson <peter@cadcamlab.org>
To: Al Peat <al_kernel@yahoo.com>
Cc: Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: e2fs block to physical block translation
Date: Mon, 11 Dec 2000 22:03:43 -0600 [thread overview]
Message-ID: <20001211220343.E3199@cadcamlab.org> (raw)
In-Reply-To: <20001212012148.60376.qmail@web10105.mail.yahoo.com>
In-Reply-To: <20001212012148.60376.qmail@web10105.mail.yahoo.com>; from al_kernel@yahoo.com on Mon, Dec 11, 2000 at 05:21:48PM -0800
[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/
next prev parent reply other threads:[~2000-12-12 4:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-12-12 1:21 Al Peat
2000-12-12 4:03 ` Peter Samuelson [this message]
2000-12-12 6:18 ` Andreas Dilger
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=20001211220343.E3199@cadcamlab.org \
--to=peter@cadcamlab.org \
--cc=al_kernel@yahoo.com \
--cc=linux-kernel@vger.kernel.org \
/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
all inboxes | Powered by JetHome®