unknown mount options

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

unknown mount options

Yue Li
I'm currently using the fuse compiled from the repository, and I'm
trying the options suggested in the release note:

https://github.com/libfuse/libfuse/releases

Here's command for mounting

  sudo ./run  -omodules=subdir,subdir=/mnt/store ./mount -o allow_other
-o clone_fd -o writeback_cache

And it gave the error

fuse: unknown option(s): `-o writeback_cache'

Similarly, the max_write option, async_dio and a few others also could
not be recognized. I'm using the passthrough.c example for the tests above.

Is there any special function I need to call to use these options? Thanks!

Best,

Yue


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
--
fuse-devel mailing list
To unsubscribe or subscribe, visit https://lists.sourceforge.net/lists/listinfo/fuse-devel
Reply | Threaded
Open this post in threaded view
|

Re: unknown mount options

Nikolaus Rath
On Feb 02 2017, Yue Li <yli-wUU9E3n5/[hidden email]> wrote:

> I'm currently using the fuse compiled from the repository, and I'm
> trying the options suggested in the release note:
>
> https://github.com/libfuse/libfuse/releases
>
> Here's command for mounting
>
>   sudo ./run  -omodules=subdir,subdir=/mnt/store ./mount -o allow_other
> -o clone_fd -o writeback_cache
>
> And it gave the error
>
> fuse: unknown option(s): `-o writeback_cache'
>
> Similarly, the max_write option, async_dio and a few others also could
> not be recognized. I'm using the passthrough.c example for the tests above.
>
> Is there any special function I need to call to use these options?
> Thanks!

These are (in general) not options that you can pass on the command line
to the filesystem, but options that the filesystem can internally pass
to libfuse.

Best,
-Nikolaus

--
GPG encrypted emails preferred. Key id: 0xD113FCAC3C4E599F
Fingerprint: ED31 791B 2C5C 1613 AF38 8B8A D113 FCAC 3C4E 599F

             »Time flies like an arrow, fruit flies like a Banana.«

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
--
fuse-devel mailing list
To unsubscribe or subscribe, visit https://lists.sourceforge.net/lists/listinfo/fuse-devel
Reply | Threaded
Open this post in threaded view
|

Re: unknown mount options

Yue Li
hi Nikolaus,


On 2/4/17 3:17 PM, Nikolaus Rath wrote:

> On Feb 02 2017, Yue Li <yli-wUU9E3n5/[hidden email]> wrote:
>> I'm currently using the fuse compiled from the repository, and I'm
>> trying the options suggested in the release note:
>>
>> https://github.com/libfuse/libfuse/releases
>>
>> Here's command for mounting
>>
>>    sudo ./run  -omodules=subdir,subdir=/mnt/store ./mount -o allow_other
>> -o clone_fd -o writeback_cache
>>
>> And it gave the error
>>
>> fuse: unknown option(s): `-o writeback_cache'
>>
>> Similarly, the max_write option, async_dio and a few others also could
>> not be recognized. I'm using the passthrough.c example for the tests above.
>>
>> Is there any special function I need to call to use these options?
>> Thanks!
> These are (in general) not options that you can pass on the command line
> to the filesystem, but options that the filesystem can internally pass
> to libfuse.
>
Is there any example on passing these options? Or could you point to the
corresponding functions for doing this?

Best,

Yue

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
--
fuse-devel mailing list
To unsubscribe or subscribe, visit https://lists.sourceforge.net/lists/listinfo/fuse-devel
Reply | Threaded
Open this post in threaded view
|

Re: unknown mount options

Nikolaus Rath
On Feb 04 2017, Yue Li <yli-wUU9E3n5/[hidden email]> wrote:

> On 2/4/17 3:17 PM, Nikolaus Rath wrote:
>> On Feb 02 2017, Yue Li <yli-wUU9E3n5/[hidden email]> wrote:
>>> I'm currently using the fuse compiled from the repository, and I'm
>>> trying the options suggested in the release note:
>>>
>>> https://github.com/libfuse/libfuse/releases
>>>
>>> Here's command for mounting
>>>
>>>    sudo ./run  -omodules=subdir,subdir=/mnt/store ./mount -o allow_other
>>> -o clone_fd -o writeback_cache
>>>
>>> And it gave the error
>>>
>>> fuse: unknown option(s): `-o writeback_cache'
>>>
>>> Similarly, the max_write option, async_dio and a few others also could
>>> not be recognized. I'm using the passthrough.c example for the tests above.
>>>
>>> Is there any special function I need to call to use these options?
>>> Thanks!
>>
>> These are (in general) not options that you can pass on the command line
>> to the filesystem, but options that the filesystem can internally pass
>> to libfuse.
>>
> Is there any example on passing these options? Or could you point to the
> corresponding functions for doing this?

