From: "Theodore Ts'o" <tytso@mit.edu>
To: "Bhattiprolu, Ravikumar (Ravikumar)" <ravikb@agere.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Magic Number for New File system
Date: Fri, 17 Dec 2004 21:39:29 -0500 [thread overview]
Message-ID: <20041218023929.GB19699@thunk.org> (raw)
In-Reply-To: <6E1F4DB94568BB4AA8A30083E67378924BB67C@iiex2ku01.agere.com>
On Fri, Dec 17, 2004 at 11:42:48AM +0530, Bhattiprolu, Ravikumar (Ravikumar) wrote:
>
> We are planning to write a new file system for our requirements. Is
> there any standard way to allocate a magic number for this new file
> system? Also how to go about writing the new file system?
There's no standard place to put a magic number, let alone a standard
way to generate a magic number.... that being said, I'd suggest an 8
character field that contains the ascii name of your filesystem plus a
format version number at the beginning of the superblock. The
location of the superblock will vary from filesystem to filesystem,
but most mkfs program will zero the first 4-8k at the beginning and
end of the device in order to prevent false recognition by programs
trying to ID the device looking for magic numbers in various different
locations.
The blkid library, contained in the e2fsprogs distribution, contains a
list of magic number and their locations used by various different
filesystems, if you'd like to take a look at that for some more
information.
- Ted
next prev parent reply other threads:[~2004-12-18 2:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-12-17 6:12 Magic Number for New File system Bhattiprolu, Ravikumar (Ravikumar)
2004-12-17 8:51 ` Mike Waychison
2004-12-18 2:39 ` Theodore Ts'o [this message]
2004-12-18 19:53 ` Phil Lougher
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=20041218023929.GB19699@thunk.org \
--to=tytso@mit.edu \
--cc=linux-kernel@vger.kernel.org \
--cc=ravikb@agere.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox