Re: [patch 4/8] fs, exportfs: Add export_encode_inode_fh helper

2012-08-23 Thread Cyrill Gorcunov
On Thu, Aug 23, 2012 at 10:54:44AM +0200, Marco Stornelli wrote: > >>For brtfs > >> > >>objectid = fid->objectid; > >>root_objectid = fid->root_objectid; > >>generation = fid->gen; > >> > >>return btrfs_get_dentry(sb, objectid, root_objectid, generation, 1); > > > >For btrfs it

Re: [patch 4/8] fs, exportfs: Add export_encode_inode_fh helper

2012-08-23 Thread Marco Stornelli
Il 23/08/2012 10:06, Cyrill Gorcunov ha scritto: On Wed, Aug 22, 2012 at 11:19:07AM +0530, Aneesh Kumar K.V wrote: Pavel Emelyanov writes: Why? For e.g. ext4 you can construct a handle in userspace and open by it. open_by_handle use exportfs_decode_fh which use file system specific

Re: [patch 4/8] fs, exportfs: Add export_encode_inode_fh helper

2012-08-23 Thread Cyrill Gorcunov
On Wed, Aug 22, 2012 at 11:19:07AM +0530, Aneesh Kumar K.V wrote: > Pavel Emelyanov writes: > > > Why? For e.g. ext4 you can construct a handle in userspace and open by > > it. > > open_by_handle use exportfs_decode_fh which use file system specific > fh_to_dentry > > foe ext4 we require a

Re: [patch 4/8] fs, exportfs: Add export_encode_inode_fh helper

2012-08-23 Thread Cyrill Gorcunov
On Wed, Aug 22, 2012 at 11:19:07AM +0530, Aneesh Kumar K.V wrote: Pavel Emelyanov xe...@parallels.com writes: Why? For e.g. ext4 you can construct a handle in userspace and open by it. open_by_handle use exportfs_decode_fh which use file system specific fh_to_dentry foe ext4 we

Re: [patch 4/8] fs, exportfs: Add export_encode_inode_fh helper

2012-08-23 Thread Marco Stornelli
Il 23/08/2012 10:06, Cyrill Gorcunov ha scritto: On Wed, Aug 22, 2012 at 11:19:07AM +0530, Aneesh Kumar K.V wrote: Pavel Emelyanov xe...@parallels.com writes: Why? For e.g. ext4 you can construct a handle in userspace and open by it. open_by_handle use exportfs_decode_fh which use file

Re: [patch 4/8] fs, exportfs: Add export_encode_inode_fh helper

2012-08-23 Thread Cyrill Gorcunov
On Thu, Aug 23, 2012 at 10:54:44AM +0200, Marco Stornelli wrote: For brtfs objectid = fid-objectid; root_objectid = fid-root_objectid; generation = fid-gen; return btrfs_get_dentry(sb, objectid, root_objectid, generation, 1); For btrfs it become more complex. But still

Re: [patch 4/8] fs, exportfs: Add export_encode_inode_fh helper

2012-08-21 Thread Aneesh Kumar K.V
Pavel Emelyanov writes: > On 08/21/2012 02:42 PM, Aneesh Kumar K.V wrote: >> Pavel Emelyanov writes: >> >>> On 08/20/2012 11:32 PM, J. Bruce Fields wrote: On Mon, Aug 20, 2012 at 11:06:06PM +0400, Cyrill Gorcunov wrote: > On Mon, Aug 20, 2012 at 02:32:25PM -0400, J. Bruce Fields

Re: [patch 4/8] fs, exportfs: Add export_encode_inode_fh helper

2012-08-21 Thread Cyrill Gorcunov
On Tue, Aug 21, 2012 at 08:29:08AM -0400, J. Bruce Fields wrote: > > Initial problem -- we don't know what is being watched by an inotify fd. > > > > Having a dentry somewhere was the 1st attempt to solve this -- keep a path > > in inotify and show it when required. It doesn't work since holding

Re: [patch 4/8] fs, exportfs: Add export_encode_inode_fh helper

2012-08-21 Thread Al Viro
On Tue, Aug 21, 2012 at 03:51:36PM +0300, Boaz Harrosh wrote: > For the minority of FSs that do not have a filehandle support it should > be easy to generate a generic one, that should work 95% of the time. Great. Your task, then, is to show how to do that for sysfs. Or for nfs. Those should be

Re: [patch 4/8] fs, exportfs: Add export_encode_inode_fh helper

2012-08-21 Thread Boaz Harrosh
On 08/21/2012 03:59 PM, Pavel Emelyanov wrote: > On 08/21/2012 04:51 PM, Boaz Harrosh wrote: >> On 08/21/2012 03:29 PM, J. Bruce Fields wrote: >> <> > > Strictly speaking -- no we don't. Migration should to work across kernel > versions (from older to newer). Why kernel version matters in this

Re: [patch 4/8] fs, exportfs: Add export_encode_inode_fh helper

2012-08-21 Thread Pavel Emelyanov
On 08/21/2012 04:51 PM, Boaz Harrosh wrote: > On 08/21/2012 03:29 PM, J. Bruce Fields wrote: > <> > >> OK. So if you don't mind the fact that there are filesystems with >> inotify support but not filehandle support, then I think generating a >> filehandle early as you describe would work. I

Re: [patch 4/8] fs, exportfs: Add export_encode_inode_fh helper

2012-08-21 Thread Boaz Harrosh
On 08/21/2012 03:29 PM, J. Bruce Fields wrote: <> > OK. So if you don't mind the fact that there are filesystems with > inotify support but not filehandle support, then I think generating a > filehandle early as you describe would work. I guess it's a little more > memory per watched inode. >

Re: [patch 4/8] fs, exportfs: Add export_encode_inode_fh helper

2012-08-21 Thread Pavel Emelyanov
Al, Bruce, Aneesh, What if we calculate the handle at the time we do have struct path at hands (i.e. when we create the inotify) and store it on the inotify structure purely to be shown later in proc. Would that be acceptable? >>> >>> Was it the lack of a

Re: [patch 4/8] fs, exportfs: Add export_encode_inode_fh helper

