1

Can anyone explain me the relation between struct ext2_super_block ( in fs/ext2/ext2.h) and struct super_block ( in include/linux/fs.h). I am asking this because, in LKP ( by Robert Love ) it says that each filesystem has to implement struct super_block. But ext2_super_block is different and how are the functions in super.c applied to ext2?

Albert
  • 385
  • 1
  • 4
  • 17

1 Answers1

1

ext2_super_block is ext2-specific on-disk structure as super_block is a generic in memory super block description.

Ilya Matveychikov
  • 3,936
  • 2
  • 27
  • 42
  • Because every filesystem will implement its on super block, why does struct super_block exist? – Albert Nov 06 '12 at 12:36
  • just [compare ext2_super_block](http://lxr.free-electrons.com/source/fs/ext2/ext2.h#L410) and [super_block](http://lxr.free-electrons.com/source/include/linux/fs.h#L1491) by yourself :) – Ilya Matveychikov Nov 06 '12 at 12:56