linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
To: hooanon05@yahoo.co.jp
Cc: Tyler Hicks <tyhicks@linux.vnet.ibm.com>,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>,
	linux-kernel@vger.kernel.org, ecryptfs-devel@lists.launchpad.net
Subject: Re: [Ecryptfs-devel] [PATCH] ecryptfs: some inode attrs, and a question
Date: Sat, 17 Jan 2009 10:42:26 -0600	[thread overview]
Message-ID: <1232210546.7015.8.camel@norville.austin.ibm.com> (raw)
In-Reply-To: <7210.1232172192@jrobl>

On Sat, 2009-01-17 at 15:03 +0900, hooanon05@yahoo.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


  reply	other threads:[~2009-01-17 16:42 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-13  6:20 [PATCH] ecryptfs: some inode attrs, and a question hooanon05
2009-01-13 13:17 ` Dave Kleikamp
2009-01-15 21:51   ` [Ecryptfs-devel] " Tyler Hicks
2009-01-16  7:36     ` hooanon05
2009-01-16 16:59       ` Dave Kleikamp
2009-01-17  6:03         ` hooanon05
2009-01-17 16:42           ` Dave Kleikamp [this message]
2009-01-17 17:42             ` hooanon05
2009-01-17 18:11               ` Dave Kleikamp
2009-01-19  2:17                 ` hooanon05
2009-01-19 15:01                   ` Dave Kleikamp
2009-01-19 15:25                     ` hooanon05
2009-01-19 15:30                       ` Dave Kleikamp
2009-01-19 15:35                         ` hooanon05
2009-01-19  2:15               ` hooanon05
2009-01-16  8:04     ` hooanon05
2009-01-15 23:03 ` Andrew Morton
2009-01-15 23:39   ` [Ecryptfs-devel] " Tyler Hicks
2009-01-15 23:51     ` Andrew Morton
2009-01-16  7:42   ` hooanon05
2009-01-16  7:53     ` Andrew Morton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1232210546.7015.8.camel@norville.austin.ibm.com \
    --to=shaggy@linux.vnet.ibm.com \
    --cc=ecryptfs-devel@lists.launchpad.net \
    --cc=hooanon05@yahoo.co.jp \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tyhicks@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).