lkml.org 
[lkml]   [2007]   [Nov]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: is the inode an orphan?
    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 majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2007-11-19 16:51    [W:0.022 / U:65.060 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site