Linux Kernel Networking document (free, 178 pages doc)

Greg Freemyer greg.freemyer at gmail.com
Mon Feb 4 16:38:08 EST 2013


I took a minute to find the list of flags:

Look for s_feature_incompat and s_feature_ro_compat at

   https://ext4.wiki.kernel.org/index.php/Ext4_Disk_Layout

The incompat flags are of most interest for the discussion.  If any of
those are set, neither the ext2 nor the ext3 driver can mount the
filesystem unless they have been extended to support these features:

===
Incompatible feature set. If the kernel or fsck doesn't understand one
of these bits, it should stop.

Any of:
0x1	Compression (INCOMPAT_COMPRESSION).
0x2	Directory entries record the file type. See ext4_dir_entry_2 below
(INCOMPAT_FILETYPE).
0x4	Filesystem needs recovery (INCOMPAT_RECOVER).
0x8	Filesystem has a separate journal device (INCOMPAT_JOURNAL_DEV).
0x10	Meta block groups. See the earlier discussion of this feature
(INCOMPAT_META_BG).
0x40	Files in this filesystem use extents (INCOMPAT_EXTENTS).
0x80	Enable a filesystem size of 2^64 blocks (INCOMPAT_64BIT).
0x100	Multiple mount protection. Not implemented (INCOMPAT_MMP).
0x200	Flexible block groups. See the earlier discussion of this
feature (INCOMPAT_FLEX_BG).
0x400	Inodes can be used for large extended attributes
(INCOMPAT_EA_INODE). (Not implemented?)
0x1000	Data in directory entry (INCOMPAT_DIRDATA). (Not implemented?)
0x2000	Never used (INCOMPAT_BG_USE_META_CSUM). Probably free.
0x4000	Large directory >2GB or 3-level htree (INCOMPAT_LARGEDIR).
0x8000	Data in inode (INCOMPAT_INLINE_DATA).

==

Greg

On Mon, Feb 4, 2013 at 8:49 AM, Greg Freemyer <greg.freemyer at gmail.com> wrote:
> (Why is this a top-posted message thread?  Please stop creating these.)
>
> Only the first link says that the ext2 driver can mount a ext4 filesystem (if the journal is clean).  I'm confident that is wrong.  Ext4 has several on-disk features that are not backward compatible.  There is a binary set of flags which is set at mkfs time as to which of those features were enabled by mkfs.ext4.
>
> A ext3 doc would only describe a ext4 filesystem with all of those flags off.
>
> Thus a ext3 doc describing the on disk structure is not a waste of time, but it becomes a subset of a full ext4 doc describing the on disk structure.
>
> I would recommend that documenting that set of flags be the first documentation effort.
>
> Greg
>
> Peter Teoh <htmldeveloper at gmail.com> wrote:
>
>>generally, anything u write for ext2, should still be valid for ext3,
>>and
>>ext4. in the sense that the features are backward compatible.   sizing
>>limits may have increased, but OLD working mechanism should still be
>>valid....except for some.
>>
>>so ext2 fs should still be mountable as ext4, but not vice versa, once
>>some
>>flag is enabled (I think it is xattr).  and if the flag is not enabled,
>>and
>>the journal logs is clean, then ext4 fs is also mountable as ext2 fs:
>>
>>http://superuser.com/questions/408822/ext4-converted-mounted-as-ext2
>>
>>http://computer-forensics.sans.org/blog/2011/06/14/digital-forensics-mounting-dirty-ext4-filesystems
>>
>>http://en.wikipedia.org/wiki/Extended_file_attributes
>>
>>On Sun, Feb 3, 2013 at 12:26 AM, Rami Rosen <roszenrami at gmail.com>
>>wrote:
>>
>>> Hi,
>>> > ext2 and ext3 are kind of obsolete now.
>>>
>>> Indeed, ext4 was integrated into Linux kernel back in 2008.
>>> Amongs its known features which do not exist in ext3 are support for
>>> huge files (like   1 EB (exabyte or somtimes termed exbibyte); 1 EB
>>is
>>>  1024 PB (petabyte) whereas
>>> 1 PB is  1024 TB (terabyte).
>>> a directory can contain a maximum of 64,000 subdirectories (whereas
>>we
>>> have 32,000 in ext3)
>>> Amongst its other features are Journal checksumming, Multiblock
>>> allocator, Faster file system checking and more.
>>>
>>>
>>> If you prefer to start with simpler implementations, ext3 is of
>>course
>>> simpler, and of course ext2 is even simpler than ext3.
>>>
>>> But in case you intend to start with ext2/ext3, and later perform
>>> a pass on all your documentation to update it to ext4, take into
>>> consideration that this will take quite a time; depending on how deep
>>> you intend to delve into implementation details.
>>>
>>> Good luck!
>>>
>>> Regards,
>>> Rami Rosen
>>> http://ramirose.wix.com/ramirosen
>>>
>>>
>>>
>>> On Sat, Feb 2, 2013 at 11:43 AM, Shubham Sharma
>>> <kernel.shubham at gmail.com> wrote:
>>> > Hi,
>>> >
>>> > I understand that ext2 and ext3 are kind of obsolete now. But
>>AFAIK,
>>> there
>>> > is not much difference in ext3 and ext4.
>>> >
>>> > Moreover for a newbie , it is better to start with ext3. What you
>>think ?
>>> >
>>> > Regards
>>> > Shubham
>>> >
>>> >
>>> > On Fri, Feb 1, 2013 at 2:15 AM, Rami Rosen <roszenrami at gmail.com>
>>wrote:
>>> >>
>>> >> Hi,
>>> >> Have you considered to start with ext4?
>>> >> it seems that ext3, ext2 are a bit out of fashion,
>>> >>
>>> >> Regards,
>>> >> Rami Rosen
>>> >> http://ramirose.wix.com/ramirosen
>>> >>
>>> >>
>>> >> On Thu, Jan 31, 2013 at 8:58 PM, shubham
>><kernel.shubham at gmail.com>
>>> wrote:
>>> >> > Thanks Rami,
>>> >> >
>>> >> > I am also trying to understand ext3 and write some document for
>>the
>>> >> > same.
>>> >> >
>>> >> > Regards
>>> >> > Shubham
>>> >> >
>>> >> >
>>> >> > On 31-Jan-13 12:51 AM, Rami Rosen wrote:
>>> >> >>
>>> >> >> HI,
>>> >> >> I will try to write something for Linux Filesystems  (and maybe
>>for
>>> >> >> other subsystems) but this will probably take a lot of time.
>>> >> >>
>>> >> >> Regards,
>>> >> >> Rami Rosen
>>> >> >> http://ramirose.wix.com/ramirosen
>>> >> >>
>>> >> >>
>>> >> >> On Wed, Jan 30, 2013 at 5:44 PM, shubham
>><kernel.shubham at gmail.com>
>>> >> >> wrote:
>>> >> >>>
>>> >> >>> Thanks for sharing the document.
>>> >> >>>
>>> >> >>> I hope we could have such documents for other subsystems as
>>well.
>>> >> >>>
>>> >> >>> Regards
>>> >> >>> Shubham
>>> >> >>>
>>> >> >>>
>>> >> >>> On 28-Jan-13 10:23 PM, Rami Rosen wrote:
>>> >> >>>>
>>> >> >>>> Hi everyone,
>>> >> >>>> You can find here an up to date and detailed document in pdf
>>(178
>>> >> >>>> pages) about Linux Kernel Networking; going deep into design
>>and
>>> >> >>>> implementation details as well as the theory behind it:
>>> >> >>>>
>>> http://media.wix.com/ugd//295986_931b8bcf34d93419d46e05b5aa5d0216.pdf
>>> >> >>>>
>>> >> >>>> I believe that developers/sysadmins/researchers/students may
>>find
>>> >> >>>> help
>>> >> >>>> with it.
>>> >> >>>>
>>> >> >>>>
>>> >> >>>> regards,
>>> >> >>>> Rami Rosen
>>> >> >>>>
>>> >> >>>> http://ramirose.wix.com/ramirosen
>>> >> >>>>
>>> >> >>>> _______________________________________________
>>> >> >>>> Kernelnewbies mailing list
>>> >> >>>> Kernelnewbies at kernelnewbies.org
>>> >> >>>> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>>> >> >>>
>>> >> >>>
>>> >> >
>>> >
>>> >
>>>
>>> _______________________________________________
>>> Kernelnewbies mailing list
>>> Kernelnewbies at kernelnewbies.org
>>> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>>>
>
> --
> Sent from my Android phone with K-9 Mail. Please excuse my brevity.



-- 
Greg Freemyer
Intelligent Avatar Corporation

Chief Technology Officer
http://www.linkedin.com/in/gregfreemyer
CNN/TruTV Aired Forensic Imaging Demo -
   http://insession.blogs.cnn.com/2010/03/23/how-computer-evidence-gets-retrieved/

(678) 653-4860



More information about the Kernelnewbies mailing list