2

As per the wiki entry for Ext2,"In Linux the block size is limited by the architecture page size."

I think the restriction is due the fact in a typical file system(say ext2) data is handled in terms of pages and hence it gives more performance to use architecture page size.

My question is : Can you point me where exactly this restriction is implemented ? So I won't be able to format lesser than page size(typically 4k) ?

Thanks

kumar
  • 2,530
  • 6
  • 33
  • 57
  • See http://www.win.tue.nl/~aeb/linux/lk/lk-9.html, the page size may be retrievable using [`getpagesize()`](http://linux.die.net/man/2/getpagesize). – Ofir Sep 21 '11 at 04:58

1 Answers1

1

The limit on ext2 block size with respect to page size is an upper bound; ext2 blocks may be 1024, 2048, or 4096 bytes on an architecture with 4k pages. On architectures such as Alpha that have 8k pages, a block size of 8192 bytes would be valid, but such filesystems would not be usable on systems with a smaller page size.

See Documentation/filesystems/ext2.txt in the Linux kernel source for more information.

niklata
  • 91
  • 1