| To: | "xfs@xxxxxxxxxxx" <xfs@xxxxxxxxxxx> |
|---|---|
| Subject: | [REVIEW] Invalidate dentry on unlink/rmdir if using CI mode |
| From: | "Barry Naujok" <bnaujok@xxxxxxx> |
| Date: | Fri, 13 Jun 2008 16:06:57 +1000 |
| Organization: | SGI |
| Sender: | xfs-bounce@xxxxxxxxxxx |
| User-agent: | Opera Mail/9.24 (Win32) |
Once of the interesting features of vfs_unlink/d_delete functionality is that if it's the only inode being referenced, it makes the dentry negative. CI doesn't work with negative dentries, so the following code invalidate the dentry in CI mode. -- --- a/fs/xfs/linux-2.6/xfs_iops.c
+++ b/fs/xfs/linux-2.6/xfs_iops.c
@@ -482,6 +482,8 @@ xfs_vn_unlink(
if (likely(!error)) {
xfs_validate_fields(dir); /* size needs update */
xfs_validate_fields(inode);
+ if (xfs_sb_version_hasasciici(&XFS_M(dir->i_sb)->m_sb))
+ d_invalidate(dentry);
}
return -error;
}
@@ -538,6 +540,8 @@ xfs_vn_rmdir(
if (likely(!error)) {
xfs_validate_fields(inode);
xfs_validate_fields(dir);
+ if (xfs_sb_version_hasasciici(&XFS_M(dir->i_sb)->m_sb))
+ d_invalidate(dentry);
}
return -error;
} |
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: Filestreams (and 64bit inodes), Greg Banks |
|---|---|
| Next by Date: | [PATCH] fix extent corruption in xfs_iext_irec_compact_full(), Lachlan McIlroy |
| Previous by Thread: | Re: XFS internal error xfs_trans_cancel at line 1163 of file fs/xfs/xfs_trans.c, Miquel van Smoorenburg |
| Next by Thread: | Re: [REVIEW] Invalidate dentry on unlink/rmdir if using CI mode, Christoph Hellwig |
| Indexes: | [Date] [Thread] [Top] [All Lists] |