linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC] dynamic inodes
@ 2008-09-24 11:46 Alex Tomas
  2008-09-25 22:09 ` Andreas Dilger
  2008-09-25 22:37 ` Andreas Dilger
  0 siblings, 2 replies; 15+ messages in thread
From: Alex Tomas @ 2008-09-24 11:46 UTC (permalink / raw)
  To: ext4 development

Hi,

another idea how to achieve more (dynamic) inodes:
   * new dir_entry format with 64bit inum
   * ino space is 64bit:
     * 2^48 phys. 4K blocks
     * 2^5  inodes in 4K block
     * highest bit is used to choose addressing schema: static or dynamic
   * each block is covered by two bits: in inode (I) and block (B) bitmaps:
     I: 0, B: 0 - block is just free
     I: 0, B: 1 - block is used, but not contains inodes
     I: 1, B: 0 - block is full of inodes
     I: 1, B: 1 - block contains few inodes, has free space

implementation issues:
   * how to allocate new blocks for inodes
     * try to find block with empty inode using bitmaps
     * if we can't find - allocate new block and make it inode block
     * if no free block in this group - repeat 1-2 in another groups
   * how to release block from inodes
     * if block has no used inodes anymore, we mark it 0 in I and 1 in B
     * or if group has very few free inodes, leave it inode block
   * how to find free inode in existing inode block
     * just scan all slots
   * how to migrate/co-exist with static inodes
     * group is marked with DYNAMIC_INODES flag
     * we can turn group to dynamic when it has 0 inodes (simple)
     * we can turn group to dynamic and update bitmaps (hard)
   * how to implement varlen inodes
     * should be simple at allocation time

possibilities:
   * use large inodes to store directory entries
     (4096-128)/(4+8+8) = 198 entries
   * use large inodes to store EAs
   * if we introduce small header for new inode block we could use it to store tails

problems:
   * can't relocate inode w/o changing directory entry
   * can't change inode size after creation
   * e2fsck?

comments/suggestions are very welcome.

thanks, Alex

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2008-09-30 14:03 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-24 11:46 [RFC] dynamic inodes Alex Tomas
2008-09-25 22:09 ` Andreas Dilger
2008-09-25 23:00   ` Alex Tomas
2008-09-25 23:29     ` Andreas Dilger
2008-09-30 14:02       ` Alex Tomas
2008-09-25 22:37 ` Andreas Dilger
2008-09-26  1:10   ` Jose R. Santos
2008-09-26 10:36     ` Andreas Dilger
2008-09-26 14:49       ` Jose R. Santos
2008-09-26 20:01         ` Andreas Dilger
2008-09-26  2:11   ` Theodore Tso
2008-09-26 10:33     ` Andreas Dilger
2008-09-26 14:33       ` Theodore Tso
2008-09-26 20:18         ` Andreas Dilger
2008-09-26 22:26           ` Theodore Tso

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).