Re: is the inode an orphan?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux