lkml.org 
[lkml]   [2008]   [Aug]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Question : ext2 compatibility feature mechanism
On Mon, Aug 25, 2008 at 09:04:48PM +0900, ohyama_sec@ariel-networks.com wrote:
>
> Could you please give me the documents that is written about ext2
> filesystem at length, especially compatibility feature mechanism.

Please check out the Articles and Publiciations page on the ext4 wiki:

http://ext4.wiki.kernel.org/index.php/Publications

The short version for how the compatibility feature mechanism works is
that there are three bitmasks, compat, rocompat, and incompat. The
ext2/ext3/ext4 filesystem code in the kernel uses the these feature
bitmasks to test for the presence of features it understands, and will
read and write to the filesystem appropriately depending on which
features are enabled.

For bits in the feature bitmasks that the filesystem does not
recognize, bits in the "compat" bitmask are assumed to be changes that
are fully forwards compatible, so an implementation which sees a bit
in the "compat" bitmask which it doesn't understand should still feel
free to mount the filesystem and modify it as necessary. If an
implementation sees a bit in the "rocompat" bitmask that it does not
understand, it is safe to mount the filesystem read/only, but
modifying the filesystem may likely damage the filesystem. And if an
implementation sees a bit in the "incompat" bitmask that it does not
understand, it should reject mounting the filesystem entirely,
read/only or read/write.

E2fsck uses a much more stringent standard, in that if there are any
bits in the bitmask that it does not undersatnd, it will refuse to
touch the filesystem altogether, lest it damage the filesystem and
lose data as it tries to repair it.

Regards,

- Ted


\
 
 \ /
  Last update: 2008-08-25 16:43    [W:0.023 / U:4.476 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site