2012-08-21 Thread J. Bruce Fields
On Tue, Aug 21, 2012 at 04:22:31PM +0400, Pavel Emelyanov wrote: > On 08/21/2012 04:11 PM, J. Bruce Fields wrote: > > On Tue, Aug 21, 2012 at 03:09:05PM +0400, Pavel Emelyanov wrote: > >> On 08/21/2012 02:54 PM, Cyrill Gorcunov wrote: > >>> On Tue, Aug 21, 2012 at 02:49:47PM +0400, Pavel Emelyanov

Re: [patch 4/8] fs, exportfs: Add export_encode_inode_fh helper

2012-08-21 Thread Pavel Emelyanov
On 08/21/2012 04:09 PM, J. Bruce Fields wrote: > On Tue, Aug 21, 2012 at 02:49:47PM +0400, Pavel Emelyanov wrote: >> On 08/21/2012 02:42 PM, Aneesh Kumar K.V wrote: >>> Pavel Emelyanov writes: >>> On 08/20/2012 11:32 PM, J. Bruce Fields wrote: > On Mon, Aug 20, 2012 at 11:06:06PM +0400,

Re: [patch 4/8] fs, exportfs: Add export_encode_inode_fh helper

2012-08-21 Thread Pavel Emelyanov
On 08/21/2012 04:11 PM, J. Bruce Fields wrote: > On Tue, Aug 21, 2012 at 03:09:05PM +0400, Pavel Emelyanov wrote: >> On 08/21/2012 02:54 PM, Cyrill Gorcunov wrote: >>> On Tue, Aug 21, 2012 at 02:49:47PM +0400, Pavel Emelyanov wrote: >> >> However, if you have some better ideas on what

Re: [patch 4/8] fs, exportfs: Add export_encode_inode_fh helper

2012-08-21 Thread J. Bruce Fields
On Tue, Aug 21, 2012 at 03:09:05PM +0400, Pavel Emelyanov wrote: > On 08/21/2012 02:54 PM, Cyrill Gorcunov wrote: > > On Tue, Aug 21, 2012 at 02:49:47PM +0400, Pavel Emelyanov wrote: > > However, if you have some better ideas on what information about inode > should be exported >

Re: [patch 4/8] fs, exportfs: Add export_encode_inode_fh helper

2012-08-21 Thread J. Bruce Fields
On Tue, Aug 21, 2012 at 02:49:47PM +0400, Pavel Emelyanov wrote: > On 08/21/2012 02:42 PM, Aneesh Kumar K.V wrote: > > Pavel Emelyanov writes: > > > >> On 08/20/2012 11:32 PM, J. Bruce Fields wrote: > >>> On Mon, Aug 20, 2012 at 11:06:06PM +0400, Cyrill Gorcunov wrote: > On Mon, Aug 20,

Re: [patch 4/8] fs, exportfs: Add export_encode_inode_fh helper

2012-08-21 Thread Pavel Emelyanov
On 08/21/2012 02:54 PM, Cyrill Gorcunov wrote: > On Tue, Aug 21, 2012 at 02:49:47PM +0400, Pavel Emelyanov wrote: However, if you have some better ideas on what information about inode should be exported to the userspace please share. >>> >>> Why not use

Re: [patch 4/8] fs, exportfs: Add export_encode_inode_fh helper

2012-08-21 Thread Cyrill Gorcunov
On Tue, Aug 21, 2012 at 02:49:47PM +0400, Pavel Emelyanov wrote: > >> > >> However, if you have some better ideas on what information about inode > >> should be exported > >> to the userspace please share. > >> > > > > Why not use name_to_handle(fd,...) and open_by_handle(handle,..) ? > >

Re: [patch 4/8] fs, exportfs: Add export_encode_inode_fh helper

2012-08-21 Thread Pavel Emelyanov
On 08/21/2012 02:42 PM, Aneesh Kumar K.V wrote: > Pavel Emelyanov writes: > >> On 08/20/2012 11:32 PM, J. Bruce Fields wrote: >>> On Mon, Aug 20, 2012 at 11:06:06PM +0400, Cyrill Gorcunov wrote: On Mon, Aug 20, 2012 at 02:32:25PM -0400, J. Bruce Fields wrote: > On Mon, Aug 20, 2012 at

Re: [patch 4/8] fs, exportfs: Add export_encode_inode_fh helper

2012-08-21 Thread Aneesh Kumar K.V
Pavel Emelyanov writes: > On 08/20/2012 11:32 PM, J. Bruce Fields wrote: >> On Mon, Aug 20, 2012 at 11:06:06PM +0400, Cyrill Gorcunov wrote: >>> On Mon, Aug 20, 2012 at 02:32:25PM -0400, J. Bruce Fields wrote: On Mon, Aug 20, 2012 at 08:33:38PM +0400, Cyrill Gorcunov wrote: > On Mon,

Re: [patch 4/8] fs, exportfs: Add export_encode_inode_fh helper

2012-08-21 Thread Pavel Emelyanov
On 08/20/2012 11:32 PM, J. Bruce Fields wrote: > On Mon, Aug 20, 2012 at 11:06:06PM +0400, Cyrill Gorcunov wrote: >> On Mon, Aug 20, 2012 at 02:32:25PM -0400, J. Bruce Fields wrote: >>> On Mon, Aug 20, 2012 at 08:33:38PM +0400, Cyrill Gorcunov wrote: On Mon, Aug 20, 2012 at 07:49:23PM +0530,

Re: [patch 4/8] fs, exportfs: Add export_encode_inode_fh helper

2012-08-21 Thread Aneesh Kumar K.V
Pavel Emelyanov xe...@parallels.com writes: On 08/21/2012 02:42 PM, Aneesh Kumar K.V wrote: Pavel Emelyanov xe...@parallels.com writes: On 08/20/2012 11:32 PM, J. Bruce Fields wrote: On Mon, Aug 20, 2012 at 11:06:06PM +0400, Cyrill Gorcunov wrote: On Mon, Aug 20, 2012 at 02:32:25PM -0400,

Re: [patch 4/8] fs, exportfs: Add export_encode_inode_fh helper

2012-08-21 Thread Pavel Emelyanov
On 08/20/2012 11:32 PM, J. Bruce Fields wrote: On Mon, Aug 20, 2012 at 11:06:06PM +0400, Cyrill Gorcunov wrote: On Mon, Aug 20, 2012 at 02:32:25PM -0400, J. Bruce Fields wrote: On Mon, Aug 20, 2012 at 08:33:38PM +0400, Cyrill Gorcunov wrote: On Mon, Aug 20, 2012 at 07:49:23PM +0530, Aneesh

