[lkml]   [2007]   [Nov]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: is the inode an orphan?

Jan Kara wrote:
>> In our FS when we're in ->unlink() and i_nlink becomes 0, we have to record
>> this inode in the table of orphans, and remove it from there in
>> ->delete_inode(). This is needed to be able to dispose of orphans in case
>> of an unclean reboot on the next mount. AFAIK, ext3 has something similar.
>> I just figured that this could be optimized - in most cases
>> ->delete_inode() is called right after ->unlink(), and I wanted to avoid
>> putting the inode to the orphan table in those cases.
> Yes, ext3 has something similar. But actually ext3 would have to insert
> inode in the orphan list anyway - in delete_inode we do truncate and
> for it we also insert the inode into the orphan list because truncate
> can be too large to fit into a single transaction.

Ok, thanks for this point.

> Hmm, I'm just not sure whether unlink cannot somehow race with open
> (at least I don't see any lock that would prevent open while unlink is
> in progress)...

And this.

Best Regards,
Artem Bityutskiy (Артём Битюцкий)
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2007-11-19 16:51    [W:0.056 / U:14.072 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site