lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20100929230703.GS23839@count0.beaverton.ibm.com>
Date:	Wed, 29 Sep 2010 16:07:03 -0700
From:	Matt Helsley <matthltc@...ibm.com>
To:	Oren Laadan <orenl@...columbia.edu>
Cc:	Matt Helsley <matthltc@...ibm.com>,
	containers@...ts.linux-foundation.org, Jan Kara <jack@...e.cz>,
	Andreas Dilger <adilger.kernel@...ger.ca>,
	linux-fsdevel@...r.kernel.org, "Theodore Ts'o" <tytso@....edu>,
	linux-ext4@...r.kernel.org, Al Viro <viro@...iv.linux.org.uk>,
	Valerie Aurora <vaurora@...hat.com>
Subject: Re: [PATCH 2/6] [RFC] Create the .relink file_operation

On Wed, Sep 29, 2010 at 04:19:31PM -0400, Oren Laadan wrote:
> 
> 
> On 09/23/2010 05:53 PM, Matt Helsley wrote:
> >Not all filesystems will necessarily be able to support relinking an
> >orphan inode back into the filesystem. Some offlist feedback suggested
> >that instead of overloading .link that relinking should be a separate
> >file operation for this reason.
> >
> >Since .relink is a superset of .link make the VFS call .relink where
> >possible and .link otherwise.
> >
> >The next commit will change ext3/4 to enable this operation.
> >
> >Signed-off-by: Matt Helsley<matthltc@...ibm.com>
> >Cc: Theodore Ts'o<tytso@....edu>
> >Cc: Andreas Dilger<adilger.kernel@...ger.ca>
> >Cc: Jan Kara<jack@...e.cz>
> >Cc: linux-fsdevel@...r.kernel.org
> >Cc: linux-ext4@...r.kernel.org
> >Cc: Al Viro<viro@...iv.linux.org.uk>
> >---
> >  fs/namei.c         |    5 ++++-
> >  include/linux/fs.h |    1 +
> >  2 files changed, 5 insertions(+), 1 deletions(-)
> >
> >diff --git a/fs/namei.c b/fs/namei.c
> >index a7dce91..eb279e3 100644
> >--- a/fs/namei.c
> >+++ b/fs/namei.c
> >@@ -2446,7 +2446,10 @@ int vfs_link(struct dentry *old_dentry, struct inode *dir, struct dentry *new_de
> >  		return error;
> >
> >  	mutex_lock(&inode->i_mutex);
> >-	error = dir->i_op->link(old_dentry, dir, new_dentry);
> >+	if (dir->i_op->relink)
> >+		error = dir->i_op->relink(old_dentry, dir, new_dentry);
> >+	else
> >+		error = dir->i_op->link(old_dentry, dir, new_dentry);
> 
> Can there be a scenario/filesystem in which .relink implementation
> is so much more complex (and expensive) than .link ?
> 
> If the answer is "yes", then this we probably don't want to do
> this, and let vfs_link() call .link, and instead add a new helper
> vfs_relink().

OK, that makes some sense too. I thought the separation would
just be at the file operations layer but we can move it higher too.

I'll adjust the patches to do that and repost them.

Cheers,
	-Matt
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