Re: [patch 4/8] fs, exportfs: Add export_encode_inode_fh helper

2012-08-21 Thread Aneesh Kumar K.V
Pavel Emelyanov xe...@parallels.com writes: On 08/20/2012 11:32 PM, J. Bruce Fields wrote: On Mon, Aug 20, 2012 at 11:06:06PM +0400, Cyrill Gorcunov wrote: On Mon, Aug 20, 2012 at 02:32:25PM -0400, J. Bruce Fields wrote: On Mon, Aug 20, 2012 at 08:33:38PM +0400, Cyrill Gorcunov wrote: On

Re: [patch 4/8] fs, exportfs: Add export_encode_inode_fh helper

2012-08-21 Thread Pavel Emelyanov
On 08/21/2012 02:42 PM, Aneesh Kumar K.V wrote: Pavel Emelyanov xe...@parallels.com writes: On 08/20/2012 11:32 PM, J. Bruce Fields wrote: On Mon, Aug 20, 2012 at 11:06:06PM +0400, Cyrill Gorcunov wrote: On Mon, Aug 20, 2012 at 02:32:25PM -0400, J. Bruce Fields wrote: On Mon, Aug 20, 2012

Re: [patch 4/8] fs, exportfs: Add export_encode_inode_fh helper

2012-08-21 Thread Cyrill Gorcunov
On Tue, Aug 21, 2012 at 02:49:47PM +0400, Pavel Emelyanov wrote: However, if you have some better ideas on what information about inode should be exported to the userspace please share. Why not use name_to_handle(fd,...) and open_by_handle(handle,..) ? Because we don't have an

Re: [patch 4/8] fs, exportfs: Add export_encode_inode_fh helper

2012-08-21 Thread Pavel Emelyanov
On 08/21/2012 02:54 PM, Cyrill Gorcunov wrote: On Tue, Aug 21, 2012 at 02:49:47PM +0400, Pavel Emelyanov wrote: However, if you have some better ideas on what information about inode should be exported to the userspace please share. Why not use name_to_handle(fd,...) and

Re: [patch 4/8] fs, exportfs: Add export_encode_inode_fh helper

2012-08-21 Thread J. Bruce Fields
On Tue, Aug 21, 2012 at 02:49:47PM +0400, Pavel Emelyanov wrote: On 08/21/2012 02:42 PM, Aneesh Kumar K.V wrote: Pavel Emelyanov xe...@parallels.com writes: On 08/20/2012 11:32 PM, J. Bruce Fields wrote: On Mon, Aug 20, 2012 at 11:06:06PM +0400, Cyrill Gorcunov wrote: On Mon, Aug 20,

Re: [patch 4/8] fs, exportfs: Add export_encode_inode_fh helper

2012-08-21 Thread J. Bruce Fields
On Tue, Aug 21, 2012 at 03:09:05PM +0400, Pavel Emelyanov wrote: On 08/21/2012 02:54 PM, Cyrill Gorcunov wrote: On Tue, Aug 21, 2012 at 02:49:47PM +0400, Pavel Emelyanov wrote: However, if you have some better ideas on what information about inode should be exported to the userspace

Re: [patch 4/8] fs, exportfs: Add export_encode_inode_fh helper

2012-08-21 Thread Pavel Emelyanov
On 08/21/2012 04:11 PM, J. Bruce Fields wrote: On Tue, Aug 21, 2012 at 03:09:05PM +0400, Pavel Emelyanov wrote: On 08/21/2012 02:54 PM, Cyrill Gorcunov wrote: On Tue, Aug 21, 2012 at 02:49:47PM +0400, Pavel Emelyanov wrote: However, if you have some better ideas on what information about

Re: [patch 4/8] fs, exportfs: Add export_encode_inode_fh helper

2012-08-21 Thread Pavel Emelyanov
On 08/21/2012 04:09 PM, J. Bruce Fields wrote: On Tue, Aug 21, 2012 at 02:49:47PM +0400, Pavel Emelyanov wrote: On 08/21/2012 02:42 PM, Aneesh Kumar K.V wrote: Pavel Emelyanov xe...@parallels.com writes: On 08/20/2012 11:32 PM, J. Bruce Fields wrote: On Mon, Aug 20, 2012 at 11:06:06PM +0400,

Re: [patch 4/8] fs, exportfs: Add export_encode_inode_fh helper

2012-08-21 Thread J. Bruce Fields
On Tue, Aug 21, 2012 at 04:22:31PM +0400, Pavel Emelyanov wrote: On 08/21/2012 04:11 PM, J. Bruce Fields wrote: On Tue, Aug 21, 2012 at 03:09:05PM +0400, Pavel Emelyanov wrote: On 08/21/2012 02:54 PM, Cyrill Gorcunov wrote: On Tue, Aug 21, 2012 at 02:49:47PM +0400, Pavel Emelyanov wrote:

Re: [patch 4/8] fs, exportfs: Add export_encode_inode_fh helper

2012-08-21 Thread Pavel Emelyanov
Al, Bruce, Aneesh, What if we calculate the handle at the time we do have struct path at hands (i.e. when we create the inotify) and store it on the inotify structure purely to be shown later in proc. Would that be acceptable? Was it the lack of a dentry that was really the problem? I

Re: [patch 4/8] fs, exportfs: Add export_encode_inode_fh helper

2012-08-21 Thread Boaz Harrosh
On 08/21/2012 03:29 PM, J. Bruce Fields wrote: OK. So if you don't mind the fact that there are filesystems with inotify support but not filehandle support, then I think generating a filehandle early as you describe would work. I guess it's a little more memory per watched inode. For

Re: [patch 4/8] fs, exportfs: Add export_encode_inode_fh helper

2012-08-21 Thread Pavel Emelyanov
On 08/21/2012 04:51 PM, Boaz Harrosh wrote: On 08/21/2012 03:29 PM, J. Bruce Fields wrote: OK. So if you don't mind the fact that there are filesystems with inotify support but not filehandle support, then I think generating a filehandle early as you describe would work. I guess it's a

