Results 1 to 3 of 3

Thread: how do file systems, such as ext4, pick inode numbers

  1. #1
    Join Date
    Jan 2010
    Location
    Wheeling WV USA
    Beans
    1,525
    Distro
    Xubuntu 18.04 Bionic Beaver

    how do file systems, such as ext4, pick inode numbers

    i was looking at some of the inode numbers some new files got. a group got some sequential numbers, then there was a big gap, then some more sequential numbers, then a big jump to way lower numbers around 3000, a couple non-sequential near there, then a jump up high again. i ran a recursive scan of everything and got all numbers. the first inode of the first gap has not been used anywhere. obviously inodes that have been used cannot be picked. but i am curious how it goes about doing that. a these new files were in the same directory. in this case it is ext4, but i have seen this kind of things on others, like the old reiserfs and the new btrfs. i've even seen this happen on freshly formatted file systems, though the sequential runs are longer. does anyone know anything about the logic used to pick the numbers?
    What do you call someone who speaks 3 languages? Trilingual.
    What do you call someone who speaks 2 languages? Bilingual.
    What do you call someone who speaks 1 language? American.

  2. #2
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    Hidden!
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: how do file systems, such as ext4, pick inode numbers

    Use the source, Luke.
    I'd start in the mkfs.ext4 code and work out to the _open() call.

  3. #3
    Join Date
    Jan 2010
    Location
    Wheeling WV USA
    Beans
    1,525
    Distro
    Xubuntu 18.04 Bionic Beaver

    Re: how do file systems, such as ext4, pick inode numbers

    Quote Originally Posted by TheFu View Post
    Use the source, Luke.
    I'd start in the mkfs.ext4 code and work out to the _open() call.
    i'm looking more for a general summary, not trying to learn how just one file system is implemented.
    What do you call someone who speaks 3 languages? Trilingual.
    What do you call someone who speaks 2 languages? Bilingual.
    What do you call someone who speaks 1 language? American.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •