public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* 2.6: why no EXPORT_SYMBOL of get_sb_pseudo()?
@ 2003-10-01  9:04 Mikael Pettersson
  2003-10-01 11:03 ` viro
  0 siblings, 1 reply; 4+ messages in thread
From: Mikael Pettersson @ 2003-10-01  9:04 UTC (permalink / raw)
  To: linux-kernel

fs/libfs.c:get_sb_pseudo() isn't exported to modules,
but a lot of the other stuff in fs/libfs.c is.

Is there a particular reason for this or just an oversight?

Making a private copy of get_sb_pseudo()'s definition works
in a module, but that's not exactly productive use of
programmer time or source and object code space.

/Mikael

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

* Re: 2.6: why no EXPORT_SYMBOL of get_sb_pseudo()?
  2003-10-01  9:04 2.6: why no EXPORT_SYMBOL of get_sb_pseudo()? Mikael Pettersson
@ 2003-10-01 11:03 ` viro
  2003-10-01 11:38   ` Mikael Pettersson
  0 siblings, 1 reply; 4+ messages in thread
From: viro @ 2003-10-01 11:03 UTC (permalink / raw)
  To: Mikael Pettersson; +Cc: linux-kernel

On Wed, Oct 01, 2003 at 11:04:30AM +0200, Mikael Pettersson wrote:
> fs/libfs.c:get_sb_pseudo() isn't exported to modules,
> but a lot of the other stuff in fs/libfs.c is.
> 
> Is there a particular reason for this or just an oversight?
> 
> Making a private copy of get_sb_pseudo()'s definition works
> in a module, but that's not exactly productive use of
> programmer time or source and object code space.

Are you really sure that get_sb_pseudo() is what you need?  It might be
possible, but I suspect that simple_fill_super() would be the right thing
to use.  Care to give details?

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

* Re: 2.6: why no EXPORT_SYMBOL of get_sb_pseudo()?
  2003-10-01 11:03 ` viro
@ 2003-10-01 11:38   ` Mikael Pettersson
  2003-10-01 14:41     ` Mikael Pettersson
  0 siblings, 1 reply; 4+ messages in thread
From: Mikael Pettersson @ 2003-10-01 11:38 UTC (permalink / raw)
  To: viro; +Cc: linux-kernel

viro@parcelfarce.linux.theplanet.co.uk writes:
 > On Wed, Oct 01, 2003 at 11:04:30AM +0200, Mikael Pettersson wrote:
 > > fs/libfs.c:get_sb_pseudo() isn't exported to modules,
 > > but a lot of the other stuff in fs/libfs.c is.
 > > 
 > > Is there a particular reason for this or just an oversight?
 > > 
 > > Making a private copy of get_sb_pseudo()'s definition works
 > > in a module, but that's not exactly productive use of
 > > programmer time or source and object code space.
 > 
 > Are you really sure that get_sb_pseudo() is what you need?  It might be
 > possible, but I suspect that simple_fill_super() would be the right thing
 > to use.  Care to give details?

I have a pseudo fs to support special files constructed and
returned as the result of certain operations in the module.

This is very very similar to what e.g. pipefs does, so the
fs implementation is closely modelled after fs/pipe.c. And
since pipefs, futexes, and a number of other pseudo fs:s in
the kernel all use get_sb_pseudo() in their ->get_sb method,
I figured I should do the same.

/Mikael

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

* Re: 2.6: why no EXPORT_SYMBOL of get_sb_pseudo()?
  2003-10-01 11:38   ` Mikael Pettersson
@ 2003-10-01 14:41     ` Mikael Pettersson
  0 siblings, 0 replies; 4+ messages in thread
From: Mikael Pettersson @ 2003-10-01 14:41 UTC (permalink / raw)
  To: viro; +Cc: linux-kernel

Mikael Pettersson writes:
 > viro@parcelfarce.linux.theplanet.co.uk writes:
 >  > On Wed, Oct 01, 2003 at 11:04:30AM +0200, Mikael Pettersson wrote:
 >  > > fs/libfs.c:get_sb_pseudo() isn't exported to modules,
 >  > > but a lot of the other stuff in fs/libfs.c is.
 >  > > 
 >  > > Is there a particular reason for this or just an oversight?
 >  > > 
 >  > > Making a private copy of get_sb_pseudo()'s definition works
 >  > > in a module, but that's not exactly productive use of
 >  > > programmer time or source and object code space.
 >  > 
 >  > Are you really sure that get_sb_pseudo() is what you need?  It might be
 >  > possible, but I suspect that simple_fill_super() would be the right thing
 >  > to use.  Care to give details?
 > 
 > I have a pseudo fs to support special files constructed and
 > returned as the result of certain operations in the module.
 > 
 > This is very very similar to what e.g. pipefs does, so the
 > fs implementation is closely modelled after fs/pipe.c. And
 > since pipefs, futexes, and a number of other pseudo fs:s in
 > the kernel all use get_sb_pseudo() in their ->get_sb method,
 > I figured I should do the same.

I've now checked what simple_fill_super() does, and it doesn't
seem like a valid replacement for get_sb_pseudo(), especially
since it allocates a root directory inode and populates it.
This is clearly not needed for a pseudo fs that won't be mounted.

I can submit a trivial patch to export get_sb_pseudo(), but it
may fare better with Linus if Al ACKs it first.

/Mikael

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

end of thread, other threads:[~2003-10-01 14:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-10-01  9:04 2.6: why no EXPORT_SYMBOL of get_sb_pseudo()? Mikael Pettersson
2003-10-01 11:03 ` viro
2003-10-01 11:38   ` Mikael Pettersson
2003-10-01 14:41     ` Mikael Pettersson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox