* [GIT PULL -mm] Unionfs/eCryptfs cleanups
@ 2007-02-17 8:56 Josef 'Jeff' Sipek
2007-02-17 8:56 ` [PATCH 1/2] eCryptfs: convert lookup_one_len() to lookup_one_len_nd() Josef 'Jeff' Sipek
2007-02-17 8:56 ` [PATCH 2/2] fs/unionfs/: Remove unused structure members & macros Josef 'Jeff' Sipek
0 siblings, 2 replies; 5+ messages in thread
From: Josef 'Jeff' Sipek @ 2007-02-17 8:56 UTC (permalink / raw)
To: linux-kernel, linux-fsdevel; +Cc: akpm
You can pull from 'master' branch of
git://git.kernel.org/pub/scm/linux/kernel/git/jsipek/unionfs.git
to receive the following:
Josef 'Jeff' Sipek (1):
fs/unionfs/: Remove unused structure members & macros
Michael Halcrow (1):
eCryptfs: convert lookup_one_len() to lookup_one_len_nd()
fs/ecryptfs/inode.c | 10 ++++++++--
fs/unionfs/union.h | 9 ---------
2 files changed, 8 insertions(+), 11 deletions(-)
Josef 'Jeff' Sipek.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/2] eCryptfs: convert lookup_one_len() to lookup_one_len_nd()
2007-02-17 8:56 [GIT PULL -mm] Unionfs/eCryptfs cleanups Josef 'Jeff' Sipek
@ 2007-02-17 8:56 ` Josef 'Jeff' Sipek
2007-03-09 9:40 ` Christoph Hellwig
2007-02-17 8:56 ` [PATCH 2/2] fs/unionfs/: Remove unused structure members & macros Josef 'Jeff' Sipek
1 sibling, 1 reply; 5+ messages in thread
From: Josef 'Jeff' Sipek @ 2007-02-17 8:56 UTC (permalink / raw)
To: linux-kernel, linux-fsdevel
Cc: akpm, Michael Halcrow, Josef 'Jeff' Sipek
From: Michael Halcrow <mhalcrow@us.ibm.com>
Call the new lookup_one_len_nd() rather than lookup_one_len(). This fixes an
oops when stacked on NFS.
Note that there are still some issues with eCryptfs on NFS having to do with
directory deletion (I'm not getting an oops, just an -EBUSY).
Signed-off-by: Michael Halcrow <mhalcrow@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Josef 'Jeff' Sipek <jsipek@cs.sunysb.edu>
---
fs/ecryptfs/inode.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/fs/ecryptfs/inode.c b/fs/ecryptfs/inode.c
index 11f5e50..4c3d786 100644
--- a/fs/ecryptfs/inode.c
+++ b/fs/ecryptfs/inode.c
@@ -283,7 +283,9 @@ static struct dentry *ecryptfs_lookup(struct inode *dir, struct dentry *dentry,
int rc = 0;
struct dentry *lower_dir_dentry;
struct dentry *lower_dentry;
+ struct dentry *dentry_save;
struct vfsmount *lower_mnt;
+ struct vfsmount *mnt_save;
char *encoded_name;
unsigned int encoded_namelen;
struct ecryptfs_crypt_stat *crypt_stat = NULL;
@@ -310,9 +312,13 @@ static struct dentry *ecryptfs_lookup(struct inode *dir, struct dentry *dentry,
}
ecryptfs_printk(KERN_DEBUG, "encoded_name = [%s]; encoded_namelen "
"= [%d]\n", encoded_name, encoded_namelen);
- lower_dentry = lookup_one_len(encoded_name, lower_dir_dentry,
- encoded_namelen - 1);
+ dentry_save = nd->dentry;
+ mnt_save = nd->mnt;
+ lower_dentry = lookup_one_len_nd(encoded_name, lower_dir_dentry,
+ (encoded_namelen - 1), nd);
kfree(encoded_name);
+ nd->mnt = mnt_save;
+ nd->dentry = dentry_save;
if (IS_ERR(lower_dentry)) {
ecryptfs_printk(KERN_ERR, "ERR from lower_dentry\n");
rc = PTR_ERR(lower_dentry);
--
1.5.0.19.gddff
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/2] fs/unionfs/: Remove unused structure members & macros
2007-02-17 8:56 [GIT PULL -mm] Unionfs/eCryptfs cleanups Josef 'Jeff' Sipek
2007-02-17 8:56 ` [PATCH 1/2] eCryptfs: convert lookup_one_len() to lookup_one_len_nd() Josef 'Jeff' Sipek
@ 2007-02-17 8:56 ` Josef 'Jeff' Sipek
1 sibling, 0 replies; 5+ messages in thread
From: Josef 'Jeff' Sipek @ 2007-02-17 8:56 UTC (permalink / raw)
To: linux-kernel, linux-fsdevel; +Cc: akpm, Josef 'Jeff' Sipek
This patch removes:
- hidden_mnt pointer from struct unionfs_data
- mount_flag from struct unionfs_sb_info
- mount_flag related macros
Signed-off-by: Josef 'Jeff' Sipek <jsipek@cs.sunysb.edu>
---
fs/unionfs/union.h | 9 ---------
1 files changed, 0 insertions(+), 9 deletions(-)
diff --git a/fs/unionfs/union.h b/fs/unionfs/union.h
index fc87b03..60276c7 100644
--- a/fs/unionfs/union.h
+++ b/fs/unionfs/union.h
@@ -54,9 +54,6 @@
/* unionfs root inode number */
#define UNIONFS_ROOT_INO 1
-/* Mount time flags */
-#define MOUNT_FLAG(sb) (UNIONFS_SB(sb)->mount_flag)
-
/* number of characters while generating unique temporary file names */
#define UNIONFS_TMPNAM_LEN 12
@@ -124,7 +121,6 @@ struct unionfs_dentry_info {
/* These are the pointers to our various objects. */
struct unionfs_data {
struct super_block *sb;
- struct vfsmount *hidden_mnt;
atomic_t sbcount;
int branchperms;
};
@@ -134,7 +130,6 @@ struct unionfs_sb_info {
int bend;
atomic_t generation;
- unsigned long mount_flag;
struct rw_semaphore rwsem;
struct unionfs_data *data;
@@ -341,8 +336,6 @@ static inline int d_deleted(struct dentry *d)
struct dentry *unionfs_lookup_backend(struct dentry *dentry, struct nameidata *nd, int lookupmode);
-#define IS_SET(sb, check_flag) ((check_flag) & MOUNT_FLAG(sb))
-
/* unionfs_permission, check if we should bypass error to facilitate copyup */
#define IS_COPYUP_ERR(err) ((err) == -EROFS)
@@ -405,8 +398,6 @@ static inline int is_robranch(const struct dentry *dentry)
#define UNIONFS_DIR_OPAQUE_NAME "__dir_opaque"
#define UNIONFS_DIR_OPAQUE UNIONFS_WHPFX UNIONFS_DIR_OPAQUE_NAME
-#define VALID_MOUNT_FLAGS (0)
-
#ifndef DEFAULT_POLLMASK
#define DEFAULT_POLLMASK (POLLIN | POLLOUT | POLLRDNORM | POLLWRNORM)
#endif
--
1.5.0.19.gddff
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] eCryptfs: convert lookup_one_len() to lookup_one_len_nd()
2007-02-17 8:56 ` [PATCH 1/2] eCryptfs: convert lookup_one_len() to lookup_one_len_nd() Josef 'Jeff' Sipek
@ 2007-03-09 9:40 ` Christoph Hellwig
2007-03-09 16:34 ` Josef Sipek
0 siblings, 1 reply; 5+ messages in thread
From: Christoph Hellwig @ 2007-03-09 9:40 UTC (permalink / raw)
To: Josef 'Jeff' Sipek
Cc: linux-kernel, linux-fsdevel, akpm, Michael Halcrow
On Sat, Feb 17, 2007 at 03:56:55AM -0500, Josef 'Jeff' Sipek wrote:
> From: Michael Halcrow <mhalcrow@us.ibm.com>
>
> Call the new lookup_one_len_nd() rather than lookup_one_len(). This fixes an
> oops when stacked on NFS.
>
> Note that there are still some issues with eCryptfs on NFS having to do with
> directory deletion (I'm not getting an oops, just an -EBUSY).
Biug NACK here. This is just working around the broken lookup intents
code. lookup_one_len still is a hack for some network filesystems that
unfortunately grew a few too many users.
There is a valid case for in-kernel lookups from an arbitrary point,
but lookup_one_len* is the wrong API for this. The righ API for that
is a variant of path?lookup that takes a vfsmount + dentry pair.
Implementing this might be a good idea anyway to clean up the mess
do_path_lookup is currently.
>
> Signed-off-by: Michael Halcrow <mhalcrow@us.ibm.com>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> Signed-off-by: Josef 'Jeff' Sipek <jsipek@cs.sunysb.edu>
> ---
> fs/ecryptfs/inode.c | 10 ++++++++--
> 1 files changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/fs/ecryptfs/inode.c b/fs/ecryptfs/inode.c
> index 11f5e50..4c3d786 100644
> --- a/fs/ecryptfs/inode.c
> +++ b/fs/ecryptfs/inode.c
> @@ -283,7 +283,9 @@ static struct dentry *ecryptfs_lookup(struct inode *dir, struct dentry *dentry,
> int rc = 0;
> struct dentry *lower_dir_dentry;
> struct dentry *lower_dentry;
> + struct dentry *dentry_save;
> struct vfsmount *lower_mnt;
> + struct vfsmount *mnt_save;
> char *encoded_name;
> unsigned int encoded_namelen;
> struct ecryptfs_crypt_stat *crypt_stat = NULL;
> @@ -310,9 +312,13 @@ static struct dentry *ecryptfs_lookup(struct inode *dir, struct dentry *dentry,
> }
> ecryptfs_printk(KERN_DEBUG, "encoded_name = [%s]; encoded_namelen "
> "= [%d]\n", encoded_name, encoded_namelen);
> - lower_dentry = lookup_one_len(encoded_name, lower_dir_dentry,
> - encoded_namelen - 1);
> + dentry_save = nd->dentry;
> + mnt_save = nd->mnt;
> + lower_dentry = lookup_one_len_nd(encoded_name, lower_dir_dentry,
> + (encoded_namelen - 1), nd);
> kfree(encoded_name);
> + nd->mnt = mnt_save;
> + nd->dentry = dentry_save;
> if (IS_ERR(lower_dentry)) {
> ecryptfs_printk(KERN_ERR, "ERR from lower_dentry\n");
> rc = PTR_ERR(lower_dentry);
> --
> 1.5.0.19.gddff
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
---end quoted text---
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] eCryptfs: convert lookup_one_len() to lookup_one_len_nd()
2007-03-09 9:40 ` Christoph Hellwig
@ 2007-03-09 16:34 ` Josef Sipek
0 siblings, 0 replies; 5+ messages in thread
From: Josef Sipek @ 2007-03-09 16:34 UTC (permalink / raw)
To: Christoph Hellwig, linux-kernel, linux-fsdevel, akpm,
Michael Halcrow
On Fri, Mar 09, 2007 at 09:40:00AM +0000, Christoph Hellwig wrote:
> On Sat, Feb 17, 2007 at 03:56:55AM -0500, Josef 'Jeff' Sipek wrote:
> > From: Michael Halcrow <mhalcrow@us.ibm.com>
> >
> > Call the new lookup_one_len_nd() rather than lookup_one_len(). This fixes an
> > oops when stacked on NFS.
> >
> > Note that there are still some issues with eCryptfs on NFS having to do with
> > directory deletion (I'm not getting an oops, just an -EBUSY).
>
> Biug NACK here. This is just working around the broken lookup intents
> code. lookup_one_len still is a hack for some network filesystems that
> unfortunately grew a few too many users.
I'm working on the 4-th case to do_path_lookup. The only problem left, is
the negative dentries. do_path_lookup returns -ENOENT. Which would means
that we need either a wrapper that returns the negative dentry instead of
> Implementing this might be a good idea anyway to clean up the mess
> do_path_lookup is currently.
Clean up? There are 4 (including the new case) "setup" cases, and then the
actual lookup happens. You'll need the crazy if conditions unless the mening
of the arguments changes.
Josef "Jeff" Sipek.
--
UNIX is user-friendly ... it's just selective about who it's friends are
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2007-03-09 16:41 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-02-17 8:56 [GIT PULL -mm] Unionfs/eCryptfs cleanups Josef 'Jeff' Sipek
2007-02-17 8:56 ` [PATCH 1/2] eCryptfs: convert lookup_one_len() to lookup_one_len_nd() Josef 'Jeff' Sipek
2007-03-09 9:40 ` Christoph Hellwig
2007-03-09 16:34 ` Josef Sipek
2007-02-17 8:56 ` [PATCH 2/2] fs/unionfs/: Remove unused structure members & macros Josef 'Jeff' Sipek
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).