That depends on the option. The recommended way to enable the writeback
cache is to set a flag in your file system's init() handler, see
eg. https://github.com/libfuse/libfuse/blob/master/test/test_write_cache.c#L46.


Is the documentation at
http://libfuse.github.io/doxygen/fuse__common_8h.html and
http://libfuse.github.io/doxygen/fuse__lowlevel_8h.html not clear?

Best,
-Nikolaus


--
GPG encrypted emails preferred. Key id: 0xD113FCAC3C4E599F
Fingerprint: ED31 791B 2C5C 1613 AF38 8B8A D113 FCAC 3C4E 599F

             »Time flies like an arrow, fruit flies like a Banana.«

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
--
fuse-devel mailing list
To unsubscribe or subscribe, visit https://lists.sourceforge.net/lists/listinfo/fuse-devel
Reply | Threaded
Open this post in threaded view
|

Re: unknown mount options

Yue Li
hi Nikolaus,


On 2/4/17 8:34 PM, Nikolaus Rath wrote:

> On Feb 04 2017, Yue Li <yli-wUU9E3n5/[hidden email]> wrote:
>> On 2/4/17 3:17 PM, Nikolaus Rath wrote:
>>> On Feb 02 2017, Yue Li <yli-wUU9E3n5/[hidden email]> wrote:
>>>> I'm currently using the fuse compiled from the repository, and I'm
>>>> trying the options suggested in the release note:
>>>>
>>>> https://github.com/libfuse/libfuse/releases
>>>>
>>>> Here's command for mounting
>>>>
>>>>     sudo ./run  -omodules=subdir,subdir=/mnt/store ./mount -o allow_other
>>>> -o clone_fd -o writeback_cache
>>>>
>>>> And it gave the error
>>>>
>>>> fuse: unknown option(s): `-o writeback_cache'
>>>>
>>>> Similarly, the max_write option, async_dio and a few others also could
>>>> not be recognized. I'm using the passthrough.c example for the tests above.
>>>>
>>>> Is there any special function I need to call to use these options?
>>>> Thanks!
>>> These are (in general) not options that you can pass on the command line
>>> to the filesystem, but options that the filesystem can internally pass
>>> to libfuse.
>>>
>> Is there any example on passing these options? Or could you point to the
>> corresponding functions for doing this?
> That depends on the option. The recommended way to enable the writeback
> cache is to set a flag in your file system's init() handler, see
> eg. https://github.com/libfuse/libfuse/blob/master/test/test_write_cache.c#L46.
>
>
> Is the documentation at
> http://libfuse.github.io/doxygen/fuse__common_8h.html and
> http://libfuse.github.io/doxygen/fuse__lowlevel_8h.html not clear?

I'm following the documentations and example above to enable
writeback_cache.

Currently I'm using the high level interfaces, and I did the following
in the init function to enable writeback_cache and async_dio:

static void *myfs_init(struct fuse_conn_info *conn, struct fuse_config *cfg)
{
   (void) conn;
   cfg->use_ino = 1;
   conn -> want |= FUSE_CAP_WRITEBACK_CACHE;
   conn -> want |= FUSE_CAP_ASYNC_DIO;
   return NULL;
}

Is the above sufficient to turn on the options when using the high-level
APIs?

Then I'm trying to see how can I set the sizes for write() and read().
In the your test code above, it seems you used fuse_opt_parse function
to set the size for write()? Is there any other way to set this
variable? Can I change member variables of conn to do so?

And how do we change the size of read() under async_dio?

Thanks for the help!

Best,

Yue


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
--
fuse-devel mailing list
To unsubscribe or subscribe, visit https://lists.sourceforge.net/lists/listinfo/fuse-devel
Reply | Threaded
Open this post in threaded view
|

Re: unknown mount options

Nikolaus Rath
On Feb 20 2017, Yue Li <yli-wUU9E3n5/[hidden email]> wrote:

> hi Nikolaus,
>
>
> On 2/4/17 8:34 PM, Nikolaus Rath wrote:
>> On Feb 04 2017, Yue Li <yli-wUU9E3n5/[hidden email]> wrote:
>>> On 2/4/17 3:17 PM, Nikolaus Rath wrote:
>>>> On Feb 02 2017, Yue Li <yli-wUU9E3n5/[hidden email]> wrote:
>>>>> I'm currently using the fuse compiled from the repository, and I'm
>>>>> trying the options suggested in the release note:
>>>>>
>>>>> https://github.com/libfuse/libfuse/releases
>>>>>
>>>>> Here's command for mounting
>>>>>
>>>>>     sudo ./run  -omodules=subdir,subdir=/mnt/store ./mount -o allow_other
>>>>> -o clone_fd -o writeback_cache
>>>>>
>>>>> And it gave the error
>>>>>
>>>>> fuse: unknown option(s): `-o writeback_cache'
>>>>>
>>>>> Similarly, the max_write option, async_dio and a few others also could
>>>>> not be recognized. I'm using the passthrough.c example for the tests above.
>>>>>
>>>>> Is there any special function I need to call to use these options?
>>>>> Thanks!
>>>> These are (in general) not options that you can pass on the command line
>>>> to the filesystem, but options that the filesystem can internally pass
>>>> to libfuse.
>>>>
>>> Is there any example on passing these options? Or could you point to the
>>> corresponding functions for doing this?
>> That depends on the option. The recommended way to enable the writeback
>> cache is to set a flag in your file system's init() handler, see
>> eg. https://github.com/libfuse/libfuse/blob/master/test/test_write_cache.c#L46.
>>
>>
>> Is the documentation at
>> http://libfuse.github.io/doxygen/fuse__common_8h.html and
>> http://libfuse.github.io/doxygen/fuse__lowlevel_8h.html not clear?
>
> I'm following the documentations and example above to enable
> writeback_cache.
>
> Currently I'm using the high level interfaces, and I did the following
> in the init function to enable writeback_cache and async_dio:
>
> static void *myfs_init(struct fuse_conn_info *conn, struct fuse_config *cfg)
> {
>    (void) conn;
>    cfg->use_ino = 1;
>    conn -> want |= FUSE_CAP_WRITEBACK_CACHE;
>    conn -> want |= FUSE_CAP_ASYNC_DIO;
>    return NULL;
> }
>
> Is the above sufficient to turn on the options when using the high-level
> APIs?

Yes, but note that you'll get an error if the kernel doesn't support the
requested capabilities. You can check what's supported by looking at
conn->capable.

> Then I'm trying to see how can I set the sizes for write() and read().
> In the your test code above, it seems you used fuse_opt_parse function
> to set the size for write()? Is there any other way to set this
> variable? Can I change member variables of conn to do so?

I think you want to adjust conn->max_write and conn->max_read in init().

> And how do we change the size of read() under async_dio?

Not sure. DIO means most of the kernel is bypassed, so you may not have
control over it.

Best,
-Nikolaus

--
GPG encrypted emails preferred. Key id: 0xD113FCAC3C4E599F
Fingerprint: ED31 791B 2C5C 1613 AF38 8B8A D113 FCAC 3C4E 599F

             »Time flies like an arrow, fruit flies like a Banana.«

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
--
fuse-devel mailing list
To unsubscribe or subscribe, visit https://lists.sourceforge.net/lists/listinfo/fuse-devel