Args & Mount & Files

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Args & Mount & Files

Samuel Goto
Hi,

    I have set up a file system using fuse, wich is pretty new ( check
it out in http://www.lsc.ic.unicamp.br/~samuel.goto/jabberfs/jabberfs.html
).

    There are some questions, that I would like to ask :

     1) using mount
     Q) How to use mount to mount my file system ? Do i have to build
a diferent code, or can I use the same binaries ( like hello fs,
fusexmp binaries, etc from the example ) ? I do know that I can mount
with mount, but how ? What about arguments, how are they passed to my
file system when using mount ( since arg passing in examples are
simple ... using argc and argv ... )

     2) about files
     Q) Is there any way to use a file in my fs that has no prior
size, much like a device driver fs ? Users will read things as they
are made avaiable ... how can I do this, since before any read(), fuse
runs the getattr() and I have to tell in the attributes how long the
file is ...



--
f u cn rd ths u cn b a gd prgmr !


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server.
Download it for free - -and be entered to win a 42" plasma tv or your very
own Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
fuse-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/fuse-devel
Reply | Threaded
Open this post in threaded view
|

Re: Args & Mount & Files

Miklos Szeredi
>     I have set up a file system using fuse, wich is pretty new ( check
> it out in http://www.lsc.ic.unicamp.br/~samuel.goto/jabberfs/jabberfs.html
> ).
>
>     There are some questions, that I would like to ask :
>
>      1) using mount
>      Q) How to use mount to mount my file system ?

2.4.0-pre* installs a mount.fuse script.  So you can use mount like this:

  mount -t fuse jabberfs#whatever mountpoint -o opt1,opt2 -ootheropt -r

Then it will invoke the jabberfs program like this:

  jabberfs whatever mountpoint -o opt1,opt2,otheropt,ro

So it splits the mount source into fstype and real mount source and
canonicalizes the options.

> Do i have to build a diferent code, or can I use the same binaries (
> like hello fs, fusexmp binaries, etc from the example ) ?

I think it's better if the same binary can be used.

> I do know that I can mount with mount, but how ? What about
> arguments, how are they passed to my file system when using mount (
> since arg passing in examples are simple ... using argc and argv
> ... )

Since mount will only pass options specified with -o to the
filesystem, it's best if the filesystem can interpret all arguments as
-o options.  FUSE-2.5 will contain better support for parsing options.

>      2) about files
>      Q) Is there any way to use a file in my fs that has no prior
> size, much like a device driver fs ? Users will read things as they
> are made avaiable ... how can I do this, since before any read(), fuse
> runs the getattr() and I have to tell in the attributes how long the
> file is ...

Yes.  2.4.0-pre* has a 'direct_io' flag in 'struct fuse_file_info'.
If you set that to 1 in your open method, the user's read/write calls
will be passed directly (maybe split up if they are too large) to the
filesystem, regardless of the size you returned in getattr.  You can
signal the end of file by returning zero from a read.

Miklos


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server.
Download it for free - -and be entered to win a 42" plasma tv or your very
own Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
fuse-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/fuse-devel
Reply | Threaded
Open this post in threaded view
|

Re: Args & Mount & Files

Samuel Goto
Ok,

     I now installed fuse-2.4 and i am getting a

     fusermount: uknow option --

     when running

     ./configure
     make
     make install
     modprobe fuse
     ./examples/hello /tmp/fuse

     Any idea ?

     I tried to uninstall fuse-2.4 and reinstall fuse-2.3, but I still
get this message ...

    Any Help ?

On 9/17/05, Miklos Szeredi <[hidden email]> wrote:

> >     I have set up a file system using fuse, wich is pretty new ( check
> > it out in http://www.lsc.ic.unicamp.br/~samuel.goto/jabberfs/jabberfs.html
> > ).
> >
> >     There are some questions, that I would like to ask :
> >
> >      1) using mount
> >      Q) How to use mount to mount my file system ?
>
> 2.4.0-pre* installs a mount.fuse script.  So you can use mount like this:
>
>   mount -t fuse jabberfs#whatever mountpoint -o opt1,opt2 -ootheropt -r
>
> Then it will invoke the jabberfs program like this:
>
>   jabberfs whatever mountpoint -o opt1,opt2,otheropt,ro
>
> So it splits the mount source into fstype and real mount source and
> canonicalizes the options.
>
> > Do i have to build a diferent code, or can I use the same binaries (
> > like hello fs, fusexmp binaries, etc from the example ) ?
>
> I think it's better if the same binary can be used.
>
> > I do know that I can mount with mount, but how ? What about
> > arguments, how are they passed to my file system when using mount (
> > since arg passing in examples are simple ... using argc and argv
> > ... )
>
> Since mount will only pass options specified with -o to the
> filesystem, it's best if the filesystem can interpret all arguments as
> -o options.  FUSE-2.5 will contain better support for parsing options.
>
> >      2) about files
> >      Q) Is there any way to use a file in my fs that has no prior
> > size, much like a device driver fs ? Users will read things as they
> > are made avaiable ... how can I do this, since before any read(), fuse
> > runs the getattr() and I have to tell in the attributes how long the
> > file is ...
>
> Yes.  2.4.0-pre* has a 'direct_io' flag in 'struct fuse_file_info'.
> If you set that to 1 in your open method, the user's read/write calls
> will be passed directly (maybe split up if they are too large) to the
> filesystem, regardless of the size you returned in getattr.  You can
> signal the end of file by returning zero from a read.
>
> Miklos
>


--
f u cn rd ths u cn b a gd prgmr !


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server.
Download it for free - -and be entered to win a 42" plasma tv or your very
own Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
fuse-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/fuse-devel
Reply | Threaded
Open this post in threaded view
|

Re: Args & Mount & Files

Miklos Szeredi
>      I now installed fuse-2.4 and i am getting a
>
>      fusermount: uknow option --
>
>      when running
>
>      ./configure
>      make
>      make install
>      modprobe fuse
>      ./examples/hello /tmp/fuse
>
>      Any idea ?

Look for a fusermount program (and old version) found in the path
earlier than the one installed in /usr/local/bin.

It's probably installed as part of a package.

Miklos


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server.
Download it for free - -and be entered to win a 42" plasma tv or your very
own Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
fuse-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/fuse-devel