Re: [patch 4/8] fs, exportfs: Add export_encode_inode_fh helper

2012-08-21 Thread Boaz Harrosh
On 08/21/2012 03:59 PM, Pavel Emelyanov wrote: On 08/21/2012 04:51 PM, Boaz Harrosh wrote: On 08/21/2012 03:29 PM, J. Bruce Fields wrote: Strictly speaking -- no we don't. Migration should to work across kernel versions (from older to newer). Why kernel version matters in this case? I

Re: [patch 4/8] fs, exportfs: Add export_encode_inode_fh helper

2012-08-21 Thread Al Viro
On Tue, Aug 21, 2012 at 03:51:36PM +0300, Boaz Harrosh wrote: For the minority of FSs that do not have a filehandle support it should be easy to generate a generic one, that should work 95% of the time. Great. Your task, then, is to show how to do that for sysfs. Or for nfs. Those should be

Re: [patch 4/8] fs, exportfs: Add export_encode_inode_fh helper

2012-08-21 Thread Cyrill Gorcunov
On Tue, Aug 21, 2012 at 08:29:08AM -0400, J. Bruce Fields wrote: Initial problem -- we don't know what is being watched by an inotify fd. Having a dentry somewhere was the 1st attempt to solve this -- keep a path in inotify and show it when required. It doesn't work since holding a ref on

Re: [patch 4/8] fs, exportfs: Add export_encode_inode_fh helper

2012-08-20 Thread Cyrill Gorcunov
On Mon, Aug 20, 2012 at 03:32:04PM -0400, J. Bruce Fields wrote: > > > > Hi, sorry for dealy. Well, the last idea is to get rid of this helper, > > > > I've sent out an updated version where ino+dev is only printed. > > > > > > I don't understand how ino and dev are useful to you, though, if

Re: [patch 4/8] fs, exportfs: Add export_encode_inode_fh helper

2012-08-20 Thread J. Bruce Fields
On Mon, Aug 20, 2012 at 11:06:06PM +0400, Cyrill Gorcunov wrote: > On Mon, Aug 20, 2012 at 02:32:25PM -0400, J. Bruce Fields wrote: > > On Mon, Aug 20, 2012 at 08:33:38PM +0400, Cyrill Gorcunov wrote: > > > On Mon, Aug 20, 2012 at 07:49:23PM +0530, Aneesh Kumar K.V wrote: > > > > Cyrill Gorcunov

Re: [patch 4/8] fs, exportfs: Add export_encode_inode_fh helper

2012-08-20 Thread Cyrill Gorcunov
On Mon, Aug 20, 2012 at 02:32:25PM -0400, J. Bruce Fields wrote: > On Mon, Aug 20, 2012 at 08:33:38PM +0400, Cyrill Gorcunov wrote: > > On Mon, Aug 20, 2012 at 07:49:23PM +0530, Aneesh Kumar K.V wrote: > > > Cyrill Gorcunov writes: > > > > > > > To provide fsnotify object inodes being watched

Re: [patch 4/8] fs, exportfs: Add export_encode_inode_fh helper

2012-08-20 Thread J. Bruce Fields
On Mon, Aug 20, 2012 at 08:33:38PM +0400, Cyrill Gorcunov wrote: > On Mon, Aug 20, 2012 at 07:49:23PM +0530, Aneesh Kumar K.V wrote: > > Cyrill Gorcunov writes: > > > > > To provide fsnotify object inodes being watched without > > > binding to alphabetical path we need to encode them with > > >

Re: [patch 4/8] fs, exportfs: Add export_encode_inode_fh helper

2012-08-20 Thread Cyrill Gorcunov
On Mon, Aug 20, 2012 at 07:49:23PM +0530, Aneesh Kumar K.V wrote: > Cyrill Gorcunov writes: > > > To provide fsnotify object inodes being watched without > > binding to alphabetical path we need to encode them with > > exportfs help. This patch adds a helper which operates > > with plain inodes

Re: [patch 4/8] fs, exportfs: Add export_encode_inode_fh helper

2012-08-20 Thread Aneesh Kumar K.V
Cyrill Gorcunov writes: > To provide fsnotify object inodes being watched without > binding to alphabetical path we need to encode them with > exportfs help. This patch adds a helper which operates > with plain inodes directly. doesn't name_to_handle_at() work for you ? It also allows to get a

Re: [patch 4/8] fs, exportfs: Add export_encode_inode_fh helper

2012-08-20 Thread Aneesh Kumar K.V
Cyrill Gorcunov gorcu...@openvz.org writes: To provide fsnotify object inodes being watched without binding to alphabetical path we need to encode them with exportfs help. This patch adds a helper which operates with plain inodes directly. doesn't name_to_handle_at() work for you ? It also

Re: [patch 4/8] fs, exportfs: Add export_encode_inode_fh helper

2012-08-20 Thread Cyrill Gorcunov
On Mon, Aug 20, 2012 at 07:49:23PM +0530, Aneesh Kumar K.V wrote: Cyrill Gorcunov gorcu...@openvz.org writes: To provide fsnotify object inodes being watched without binding to alphabetical path we need to encode them with exportfs help. This patch adds a helper which operates with

Re: [patch 4/8] fs, exportfs: Add export_encode_inode_fh helper

2012-08-20 Thread J. Bruce Fields
On Mon, Aug 20, 2012 at 08:33:38PM +0400, Cyrill Gorcunov wrote: On Mon, Aug 20, 2012 at 07:49:23PM +0530, Aneesh Kumar K.V wrote: Cyrill Gorcunov gorcu...@openvz.org writes: To provide fsnotify object inodes being watched without binding to alphabetical path we need to encode them

Re: [patch 4/8] fs, exportfs: Add export_encode_inode_fh helper

2012-08-20 Thread Cyrill Gorcunov
On Mon, Aug 20, 2012 at 02:32:25PM -0400, J. Bruce Fields wrote: On Mon, Aug 20, 2012 at 08:33:38PM +0400, Cyrill Gorcunov wrote: On Mon, Aug 20, 2012 at 07:49:23PM +0530, Aneesh Kumar K.V wrote: Cyrill Gorcunov gorcu...@openvz.org writes: To provide fsnotify object inodes being

Re: [patch 4/8] fs, exportfs: Add export_encode_inode_fh helper

2012-08-20 Thread J. Bruce Fields
On Mon, Aug 20, 2012 at 11:06:06PM +0400, Cyrill Gorcunov wrote: On Mon, Aug 20, 2012 at 02:32:25PM -0400, J. Bruce Fields wrote: On Mon, Aug 20, 2012 at 08:33:38PM +0400, Cyrill Gorcunov wrote: On Mon, Aug 20, 2012 at 07:49:23PM +0530, Aneesh Kumar K.V wrote: Cyrill Gorcunov

Re: [patch 4/8] fs, exportfs: Add export_encode_inode_fh helper

2012-08-20 Thread Cyrill Gorcunov
On Mon, Aug 20, 2012 at 03:32:04PM -0400, J. Bruce Fields wrote: Hi, sorry for dealy. Well, the last idea is to get rid of this helper, I've sent out an updated version where ino+dev is only printed. I don't understand how ino and dev are useful to you, though, if you're still

Re: [patch 4/8] fs, exportfs: Add export_encode_inode_fh helper

2012-08-17 Thread Eric W. Biederman
Al Viro writes: > On Thu, Aug 16, 2012 at 06:15:53PM +0400, Cyrill Gorcunov wrote: >> On Thu, Aug 16, 2012 at 02:03:00PM +, James Bottomley wrote: >> > > > What's wrong with saying "we don't support idiotify"? >> > > >> > > Al, we need some way to restore inotifies after checkpoint. >> > >

Re: [patch 4/8] fs, exportfs: Add export_encode_inode_fh helper

2012-08-17 Thread Eric W. Biederman
Al Viro v...@zeniv.linux.org.uk writes: On Thu, Aug 16, 2012 at 06:15:53PM +0400, Cyrill Gorcunov wrote: On Thu, Aug 16, 2012 at 02:03:00PM +, James Bottomley wrote: What's wrong with saying we don't support idiotify? Al, we need some way to restore inotifies after checkpoint.

Re: [patch 4/8] fs, exportfs: Add export_encode_inode_fh helper

2012-08-16 Thread Cyrill Gorcunov
On Thu, Aug 16, 2012 at 07:06:18PM +0400, Pavel Emelyanov wrote: > On 08/16/2012 06:55 PM, Al Viro wrote: > > On Thu, Aug 16, 2012 at 06:48:35PM +0400, Cyrill Gorcunov wrote: > > > >>> Good luck doing that with e.g. VFAT... And then there's such thing > >>> as filesystems that don't have

Re: [patch 4/8] fs, exportfs: Add export_encode_inode_fh helper

