Re: Distributed storage. Security attributes and ducumentation update.

2007-09-21 Thread Pavel Machek
Hi! > I'm pleased to announce third release of the distributed storage > subsystem, which allows to form a storage on top of remote and local > nodes, which in turn can be exported to another storage as a node to > form tree-like storages. How is this different from raid0/1 over nbd? Or raid0/1 o

Re: [Ecryptfs-devel] [PATCH 3/11] eCryptfs: read_write.c routines

2007-09-21 Thread Andrew Morton
On Fri, 21 Sep 2007 16:51:25 -0500 Michael Halcrow <[EMAIL PROTECTED]> wrote: > On Wed, Sep 19, 2007 at 10:38:50PM -0700, Andrew Morton wrote: > > > + virt = kmap(page_for_lower); > > > + rc = ecryptfs_write_lower(ecryptfs_inode, virt, offset, size); > > > + kunmap(page_for_lower); > > > + return

Re: [Ecryptfs-devel] [PATCH 3/11] eCryptfs: read_write.c routines

2007-09-21 Thread Michael Halcrow
On Wed, Sep 19, 2007 at 10:38:50PM -0700, Andrew Morton wrote: > > + virt = kmap(page_for_lower); > > + rc = ecryptfs_write_lower(ecryptfs_inode, virt, offset, size); > > + kunmap(page_for_lower); > > + return rc; > > +} > > argh, kmap. http://lkml.org/lkml/2007/9/15/55 Here is a patch t

Re: [patch 3/5] VFS: pass open file to ->xattr()

2007-09-21 Thread Miklos Szeredi
> > What I'm saying is that read and write are _no_more_ related to the > > file than fstat. Read/write operate on inode data, fstat operates on > > inode metadata. > > The read and write operations are DEFINITELY related to the file descriptor > because of f_pos. Each process opening the same f

Re: [patch 2/5] VFS: pass open file to ->getattr()

2007-09-21 Thread Miklos Szeredi
> On Sep 21, 2007 14:23 +0200, Miklos Szeredi wrote: > > @@ -1212,7 +1212,8 @@ struct inode_operations { > > - int (*getattr) (struct vfsmount *mnt, struct dentry *, struct kstat *); > > + int (*getattr) (struct vfsmount *mnt, struct dentry *, struct kstat *, > > + struct fil

Re: [00/41] Large Blocksize Support V7 (adds memmap support)

2007-09-21 Thread Hugh Dickins
On Thu, 20 Sep 2007, Christoph Lameter wrote: > On Thu, 20 Sep 2007, David Chinner wrote: > > > Disagree, the mmap side is not a little change. > > > > That's not in the filesystem, though. ;) > > And its really only a minimal change for some function to loop over all > 4k pages and elsewhere in

Re: [patch 4/5] VFS: allow filesystems to implement atomic open+truncate

2007-09-21 Thread Andreas Dilger
On Sep 21, 2007 14:23 +0200, Miklos Szeredi wrote: > Add a new attribute flag ATTR_OPEN, with the meaning: "truncation was > initiated by open() due to the O_TRUNC flag". > > This way filesystems wanting to implement truncation within their > ->open() method can ignore such truncate requests. Th

Re: [patch 3/5] VFS: pass open file to ->xattr()

2007-09-21 Thread Andreas Dilger
On Sep 21, 2007 16:59 +0200, Miklos Szeredi wrote: > What I'm saying is that read and write are _no_more_ related to the > file than fstat. Read/write operate on inode data, fstat operates on > inode metadata. The read and write operations are DEFINITELY related to the file descriptor because of

Re: [patch 3/5] VFS: pass open file to ->xattr()

2007-09-21 Thread Andreas Dilger
On Sep 21, 2007 14:23 +0200, Miklos Szeredi wrote: > @@ -1214,10 +1214,12 @@ struct inode_operations { > + int (*setxattr) (struct dentry *, const char *,const void *,size_t,int, > + struct file *); > + ssize_t (*getxattr) (struct dentry *, const char *, void *, size_t

Re: [patch 2/5] VFS: pass open file to ->getattr()

2007-09-21 Thread Andreas Dilger
On Sep 21, 2007 14:23 +0200, Miklos Szeredi wrote: > @@ -1212,7 +1212,8 @@ struct inode_operations { > - int (*getattr) (struct vfsmount *mnt, struct dentry *, struct kstat *); > + int (*getattr) (struct vfsmount *mnt, struct dentry *, struct kstat *, > + struct file *f

Re: [patch 5/5] VFS: allow filesystem to override mknod capability checks

2007-09-21 Thread Miklos Szeredi
> On Fri, Sep 21, 2007 at 04:48:58PM +0200, Miklos Szeredi wrote: > > Ah, OK. Well, that's what fuse would do with the above change. So > > you are basically saying, the change is OK, but we want proper > > unprivileged mounts first. > > Yes, that and that it should be a mount flag, not a file_s

Re: [patch 3/5] VFS: pass open file to ->xattr()

2007-09-21 Thread Miklos Szeredi
> On Fri, Sep 21, 2007 at 10:32:31AM -0400, Trond Myklebust wrote: > > On Fri, 2007-09-21 at 15:16 +0200, Miklos Szeredi wrote: > > > > > > ftruncate is a special case due to O_TRUNC. > > > > > > No, it's special, because it does not do permission checking, while > > > truncate() does. > > > > S

Re: [patch 5/5] VFS: allow filesystem to override mknod capability checks

2007-09-21 Thread Christoph Hellwig
On Fri, Sep 21, 2007 at 04:48:58PM +0200, Miklos Szeredi wrote: > Ah, OK. Well, that's what fuse would do with the above change. So > you are basically saying, the change is OK, but we want proper > unprivileged mounts first. Yes, that and that it should be a mount flag, not a file_system_type f

Re: [patch 5/5] VFS: allow filesystem to override mknod capability checks

2007-09-21 Thread Miklos Szeredi
> On Fri, Sep 21, 2007 at 03:18:33PM +0200, Miklos Szeredi wrote: > > > That's something that shouldn't be solved in the filesystem, but rather > > > through exact semantics of unprivilegued mounts. Given that an > > > unprivilegued implies ignoring the device files we can easily allow > > > users

Re: [patch 3/5] VFS: pass open file to ->xattr()

2007-09-21 Thread Miklos Szeredi
> > > ftruncate is a special case due to O_TRUNC. > > > > No, it's special, because it does not do permission checking, while > > truncate() does. > > So why not just add file->f_op->ftruncate() and file->f_op->fstat()? Sure, we could add those. I'm not sure it's worth adding new file operation

Re: [patch 3/5] VFS: pass open file to ->xattr()

2007-09-21 Thread Christoph Hellwig
On Fri, Sep 21, 2007 at 10:32:31AM -0400, Trond Myklebust wrote: > On Fri, 2007-09-21 at 15:16 +0200, Miklos Szeredi wrote: > > > > ftruncate is a special case due to O_TRUNC. > > > > No, it's special, because it does not do permission checking, while > > truncate() does. > > So why not just add

Re: [patch 5/5] VFS: allow filesystem to override mknod capability checks

2007-09-21 Thread Christoph Hellwig
On Fri, Sep 21, 2007 at 03:18:33PM +0200, Miklos Szeredi wrote: > > That's something that shouldn't be solved in the filesystem, but rather > > through exact semantics of unprivilegued mounts. Given that an > > unprivilegued implies ignoring the device files we can easily allow > > users to create

Re: [patch 3/5] VFS: pass open file to ->xattr()

2007-09-21 Thread Trond Myklebust
On Fri, 2007-09-21 at 15:16 +0200, Miklos Szeredi wrote: > > ftruncate is a special case due to O_TRUNC. > > No, it's special, because it does not do permission checking, while > truncate() does. So why not just add file->f_op->ftruncate() and file->f_op->fstat()? Most filesystems can trivially

Re: [patch 5/5] VFS: allow filesystem to override mknod capability checks

2007-09-21 Thread Miklos Szeredi
> > Take this example: I've loopback mounted an UML disk image using fuse > > (no privileges required), and want to create some device nodes. I > > can't yet boot the UML because the device node is missing from the > > image. So what should I do. Currently I have to manipulate the > > mounted im

Re: [patch 3/5] VFS: pass open file to ->xattr()

2007-09-21 Thread Miklos Szeredi
> > I don't think it's silly. Read/write get passed the file descriptor, > > and it makes a lot of sense, if the filesystem has stateful opens. > > > > Similarly for any fs operation that gets a file descriptor, it makes > > sense to pass the relevant open file down into the filesystem. > > read

Re: [patch 5/5] VFS: allow filesystem to override mknod capability checks

2007-09-21 Thread Christoph Hellwig
On Fri, Sep 21, 2007 at 03:10:26PM +0200, Miklos Szeredi wrote: > Take this example: I've loopback mounted an UML disk image using fuse > (no privileges required), and want to create some device nodes. I > can't yet boot the UML because the device node is missing from the > image. So what should

Re: [patch 5/5] VFS: allow filesystem to override mknod capability checks

2007-09-21 Thread Miklos Szeredi
> > From: Miklos Szeredi <[EMAIL PROTECTED]> > > > > Add a new filesystem flag, that results in the VFS not checking if the > > current process has enough privileges to do an mknod(). > > > > This is needed on filesystems, where an unprivileged user may be able > > to create a device node, withou

Re: [patch 3/5] VFS: pass open file to ->xattr()

2007-09-21 Thread Christoph Hellwig
On Fri, Sep 21, 2007 at 03:00:06PM +0200, Miklos Szeredi wrote: > I don't think it's silly. Read/write get passed the file descriptor, > and it makes a lot of sense, if the filesystem has stateful opens. > > Similarly for any fs operation that gets a file descriptor, it makes > sense to pass the

Re: [patch 4/5] VFS: allow filesystems to implement atomic open+truncate

2007-09-21 Thread Miklos Szeredi
> > From: Miklos Szeredi <[EMAIL PROTECTED]> > > > > Add a new attribute flag ATTR_OPEN, with the meaning: "truncation was > > initiated by open() due to the O_TRUNC flag". > > > > This way filesystems wanting to implement truncation within their > > ->open() method can ignore such truncate reque

Re: [patch 3/5] VFS: pass open file to ->xattr()

2007-09-21 Thread Miklos Szeredi
> On Fri, Sep 21, 2007 at 02:23:46PM +0200, Miklos Szeredi wrote: > > From: Miklos Szeredi <[EMAIL PROTECTED]> > > > > Pass the open file into the filesystem's *xattr() methods. > > > > This is needed to be able to correctly implement open-unlink-f*xattr > > semantics, without having to resort to

Re: [patch 5/5] VFS: allow filesystem to override mknod capability checks

2007-09-21 Thread Christoph Hellwig
On Fri, Sep 21, 2007 at 02:23:48PM +0200, Miklos Szeredi wrote: > From: Miklos Szeredi <[EMAIL PROTECTED]> > > Add a new filesystem flag, that results in the VFS not checking if the > current process has enough privileges to do an mknod(). > > This is needed on filesystems, where an unprivileged

Re: [patch 4/5] VFS: allow filesystems to implement atomic open+truncate

2007-09-21 Thread Christoph Hellwig
On Fri, Sep 21, 2007 at 02:23:47PM +0200, Miklos Szeredi wrote: > From: Miklos Szeredi <[EMAIL PROTECTED]> > > Add a new attribute flag ATTR_OPEN, with the meaning: "truncation was > initiated by open() due to the O_TRUNC flag". > > This way filesystems wanting to implement truncation within thei

Re: [patch 3/5] VFS: pass open file to ->xattr()

2007-09-21 Thread Christoph Hellwig
On Fri, Sep 21, 2007 at 02:23:46PM +0200, Miklos Szeredi wrote: > From: Miklos Szeredi <[EMAIL PROTECTED]> > > Pass the open file into the filesystem's *xattr() methods. > > This is needed to be able to correctly implement open-unlink-f*xattr > semantics, without having to resort to "silly-renami

[patch 2/5] VFS: pass open file to ->getattr()

2007-09-21 Thread Miklos Szeredi
From: Miklos Szeredi <[EMAIL PROTECTED]> Pass the open file into the filesystem's ->getattr() method for fstat(). This is needed to be able to correctly implement open-unlink-fstat semantics in some filesystem such as sshfs, without having to resort to "silly-renaming". Do this by adding a 'stru

[patch 1/5] VFS: pass open file to ->setattr()

2007-09-21 Thread Miklos Szeredi
From: Miklos Szeredi <[EMAIL PROTECTED]> Pass the open file into the filesystem's ->setattr() method for fchmod, fchown and some of the utimes variants. This is needed to be able to correctly implement open-unlink-fsetattr semantics in some filesystem such as sshfs, without having to resort to "s

[patch 4/5] VFS: allow filesystems to implement atomic open+truncate

2007-09-21 Thread Miklos Szeredi
From: Miklos Szeredi <[EMAIL PROTECTED]> Add a new attribute flag ATTR_OPEN, with the meaning: "truncation was initiated by open() due to the O_TRUNC flag". This way filesystems wanting to implement truncation within their ->open() method can ignore such truncate requests. This is a quick & dirt

[patch 3/5] VFS: pass open file to ->xattr()

2007-09-21 Thread Miklos Szeredi
From: Miklos Szeredi <[EMAIL PROTECTED]> Pass the open file into the filesystem's *xattr() methods. This is needed to be able to correctly implement open-unlink-f*xattr semantics, without having to resort to "silly-renaming". Do this by adding a 'struct file *' parameter to i_op->*xattr(). For

[patch 5/5] VFS: allow filesystem to override mknod capability checks

2007-09-21 Thread Miklos Szeredi
From: Miklos Szeredi <[EMAIL PROTECTED]> Add a new filesystem flag, that results in the VFS not checking if the current process has enough privileges to do an mknod(). This is needed on filesystems, where an unprivileged user may be able to create a device node, without causing security problems.

[patch 0/5] VFS changes

2007-09-21 Thread Miklos Szeredi
Hi, Here's a bunch a VFS interface changes that are needed to implement some FUSE features. The biggest part is patches 1-3, which pass the open file to the filesystem for syscalls passed an file descriptor, such as fstat(), fchmod(), etc... These patches touch a lot of filesystems, but otherwis

Re: [PATCH 02/18] exportfs: add new methods

2007-09-21 Thread Christoph Hellwig
On Thu, Sep 20, 2007 at 05:18:40PM -0700, Andrew Morton wrote: > On Wed, 19 Sep 2007 18:30:25 +0200 > Christoph Hellwig <[EMAIL PROTECTED]> wrote: > > > + /* > > +* It's not a directory. Life is a little more complicated. > > +*/ > > + struct dentry *ta