• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Can i rely on inode numbers?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Can i rely on inode numbers?


  • Subject: Re: Can i rely on inode numbers?
  • From: Mark Day <email@hidden>
  • Date: Mon, 14 Apr 2008 13:49:12 -0700


On Apr 14, 2008, at 3:32 AM, Quinn wrote:

At 14:48 -0700 11/4/08, Jim Luther wrote:
ctually, not all file systems guarantee that inodes don't change even when a volume is mounted.

Indeed. But I would consider such file systems to be defective (-:

Unfortunately, there are a wide variety of file systems out there that all behave a little bit differently. Any model you pick is going to fit some of them better than others.


Still, someone off-list reminded me of another way that inode numbers can change while the volume is mounted, namely, if the file system object is deleted and the inode (and hence it's number) gets recycled for another file system object. This is quite rare on HFS- style volumes (where the inode number is the catalogue node ID, which generally takes a long time to wrap), but is quite common on other volume formats (specifically, UFS).

Another odd corner case you may run into on msdosfs (FAT12, FAT16, FAT32) volumes is that a file's inode number will change when it transitions between empty and non-empty (and vice versa). For non- empty files, the inode number is the cluster number of the file's first cluster. For empty files, it uses a special value outside the range of valid cluster numbers. So, most of the time, the inode number doesn't change, and nobody notices... (Note this behavior is unique to our implementation. Other BSDs do it differently.)


-Mark

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Filesystem-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Can i rely on inode numbers? (From: Lutz Helwing <email@hidden>)
 >Re: Can i rely on inode numbers? (From: Quinn <email@hidden>)
 >Re: Can i rely on inode numbers? (From: Jim Luther <email@hidden>)
 >Re: Can i rely on inode numbers? (From: Quinn <email@hidden>)

  • Prev by Date: Re: Can i rely on inode numbers?
  • Next by Date: Re: Can i rely on inode numbers?
  • Previous by thread: Re: Can i rely on inode numbers?
  • Next by thread: Re: Can i rely on inode numbers?
  • Index(es):
    • Date
    • Thread