2012-08-16 Thread Cyrill Gorcunov
On Thu, Aug 16, 2012 at 04:05:42PM +0100, Al Viro wrote: > On Thu, Aug 16, 2012 at 06:57:00PM +0400, Cyrill Gorcunov wrote: > > > Guys, would the patch below be more-less acceptible? > > In inotify I think we could pass "parent" as NULL and use general > > encode engine then (ie it will look like

Re: [patch 4/8] fs, exportfs: Add export_encode_inode_fh helper

2012-08-16 Thread Cyrill Gorcunov
On Thu, Aug 16, 2012 at 03:55:27PM +0100, Al Viro wrote: > On Thu, Aug 16, 2012 at 06:48:35PM +0400, Cyrill Gorcunov wrote: > > > > Good luck doing that with e.g. VFAT... And then there's such thing > > > as filesystems that don't have ->encode_fh() for a lot of very good > > > > Wait, Al, it

Re: [patch 4/8] fs, exportfs: Add export_encode_inode_fh helper

2012-08-16 Thread Pavel Emelyanov
On 08/16/2012 06:55 PM, Al Viro wrote: > On Thu, Aug 16, 2012 at 06:48:35PM +0400, Cyrill Gorcunov wrote: > >>> Good luck doing that with e.g. VFAT... And then there's such thing >>> as filesystems that don't have ->encode_fh() for a lot of very good >> >> Wait, Al, it seems I messed up. If some

Re: [patch 4/8] fs, exportfs: Add export_encode_inode_fh helper

2012-08-16 Thread Al Viro
On Thu, Aug 16, 2012 at 06:57:00PM +0400, Cyrill Gorcunov wrote: > Guys, would the patch below be more-less acceptible? > In inotify I think we could pass "parent" as NULL and use general > encode engine then (ie it will look like someone called for > name_to_handle_at on inotify target). Wait.

Re: [patch 4/8] fs, exportfs: Add export_encode_inode_fh helper

2012-08-16 Thread Cyrill Gorcunov
On Thu, Aug 16, 2012 at 08:47:03AM -0400, J. Bruce Fields wrote: > On Thu, Aug 16, 2012 at 04:38:14PM +0400, Cyrill Gorcunov wrote: > > On Thu, Aug 16, 2012 at 10:24:48AM +0400, Cyrill Gorcunov wrote: > > > > > > On the other hand, if you want a real filehandle then wouldn't you > > > > > > want

Re: [patch 4/8] fs, exportfs: Add export_encode_inode_fh helper

2012-08-16 Thread Al Viro
On Thu, Aug 16, 2012 at 06:48:35PM +0400, Cyrill Gorcunov wrote: > > Good luck doing that with e.g. VFAT... And then there's such thing > > as filesystems that don't have ->encode_fh() for a lot of very good > > Wait, Al, it seems I messed up. If some fs has no encode_fh() implemented > the

Re: [patch 4/8] fs, exportfs: Add export_encode_inode_fh helper

2012-08-16 Thread J. Bruce Fields
On Thu, Aug 16, 2012 at 06:48:35PM +0400, Cyrill Gorcunov wrote: > On Thu, Aug 16, 2012 at 03:41:52PM +0100, Al Viro wrote: > > On Thu, Aug 16, 2012 at 06:15:53PM +0400, Cyrill Gorcunov wrote: > > > On Thu, Aug 16, 2012 at 02:03:00PM +, James Bottomley wrote: > > > > > > What's wrong with

Re: [patch 4/8] fs, exportfs: Add export_encode_inode_fh helper

2012-08-16 Thread Cyrill Gorcunov
On Thu, Aug 16, 2012 at 03:41:52PM +0100, Al Viro wrote: > On Thu, Aug 16, 2012 at 06:15:53PM +0400, Cyrill Gorcunov wrote: > > On Thu, Aug 16, 2012 at 02:03:00PM +, James Bottomley wrote: > > > > > What's wrong with saying "we don't support idiotify"? > > > > > > > > Al, we need some way to

Re: [patch 4/8] fs, exportfs: Add export_encode_inode_fh helper

2012-08-16 Thread Al Viro
On Thu, Aug 16, 2012 at 06:15:53PM +0400, Cyrill Gorcunov wrote: > On Thu, Aug 16, 2012 at 02:03:00PM +, James Bottomley wrote: > > > > What's wrong with saying "we don't support idiotify"? > > > > > > Al, we need some way to restore inotifies after checkpoint. > > > At the very early

Re: [patch 4/8] fs, exportfs: Add export_encode_inode_fh helper

2012-08-16 Thread Cyrill Gorcunov
On Thu, Aug 16, 2012 at 02:03:00PM +, James Bottomley wrote: > > > What's wrong with saying "we don't support idiotify"? > > > > Al, we need some way to restore inotifies after checkpoint. > > At the very early versions of these patches I simply added > > dentry to the inotify mark thus once

Re: [patch 4/8] fs, exportfs: Add export_encode_inode_fh helper

2012-08-16 Thread Pavel Emelyanov
On 08/16/2012 06:03 PM, James Bottomley wrote: > On Thu, 2012-08-16 at 17:54 +0400, Cyrill Gorcunov wrote: >> On Thu, Aug 16, 2012 at 02:50:19PM +0100, Al Viro wrote: >>> On Thu, Aug 16, 2012 at 05:47:06PM +0400, Pavel Emelyanov wrote: On 08/16/2012 05:43 PM, Al Viro wrote: > On Thu, Aug

Re: [patch 4/8] fs, exportfs: Add export_encode_inode_fh helper

2012-08-16 Thread James Bottomley
On Thu, 2012-08-16 at 17:54 +0400, Cyrill Gorcunov wrote: > On Thu, Aug 16, 2012 at 02:50:19PM +0100, Al Viro wrote: > > On Thu, Aug 16, 2012 at 05:47:06PM +0400, Pavel Emelyanov wrote: > > > On 08/16/2012 05:43 PM, Al Viro wrote: > > > > On Thu, Aug 16, 2012 at 04:38:14PM +0400, Cyrill Gorcunov

Re: [patch 4/8] fs, exportfs: Add export_encode_inode_fh helper

2012-08-16 Thread Cyrill Gorcunov
On Thu, Aug 16, 2012 at 02:50:19PM +0100, Al Viro wrote: > On Thu, Aug 16, 2012 at 05:47:06PM +0400, Pavel Emelyanov wrote: > > On 08/16/2012 05:43 PM, Al Viro wrote: > > > On Thu, Aug 16, 2012 at 04:38:14PM +0400, Cyrill Gorcunov wrote: > > > > > >> Hi Bruce, thinking a bit more I guess using

Re: [patch 4/8] fs, exportfs: Add export_encode_inode_fh helper

2012-08-16 Thread Pavel Emelyanov
On 08/16/2012 05:50 PM, Al Viro wrote: > On Thu, Aug 16, 2012 at 05:47:06PM +0400, Pavel Emelyanov wrote: >> On 08/16/2012 05:43 PM, Al Viro wrote: >>> On Thu, Aug 16, 2012 at 04:38:14PM +0400, Cyrill Gorcunov wrote: >>> Hi Bruce, thinking a bit more I guess using general encode_fh is not

Re: [patch 4/8] fs, exportfs: Add export_encode_inode_fh helper

2012-08-16 Thread Al Viro
On Thu, Aug 16, 2012 at 05:47:06PM +0400, Pavel Emelyanov wrote: > On 08/16/2012 05:43 PM, Al Viro wrote: > > On Thu, Aug 16, 2012 at 04:38:14PM +0400, Cyrill Gorcunov wrote: > > > >> Hi Bruce, thinking a bit more I guess using general encode_fh is not that > >> convenient since it operates with

Re: [patch 4/8] fs, exportfs: Add export_encode_inode_fh helper

2012-08-16 Thread Al Viro
On Thu, Aug 16, 2012 at 02:43:39PM +0100, Al Viro wrote: > On Thu, Aug 16, 2012 at 04:38:14PM +0400, Cyrill Gorcunov wrote: > > > Hi Bruce, thinking a bit more I guess using general encode_fh is not that > > convenient since it operates with dentries while our fdinfo output deals > > with inodes.

Re: [patch 4/8] fs, exportfs: Add export_encode_inode_fh helper

2012-08-16 Thread Pavel Emelyanov
On 08/16/2012 05:43 PM, Al Viro wrote: > On Thu, Aug 16, 2012 at 04:38:14PM +0400, Cyrill Gorcunov wrote: > >> Hi Bruce, thinking a bit more I guess using general encode_fh is not that >> convenient since it operates with dentries while our fdinfo output deals >> with inodes. Thus I should either

Re: [patch 4/8] fs, exportfs: Add export_encode_inode_fh helper

2012-08-16 Thread Al Viro
On Thu, Aug 16, 2012 at 04:38:14PM +0400, Cyrill Gorcunov wrote: > Hi Bruce, thinking a bit more I guess using general encode_fh is not that > convenient since it operates with dentries while our fdinfo output deals > with inodes. Thus I should either provide some new encode_fh variant > which

Re: [patch 4/8] fs, exportfs: Add export_encode_inode_fh helper

2012-08-16 Thread Cyrill Gorcunov
On Thu, Aug 16, 2012 at 08:47:03AM -0400, J. Bruce Fields wrote: > > Hi Bruce, thinking a bit more I guess using general encode_fh is not that > > convenient since it operates with dentries while our fdinfo output deals > > with inodes. Thus I should either provide some new encode_fh variant > >

Re: [patch 4/8] fs, exportfs: Add export_encode_inode_fh helper

2012-08-16 Thread J. Bruce Fields
On Thu, Aug 16, 2012 at 04:38:14PM +0400, Cyrill Gorcunov wrote: > On Thu, Aug 16, 2012 at 10:24:48AM +0400, Cyrill Gorcunov wrote: > > > > > On the other hand, if you want a real filehandle then wouldn't you > > > > > want > > > > > to e.g. call the filesystem's ->encode_fh() if necessary, as >

Re: [patch 4/8] fs, exportfs: Add export_encode_inode_fh helper

2012-08-16 Thread Cyrill Gorcunov
On Thu, Aug 16, 2012 at 10:24:48AM +0400, Cyrill Gorcunov wrote: > > > > On the other hand, if you want a real filehandle then wouldn't you want > > > > to e.g. call the filesystem's ->encode_fh() if necessary, as > > > > exportfs_encode_fh() does? > > > > > > Well, one of the problem I hit when

Re: [patch 4/8] fs, exportfs: Add export_encode_inode_fh helper

2012-08-16 Thread Cyrill Gorcunov
On Wed, Aug 15, 2012 at 06:06:23PM -0400, J. Bruce Fields wrote: > On Thu, Aug 16, 2012 at 01:02:37AM +0400, Cyrill Gorcunov wrote: > > On Wed, Aug 15, 2012 at 04:45:46PM -0400, J. Bruce Fields wrote: > > > On Wed, Aug 15, 2012 at 01:21:20PM +0400, Cyrill Gorcunov wrote: > > > > To provide

Re: [patch 4/8] fs, exportfs: Add export_encode_inode_fh helper

2012-08-16 Thread Cyrill Gorcunov
On Wed, Aug 15, 2012 at 06:06:23PM -0400, J. Bruce Fields wrote: On Thu, Aug 16, 2012 at 01:02:37AM +0400, Cyrill Gorcunov wrote: On Wed, Aug 15, 2012 at 04:45:46PM -0400, J. Bruce Fields wrote: On Wed, Aug 15, 2012 at 01:21:20PM +0400, Cyrill Gorcunov wrote: To provide fsnotify object

Re: [patch 4/8] fs, exportfs: Add export_encode_inode_fh helper

2012-08-16 Thread Cyrill Gorcunov
On Thu, Aug 16, 2012 at 10:24:48AM +0400, Cyrill Gorcunov wrote: On the other hand, if you want a real filehandle then wouldn't you want to e.g. call the filesystem's -encode_fh() if necessary, as exportfs_encode_fh() does? Well, one of the problem I hit when I've been trying to

Re: [patch 4/8] fs, exportfs: Add export_encode_inode_fh helper

2012-08-16 Thread J. Bruce Fields
On Thu, Aug 16, 2012 at 04:38:14PM +0400, Cyrill Gorcunov wrote: On Thu, Aug 16, 2012 at 10:24:48AM +0400, Cyrill Gorcunov wrote: On the other hand, if you want a real filehandle then wouldn't you want to e.g. call the filesystem's -encode_fh() if necessary, as

Re: [patch 4/8] fs, exportfs: Add export_encode_inode_fh helper

2012-08-16 Thread Cyrill Gorcunov
On Thu, Aug 16, 2012 at 08:47:03AM -0400, J. Bruce Fields wrote: Hi Bruce, thinking a bit more I guess using general encode_fh is not that convenient since it operates with dentries while our fdinfo output deals with inodes. Thus I should either provide some new encode_fh variant which

Re: [patch 4/8] fs, exportfs: Add export_encode_inode_fh helper

2012-08-16 Thread Al Viro
On Thu, Aug 16, 2012 at 04:38:14PM +0400, Cyrill Gorcunov wrote: Hi Bruce, thinking a bit more I guess using general encode_fh is not that convenient since it operates with dentries while our fdinfo output deals with inodes. Thus I should either provide some new encode_fh variant which would

Re: [patch 4/8] fs, exportfs: Add export_encode_inode_fh helper

2012-08-16 Thread Pavel Emelyanov
On 08/16/2012 05:43 PM, Al Viro wrote: On Thu, Aug 16, 2012 at 04:38:14PM +0400, Cyrill Gorcunov wrote: Hi Bruce, thinking a bit more I guess using general encode_fh is not that convenient since it operates with dentries while our fdinfo output deals with inodes. Thus I should either provide

Re: [patch 4/8] fs, exportfs: Add export_encode_inode_fh helper

2012-08-16 Thread Al Viro
On Thu, Aug 16, 2012 at 02:43:39PM +0100, Al Viro wrote: On Thu, Aug 16, 2012 at 04:38:14PM +0400, Cyrill Gorcunov wrote: Hi Bruce, thinking a bit more I guess using general encode_fh is not that convenient since it operates with dentries while our fdinfo output deals with inodes. Thus I

Re: [patch 4/8] fs, exportfs: Add export_encode_inode_fh helper

2012-08-16 Thread Al Viro
On Thu, Aug 16, 2012 at 05:47:06PM +0400, Pavel Emelyanov wrote: On 08/16/2012 05:43 PM, Al Viro wrote: On Thu, Aug 16, 2012 at 04:38:14PM +0400, Cyrill Gorcunov wrote: Hi Bruce, thinking a bit more I guess using general encode_fh is not that convenient since it operates with dentries

Re: [patch 4/8] fs, exportfs: Add export_encode_inode_fh helper

2012-08-16 Thread Pavel Emelyanov
On 08/16/2012 05:50 PM, Al Viro wrote: On Thu, Aug 16, 2012 at 05:47:06PM +0400, Pavel Emelyanov wrote: On 08/16/2012 05:43 PM, Al Viro wrote: On Thu, Aug 16, 2012 at 04:38:14PM +0400, Cyrill Gorcunov wrote: Hi Bruce, thinking a bit more I guess using general encode_fh is not that convenient

Re: [patch 4/8] fs, exportfs: Add export_encode_inode_fh helper

2012-08-16 Thread Cyrill Gorcunov
On Thu, Aug 16, 2012 at 02:50:19PM +0100, Al Viro wrote: On Thu, Aug 16, 2012 at 05:47:06PM +0400, Pavel Emelyanov wrote: On 08/16/2012 05:43 PM, Al Viro wrote: On Thu, Aug 16, 2012 at 04:38:14PM +0400, Cyrill Gorcunov wrote: Hi Bruce, thinking a bit more I guess using general

Re: [patch 4/8] fs, exportfs: Add export_encode_inode_fh helper

2012-08-16 Thread James Bottomley
On Thu, 2012-08-16 at 17:54 +0400, Cyrill Gorcunov wrote: On Thu, Aug 16, 2012 at 02:50:19PM +0100, Al Viro wrote: On Thu, Aug 16, 2012 at 05:47:06PM +0400, Pavel Emelyanov wrote: On 08/16/2012 05:43 PM, Al Viro wrote: On Thu, Aug 16, 2012 at 04:38:14PM +0400, Cyrill Gorcunov wrote:

Re: [patch 4/8] fs, exportfs: Add export_encode_inode_fh helper

2012-08-16 Thread Pavel Emelyanov
On 08/16/2012 06:03 PM, James Bottomley wrote: On Thu, 2012-08-16 at 17:54 +0400, Cyrill Gorcunov wrote: On Thu, Aug 16, 2012 at 02:50:19PM +0100, Al Viro wrote: On Thu, Aug 16, 2012 at 05:47:06PM +0400, Pavel Emelyanov wrote: On 08/16/2012 05:43 PM, Al Viro wrote: On Thu, Aug 16, 2012 at

Re: [patch 4/8] fs, exportfs: Add export_encode_inode_fh helper

2012-08-16 Thread Cyrill Gorcunov
On Thu, Aug 16, 2012 at 02:03:00PM +, James Bottomley wrote: What's wrong with saying we don't support idiotify? Al, we need some way to restore inotifies after checkpoint. At the very early versions of these patches I simply added dentry to the inotify mark thus once inotify

Re: [patch 4/8] fs, exportfs: Add export_encode_inode_fh helper

2012-08-16 Thread Al Viro
On Thu, Aug 16, 2012 at 06:15:53PM +0400, Cyrill Gorcunov wrote: On Thu, Aug 16, 2012 at 02:03:00PM +, James Bottomley wrote: What's wrong with saying we don't support idiotify? Al, we need some way to restore inotifies after checkpoint. At the very early versions of these

Re: [patch 4/8] fs, exportfs: Add export_encode_inode_fh helper

2012-08-16 Thread Cyrill Gorcunov
On Thu, Aug 16, 2012 at 03:41:52PM +0100, Al Viro wrote: On Thu, Aug 16, 2012 at 06:15:53PM +0400, Cyrill Gorcunov wrote: On Thu, Aug 16, 2012 at 02:03:00PM +, James Bottomley wrote: What's wrong with saying we don't support idiotify? Al, we need some way to restore inotifies

Re: [patch 4/8] fs, exportfs: Add export_encode_inode_fh helper

2012-08-16 Thread J. Bruce Fields
On Thu, Aug 16, 2012 at 06:48:35PM +0400, Cyrill Gorcunov wrote: On Thu, Aug 16, 2012 at 03:41:52PM +0100, Al Viro wrote: On Thu, Aug 16, 2012 at 06:15:53PM +0400, Cyrill Gorcunov wrote: On Thu, Aug 16, 2012 at 02:03:00PM +, James Bottomley wrote: What's wrong with saying we don't

Re: [patch 4/8] fs, exportfs: Add export_encode_inode_fh helper

2012-08-16 Thread Al Viro
On Thu, Aug 16, 2012 at 06:48:35PM +0400, Cyrill Gorcunov wrote: Good luck doing that with e.g. VFAT... And then there's such thing as filesystems that don't have -encode_fh() for a lot of very good Wait, Al, it seems I messed up. If some fs has no encode_fh() implemented the default

Re: [patch 4/8] fs, exportfs: Add export_encode_inode_fh helper

2012-08-16 Thread Cyrill Gorcunov
On Thu, Aug 16, 2012 at 08:47:03AM -0400, J. Bruce Fields wrote: On Thu, Aug 16, 2012 at 04:38:14PM +0400, Cyrill Gorcunov wrote: On Thu, Aug 16, 2012 at 10:24:48AM +0400, Cyrill Gorcunov wrote: On the other hand, if you want a real filehandle then wouldn't you want to e.g.

Re: [patch 4/8] fs, exportfs: Add export_encode_inode_fh helper

2012-08-16 Thread Al Viro
On Thu, Aug 16, 2012 at 06:57:00PM +0400, Cyrill Gorcunov wrote: Guys, would the patch below be more-less acceptible? In inotify I think we could pass parent as NULL and use general encode engine then (ie it will look like someone called for name_to_handle_at on inotify target). Wait. What

Re: [patch 4/8] fs, exportfs: Add export_encode_inode_fh helper

2012-08-16 Thread Pavel Emelyanov
On 08/16/2012 06:55 PM, Al Viro wrote: On Thu, Aug 16, 2012 at 06:48:35PM +0400, Cyrill Gorcunov wrote: Good luck doing that with e.g. VFAT... And then there's such thing as filesystems that don't have -encode_fh() for a lot of very good Wait, Al, it seems I messed up. If some fs has no

Re: [patch 4/8] fs, exportfs: Add export_encode_inode_fh helper

2012-08-16 Thread Cyrill Gorcunov
On Thu, Aug 16, 2012 at 03:55:27PM +0100, Al Viro wrote: On Thu, Aug 16, 2012 at 06:48:35PM +0400, Cyrill Gorcunov wrote: Good luck doing that with e.g. VFAT... And then there's such thing as filesystems that don't have -encode_fh() for a lot of very good Wait, Al, it seems I messed

Re: [patch 4/8] fs, exportfs: Add export_encode_inode_fh helper

2012-08-16 Thread Cyrill Gorcunov
On Thu, Aug 16, 2012 at 04:05:42PM +0100, Al Viro wrote: On Thu, Aug 16, 2012 at 06:57:00PM +0400, Cyrill Gorcunov wrote: Guys, would the patch below be more-less acceptible? In inotify I think we could pass parent as NULL and use general encode engine then (ie it will look like someone

Re: [patch 4/8] fs, exportfs: Add export_encode_inode_fh helper

2012-08-16 Thread Cyrill Gorcunov
On Thu, Aug 16, 2012 at 07:06:18PM +0400, Pavel Emelyanov wrote: On 08/16/2012 06:55 PM, Al Viro wrote: On Thu, Aug 16, 2012 at 06:48:35PM +0400, Cyrill Gorcunov wrote: Good luck doing that with e.g. VFAT... And then there's such thing as filesystems that don't have -encode_fh() for a

  1   2   >