linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* mountpoint information a get_sb
@ 2006-11-23 12:07 Mathieu Dube
  2006-11-23 18:32 ` Al Viro
  0 siblings, 1 reply; 5+ messages in thread
From: Mathieu Dube @ 2006-11-23 12:07 UTC (permalink / raw)
  To: linux-fsdevel

Hi,

the fs Im building needs to know where its being mounted prior to
creating its superblock. 

struct vfsmount that is passed to my fs specific get_sb has
mnt_mountpoint set to NULL.

I assume this is the normal behavior and I am looking for a way to
obtain information about the mount point my fs is being mounted on.

any help would be appreciated.

thanks
-M

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: mountpoint information a get_sb
  2006-11-23 18:32 ` Al Viro
@ 2006-11-23 13:51   ` Mathieu Dube
  2006-11-23 18:53     ` Matthew Wilcox
  2006-11-23 19:46     ` Al Viro
  0 siblings, 2 replies; 5+ messages in thread
From: Mathieu Dube @ 2006-11-23 13:51 UTC (permalink / raw)
  To: Al Viro; +Cc: linux-fsdevel

On Thu, 2006-11-23 at 18:32 +0000, Al Viro wrote:

> It might be mounted at any number of places, including 0.  Moreover,
> it might be mounted at some place only to be immediately moved
> elsewhere.
> 
> The question makes no sense.

Im sorry Im fairly new to this.

youre saying there is no way to know the mount point unless its already
mounted?

for instance in kernel 2.2 you had a d_covers pointer to the dentry the
mount would be placed on?

I need to know the subtree that will be made invisible once the fs is
mounted

is there a way ?

-M

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: mountpoint information a get_sb
  2006-11-23 12:07 mountpoint information a get_sb Mathieu Dube
@ 2006-11-23 18:32 ` Al Viro
  2006-11-23 13:51   ` Mathieu Dube
  0 siblings, 1 reply; 5+ messages in thread
From: Al Viro @ 2006-11-23 18:32 UTC (permalink / raw)
  To: Mathieu Dube; +Cc: linux-fsdevel

On Thu, Nov 23, 2006 at 12:07:36PM +0000, Mathieu Dube wrote:
> Hi,
> 
> the fs Im building needs to know where its being mounted prior to
> creating its superblock. 
> 
> struct vfsmount that is passed to my fs specific get_sb has
> mnt_mountpoint set to NULL.
> 
> I assume this is the normal behavior and I am looking for a way to
> obtain information about the mount point my fs is being mounted on.

It might be mounted at any number of places, including 0.  Moreover,
it might be mounted at some place only to be immediately moved
elsewhere.

The question makes no sense.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: mountpoint information a get_sb
  2006-11-23 13:51   ` Mathieu Dube
@ 2006-11-23 18:53     ` Matthew Wilcox
  2006-11-23 19:46     ` Al Viro
  1 sibling, 0 replies; 5+ messages in thread
From: Matthew Wilcox @ 2006-11-23 18:53 UTC (permalink / raw)
  To: Mathieu Dube; +Cc: Al Viro, linux-fsdevel

On Thu, Nov 23, 2006 at 01:51:24PM +0000, Mathieu Dube wrote:
> On Thu, 2006-11-23 at 18:32 +0000, Al Viro wrote:
> 
> > It might be mounted at any number of places, including 0.  Moreover,
> > it might be mounted at some place only to be immediately moved
> > elsewhere.
> > 
> > The question makes no sense.
> 
> Im sorry Im fairly new to this.
> 
> youre saying there is no way to know the mount point unless its already
> mounted?

He's saying that even if you happen to know where it's currently
mounted, there's no guarantee the place where it's mounted might not be
changed without your filesystem knowing.  Indeed, it can be mounted
nowhere at all (and yet still active) or it can be mounted in 2 or more
places at the same time.  What you've told us you're trying to do is
impossible.

> I need to know the subtree that will be made invisible once the fs is
> mounted
> 
> is there a way ?

No way at all.  What are you actually trying to do?

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: mountpoint information a get_sb
  2006-11-23 13:51   ` Mathieu Dube
  2006-11-23 18:53     ` Matthew Wilcox
@ 2006-11-23 19:46     ` Al Viro
  1 sibling, 0 replies; 5+ messages in thread
From: Al Viro @ 2006-11-23 19:46 UTC (permalink / raw)
  To: Mathieu Dube; +Cc: linux-fsdevel

On Thu, Nov 23, 2006 at 01:51:24PM +0000, Mathieu Dube wrote:
> On Thu, 2006-11-23 at 18:32 +0000, Al Viro wrote:
> 
> > It might be mounted at any number of places, including 0.  Moreover,
> > it might be mounted at some place only to be immediately moved
> > elsewhere.
> > 
> > The question makes no sense.
> 
> Im sorry Im fairly new to this.
> 
> youre saying there is no way to know the mount point unless its already
> mounted?

I am saying that it can be mounted in any number of places at the same
time.
 
> for instance in kernel 2.2 you had a d_covers pointer to the dentry the
> mount would be placed on?

Kept in struct vfsmount since 2.4 and there can be many of those for the
same superblock.

> I need to know the subtree that will be made invisible once the fs is
> mounted

If you rely on something becoming invisible - you've got a problem.
It might be mounted elsewhere and not obscured there by anything.

If you want pass it *some* subtree, just pass it explicitly in the
options, but be ready to have it changed later on (stuff might be
mounted there, unmounted, moved around, etc.)

More details of what you are trying to do would be useful...

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2006-11-23 19:46 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-23 12:07 mountpoint information a get_sb Mathieu Dube
2006-11-23 18:32 ` Al Viro
2006-11-23 13:51   ` Mathieu Dube
2006-11-23 18:53     ` Matthew Wilcox
2006-11-23 19:46     ` Al Viro

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).