[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1232210546.7015.8.camel@norville.austin.ibm.com>
Date: Sat, 17 Jan 2009 10:42:26 -0600
From: Dave Kleikamp <shaggy@...ux.vnet.ibm.com>
To: hooanon05@...oo.co.jp
Cc: Tyler Hicks <tyhicks@...ux.vnet.ibm.com>,
linux-fsdevel <linux-fsdevel@...r.kernel.org>,
linux-kernel@...r.kernel.org, ecryptfs-devel@...ts.launchpad.net
Subject: Re: [Ecryptfs-devel] [PATCH] ecryptfs: some inode attrs, and a
question
On Sat, 2009-01-17 at 15:03 +0900, hooanon05@...oo.co.jp wrote:
> Dave Kleikamp:
> > I think you're hitting on something here. I never understood the need
> > for the d_drop()s, but taking them out broke things. They probably are
> > just papering over bugs where the ecryptfs inode is not being properly
> > updated after changes are made to the lower inode.
>
> As long as cifs_hardlink() calls d_drop() for the target dentry (as the
> old version of NFS did), ecryptfs may have to call d_drop() too. But I
> believe the d_drop() for the source dentry is unnecessary, as long as
> the inode attributes are maintained correctly.
> Additionally, when the lower filesystem does NOT call d_drop(), ecryptfs
> has no necessary to call it. I'd like to suggest ecryptfs_link() to
> check it by d_unhashed().
Does this function make sense (un-compiled, un-tested)?
void ecryptfs_update_inode_from_lower(struct dentry *dentry)
{
struct dentry *lower_dentry = ecryptfs_dentry_to_lower(dentry);
if (d_unhashed(lower_dentry))
d_drop(dentry);
else {
struct inode *inode = dentry->d_inode;
struct inode *lower_inode = lower_dentry->d_inode;
inode->i_nlink = lower_inode->i_nlink;
inode->i_ctime = lower_inode->i_ctime;
/* Should anything else go here ? */
}
}
--
David Kleikamp
IBM Linux Technology Center
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists