* fsstack: struct path
@ 2006-10-18 4:23 Josef Sipek
2006-10-18 8:31 ` Andrew Morton
0 siblings, 1 reply; 13+ messages in thread
From: Josef Sipek @ 2006-10-18 4:23 UTC (permalink / raw)
To: linux-kernel; +Cc: akpm, hch, viro, mhalcrow, penberg, linux-fsdevel
Few weeks ago, I noticed that fs/namei.c defines struct path:
struct path {
struct vfsmount *mnt;
struct dentry *dentry;
};
I think it would make sense to move it into include/linux/ as it is quite
useful (and it would discourage the (ab)use of struct nameidata.)
The fsstack code could benefit from it as the stackable fs dentries have to
keep track of the lower dentry as well as the lower vfsmount.
One, rather unfortunate, fact is that struct path is also defined in
include/linux/reiserfs_fs.h as something completely different - reiserfs
specific.
Any thoughts?
Josef "Jeff" Sipek.
--
I already backed up the box once, I can do it again.
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: fsstack: struct path
2006-10-18 4:23 fsstack: struct path Josef Sipek
@ 2006-10-18 8:31 ` Andrew Morton
2006-10-18 8:35 ` Al Viro
2006-10-18 8:35 ` Andrew Morton
0 siblings, 2 replies; 13+ messages in thread
From: Andrew Morton @ 2006-10-18 8:31 UTC (permalink / raw)
To: Josef Sipek; +Cc: linux-kernel, hch, viro, mhalcrow, penberg, linux-fsdevel
On Wed, 18 Oct 2006 00:23:23 -0400
Josef Sipek <jsipek@fsl.cs.sunysb.edu> wrote:
> Few weeks ago, I noticed that fs/namei.c defines struct path:
>
> struct path {
> struct vfsmount *mnt;
> struct dentry *dentry;
> };
>
> I think it would make sense to move it into include/linux/ as it is quite
> useful (and it would discourage the (ab)use of struct nameidata.)
>
> The fsstack code could benefit from it as the stackable fs dentries have to
> keep track of the lower dentry as well as the lower vfsmount.
>
> One, rather unfortunate, fact is that struct path is also defined in
> include/linux/reiserfs_fs.h as something completely different - reiserfs
> specific.
>
> Any thoughts?
>
reiserfs is being bad. s/path/reiserfs_path/g
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: fsstack: struct path
2006-10-18 8:31 ` Andrew Morton
@ 2006-10-18 8:35 ` Al Viro
2006-10-18 14:38 ` Chris Mason
2006-10-18 8:35 ` Andrew Morton
1 sibling, 1 reply; 13+ messages in thread
From: Al Viro @ 2006-10-18 8:35 UTC (permalink / raw)
To: Andrew Morton
Cc: Josef Sipek, linux-kernel, hch, mhalcrow, penberg, linux-fsdevel
On Wed, Oct 18, 2006 at 01:31:03AM -0700, Andrew Morton wrote:
> On Wed, 18 Oct 2006 00:23:23 -0400
> Josef Sipek <jsipek@fsl.cs.sunysb.edu> wrote:
>
> > Few weeks ago, I noticed that fs/namei.c defines struct path:
> >
> > struct path {
> > struct vfsmount *mnt;
> > struct dentry *dentry;
> > };
> >
> > I think it would make sense to move it into include/linux/ as it is quite
> > useful (and it would discourage the (ab)use of struct nameidata.)
> >
> > The fsstack code could benefit from it as the stackable fs dentries have to
> > keep track of the lower dentry as well as the lower vfsmount.
> >
> > One, rather unfortunate, fact is that struct path is also defined in
> > include/linux/reiserfs_fs.h as something completely different - reiserfs
> > specific.
> >
> > Any thoughts?
> >
>
> reiserfs is being bad. s/path/reiserfs_path/g
Indeed. That's one pending patch that never got around to be submitted
(and had bitrotten at least 3 times, IIRC).
ACK, provided that reiserfs folks are OK with the replacement name for
their struct. Note that "path" in question has very little to do with
pathnames - it's a path in balanced tree, IIRC. So if we get around
to renaming that sucker, it might be a good time to pick better name.
Certainly ACK for generic part.
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: fsstack: struct path
2006-10-18 8:35 ` Al Viro
@ 2006-10-18 14:38 ` Chris Mason
0 siblings, 0 replies; 13+ messages in thread
From: Chris Mason @ 2006-10-18 14:38 UTC (permalink / raw)
To: Al Viro
Cc: Andrew Morton, Josef Sipek, linux-kernel, hch, mhalcrow, penberg,
linux-fsdevel
On Wed, Oct 18, 2006 at 09:35:27AM +0100, Al Viro wrote:
> On Wed, Oct 18, 2006 at 01:31:03AM -0700, Andrew Morton wrote:
> > > One, rather unfortunate, fact is that struct path is also defined in
> > > include/linux/reiserfs_fs.h as something completely different - reiserfs
> > > specific.
> > >
> > > Any thoughts?
> > >
> >
> > reiserfs is being bad. s/path/reiserfs_path/g
>
> Indeed. That's one pending patch that never got around to be submitted
> (and had bitrotten at least 3 times, IIRC).
>
> ACK, provided that reiserfs folks are OK with the replacement name for
> their struct. Note that "path" in question has very little to do with
> pathnames - it's a path in balanced tree, IIRC. So if we get around
> to renaming that sucker, it might be a good time to pick better name.
Aside from having to reindent the reiserfs tree afterwards, I doubt
anyone would mind (please cc reiserfs-dev on the patch though). Al is
right, it's a path in the balanced tree.
-chris
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: fsstack: struct path
2006-10-18 8:31 ` Andrew Morton
2006-10-18 8:35 ` Al Viro
@ 2006-10-18 8:35 ` Andrew Morton
2006-10-18 9:06 ` Al Viro
1 sibling, 1 reply; 13+ messages in thread
From: Andrew Morton @ 2006-10-18 8:35 UTC (permalink / raw)
To: Josef Sipek, linux-kernel, hch, viro, mhalcrow, penberg,
linux-fsdevel
On Wed, 18 Oct 2006 01:31:03 -0700
Andrew Morton <akpm@osdl.org> wrote:
> > One, rather unfortunate, fact is that struct path is also defined in
> > include/linux/reiserfs_fs.h as something completely different - reiserfs
> > specific.
> >
> > Any thoughts?
> >
>
> reiserfs is being bad. s/path/reiserfs_path/g
There's also drivers/md/dm-mpath.h's struct path. Renaming fs/namei.c's
`struct path' to `struct namei_path' would be prudent.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: fsstack: struct path
2006-10-18 8:35 ` Andrew Morton
@ 2006-10-18 9:06 ` Al Viro
2006-10-18 9:12 ` Andrew Morton
0 siblings, 1 reply; 13+ messages in thread
From: Al Viro @ 2006-10-18 9:06 UTC (permalink / raw)
To: Andrew Morton
Cc: Josef Sipek, linux-kernel, hch, mhalcrow, penberg, linux-fsdevel
On Wed, Oct 18, 2006 at 01:35:51AM -0700, Andrew Morton wrote:
> On Wed, 18 Oct 2006 01:31:03 -0700
> Andrew Morton <akpm@osdl.org> wrote:
>
> > > One, rather unfortunate, fact is that struct path is also defined in
> > > include/linux/reiserfs_fs.h as something completely different - reiserfs
> > > specific.
> > >
> > > Any thoughts?
> > >
> >
> > reiserfs is being bad. s/path/reiserfs_path/g
>
> There's also drivers/md/dm-mpath.h's struct path. Renaming fs/namei.c's
> `struct path' to `struct namei_path' would be prudent.
Yuck... If we really want to switch to it (and I can give you a dozen
examples of possible users right now - starting with struct file), putting
namei_ into it is both uninformative and ugly.
I'm not sure what would be the good name here; "pathname" comes to mind,
but it suggests that we are dealing with a string. And "location" is
too vague (and probably would cause fsckloads of conflicts itself).
Suggestions? "pathname" would almost work; the difference is that this
is not a string but a node in tree that string resolves to.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: fsstack: struct path
2006-10-18 9:06 ` Al Viro
@ 2006-10-18 9:12 ` Andrew Morton
2006-10-18 9:22 ` Al Viro
0 siblings, 1 reply; 13+ messages in thread
From: Andrew Morton @ 2006-10-18 9:12 UTC (permalink / raw)
To: Al Viro; +Cc: Josef Sipek, linux-kernel, hch, mhalcrow, penberg, linux-fsdevel
On Wed, 18 Oct 2006 10:06:23 +0100
Al Viro <viro@ftp.linux.org.uk> wrote:
> On Wed, Oct 18, 2006 at 01:35:51AM -0700, Andrew Morton wrote:
> > On Wed, 18 Oct 2006 01:31:03 -0700
> > Andrew Morton <akpm@osdl.org> wrote:
> >
> > > > One, rather unfortunate, fact is that struct path is also defined in
> > > > include/linux/reiserfs_fs.h as something completely different - reiserfs
> > > > specific.
> > > >
> > > > Any thoughts?
> > > >
> > >
> > > reiserfs is being bad. s/path/reiserfs_path/g
> >
> > There's also drivers/md/dm-mpath.h's struct path. Renaming fs/namei.c's
> > `struct path' to `struct namei_path' would be prudent.
>
> Yuck... If we really want to switch to it (and I can give you a dozen
> examples of possible users right now - starting with struct file), putting
> namei_ into it is both uninformative and ugly.
>
> I'm not sure what would be the good name here; "pathname" comes to mind,
> but it suggests that we are dealing with a string. And "location" is
> too vague (and probably would cause fsckloads of conflicts itself).
>
> Suggestions? "pathname" would almost work; the difference is that this
> is not a string but a node in tree that string resolves to.
path_item?
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: fsstack: struct path
2006-10-18 9:12 ` Andrew Morton
@ 2006-10-18 9:22 ` Al Viro
2006-10-18 9:27 ` Paul Jackson
0 siblings, 1 reply; 13+ messages in thread
From: Al Viro @ 2006-10-18 9:22 UTC (permalink / raw)
To: Andrew Morton
Cc: Josef Sipek, linux-kernel, hch, mhalcrow, penberg, linux-fsdevel
On Wed, Oct 18, 2006 at 02:12:22AM -0700, Andrew Morton wrote:
> > Yuck... If we really want to switch to it (and I can give you a dozen
> > examples of possible users right now - starting with struct file), putting
> > namei_ into it is both uninformative and ugly.
> >
> > I'm not sure what would be the good name here; "pathname" comes to mind,
> > but it suggests that we are dealing with a string. And "location" is
> > too vague (and probably would cause fsckloads of conflicts itself).
> >
> > Suggestions? "pathname" would almost work; the difference is that this
> > is not a string but a node in tree that string resolves to.
>
> path_item?
struct path_node, perhaps?
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: fsstack: struct path
2006-10-18 9:22 ` Al Viro
@ 2006-10-18 9:27 ` Paul Jackson
2006-10-18 9:34 ` Al Viro
0 siblings, 1 reply; 13+ messages in thread
From: Paul Jackson @ 2006-10-18 9:27 UTC (permalink / raw)
To: Al Viro; +Cc: akpm, jsipek, linux-kernel, hch, mhalcrow, penberg, linux-fsdevel
> struct path_node
or just struct pathnode ?
--
I won't rest till it's the best ...
Programmer, Linux Scalability
Paul Jackson <pj@sgi.com> 1.925.600.0401
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: fsstack: struct path
2006-10-18 9:27 ` Paul Jackson
@ 2006-10-18 9:34 ` Al Viro
2006-10-18 10:56 ` Jörn Engel
0 siblings, 1 reply; 13+ messages in thread
From: Al Viro @ 2006-10-18 9:34 UTC (permalink / raw)
To: Paul Jackson
Cc: akpm, jsipek, linux-kernel, hch, mhalcrow, penberg, linux-fsdevel
On Wed, Oct 18, 2006 at 02:27:47AM -0700, Paul Jackson wrote:
> > struct path_node
>
> or just struct pathnode ?
as long as it's not path_thingy (or path_turnip)...
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: fsstack: struct path
2006-10-18 9:34 ` Al Viro
@ 2006-10-18 10:56 ` Jörn Engel
0 siblings, 0 replies; 13+ messages in thread
From: Jörn Engel @ 2006-10-18 10:56 UTC (permalink / raw)
To: Al Viro
Cc: Paul Jackson, akpm, jsipek, linux-kernel, hch, mhalcrow, penberg,
linux-fsdevel
On Wed, 18 October 2006 10:34:33 +0100, Al Viro wrote:
>
> as long as it's not path_thingy (or path_turnip)...
dpath?
Jörn
--
A victorious army first wins and then seeks battle.
-- Sun Tzu
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: fsstack: struct path
@ 2006-10-18 10:56 ` Jörn Engel
0 siblings, 0 replies; 13+ messages in thread
From: Jörn Engel @ 2006-10-18 10:56 UTC (permalink / raw)
To: Al Viro
Cc: Paul Jackson, akpm, jsipek, linux-kernel, hch, mhalcrow, penberg,
linux-fsdevel
On Wed, 18 October 2006 10:34:33 +0100, Al Viro wrote:
>
> as long as it's not path_thingy (or path_turnip)...
dpath?
Jörn
--
A victorious army first wins and then seeks battle.
-- Sun Tzu
-
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
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: fsstack: struct path
2006-10-18 10:56 ` Jörn Engel
(?)
@ 2006-10-18 14:39 ` Erez Zadok
-1 siblings, 0 replies; 13+ messages in thread
From: Erez Zadok @ 2006-10-18 14:39 UTC (permalink / raw)
To: Jörn Engel
Cc: Al Viro, Paul Jackson, akpm, jsipek, linux-kernel, hch, mhalcrow,
penberg, linux-fsdevel
IMHO, the string "path" is so generic (and nice, short, and sweet :-), that
only higher-level layers such as the VFS should be allowed to define it.
All other layers that are somewhere below the VFS (drivers/md/dm-mpath.h and
reiserfs), should rename their struct path to something more specific. If
anyone component can claim "first rights" for the name "struct path" -- it's
the VFS.
That said, 'pathnode' is also good, esp. if it better describes the contents
and use of this struct. But I would still rename all other uses of 'struct
path' below the VFS.
Erez.
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2006-10-18 14:43 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-18 4:23 fsstack: struct path Josef Sipek
2006-10-18 8:31 ` Andrew Morton
2006-10-18 8:35 ` Al Viro
2006-10-18 14:38 ` Chris Mason
2006-10-18 8:35 ` Andrew Morton
2006-10-18 9:06 ` Al Viro
2006-10-18 9:12 ` Andrew Morton
2006-10-18 9:22 ` Al Viro
2006-10-18 9:27 ` Paul Jackson
2006-10-18 9:34 ` Al Viro
2006-10-18 10:56 ` Jörn Engel
2006-10-18 10:56 ` Jörn Engel
2006-10-18 14:39 ` Erez Zadok
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.