numerical result out of range help

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

numerical result out of range help

ct clmsn
i've been implementing a fuse plugin and have been getting weird interactions with bash, ls, and cp on my fuse mount point.

the plugin can copy files from my fuse mount point into any of the local file system paths provided the copy operation is the first thing my plugin is told to perform.

if my fuse plugin performs any operations supporting bash's tab completion or ls on my mount point *prior* to the read operations that support a 'cp' command of data from the mount point to the local file system, fuse emits a "fuse: bad error value: 2" along with an "error: -34 (numerical result out of range -ERANGE)".

my plugin supports the following operations:

read, readdir, getattr, open, flush, opendir

thanks in advance for any help or advice,

chris

------------------------------------------------------------------------------
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: numerical result out of range help

Michael Theall-2
Hi Chris,

It sounds like one of your callbacks is returning ENOENT (value=2, my guess from "fuse: bad error value: 2") instead of -ENOENT. If you are using the high-level api, I believe you are supposed to return a negated errno to indicate error.

Regards,
Michael Theall

On Fri, Jan 20, 2017 at 1:04 PM ct clmsn <[hidden email]> wrote:
i've been implementing a fuse plugin and have been getting weird interactions with bash, ls, and cp on my fuse mount point.

the plugin can copy files from my fuse mount point into any of the local file system paths provided the copy operation is the first thing my plugin is told to perform.

if my fuse plugin performs any operations supporting bash's tab completion or ls on my mount point *prior* to the read operations that support a 'cp' command of data from the mount point to the local file system, fuse emits a "fuse: bad error value: 2" along with an "error: -34 (numerical result out of range -ERANGE)".

my plugin supports the following operations:

read, readdir, getattr, open, flush, opendir

thanks in advance for any help or advice,

chris
------------------------------------------------------------------------------
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

------------------------------------------------------------------------------
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: numerical result out of range help

ct clmsn
Michael,

Sorry about the delayed resposne. Thanks for your help and assistance; you were correct! I had a follow-on question. Can the mode_t of a fuse_file_info struct be determined from the flags member variable?

chris

On Fri, Jan 20, 2017 at 3:24 PM, Michael Theall <[hidden email]> wrote:
Hi Chris,

It sounds like one of your callbacks is returning ENOENT (value=2, my guess from "fuse: bad error value: 2") instead of -ENOENT. If you are using the high-level api, I believe you are supposed to return a negated errno to indicate error.

Regards,
Michael Theall

On Fri, Jan 20, 2017 at 1:04 PM ct clmsn <[hidden email]> wrote:
i've been implementing a fuse plugin and have been getting weird interactions with bash, ls, and cp on my fuse mount point.

the plugin can copy files from my fuse mount point into any of the local file system paths provided the copy operation is the first thing my plugin is told to perform.

if my fuse plugin performs any operations supporting bash's tab completion or ls on my mount point *prior* to the read operations that support a 'cp' command of data from the mount point to the local file system, fuse emits a "fuse: bad error value: 2" along with an "error: -34 (numerical result out of range -ERANGE)".

my plugin supports the following operations:

read, readdir, getattr, open, flush, opendir

thanks in advance for any help or advice,

chris
------------------------------------------------------------------------------
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


------------------------------------------------------------------------------
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: numerical result out of range help

Michael Theall-2
Hi Chris,

No, the mode_t of the file being opened is not available. If you are using 'default_permissions' the permissions will already have been checked according to the mode you returned in 'getattr' or 'lookup'. You won't get the 'open' callback if the permissions fail. Otherwise, you need to perform access rights checking yourself. You can either look it up again in your backend filesystem, or you should cache it from the 'getattr' or 'lookup' you will have already done before the 'open' happens.

Regards,
Michael Theall

On Thu, Jan 26, 2017 at 12:52 PM ct clmsn <[hidden email]> wrote:
Michael,

Sorry about the delayed resposne. Thanks for your help and assistance; you were correct! I had a follow-on question. Can the mode_t of a fuse_file_info struct be determined from the flags member variable?

chris

On Fri, Jan 20, 2017 at 3:24 PM, Michael Theall <[hidden email]> wrote:
Hi Chris,

It sounds like one of your callbacks is returning ENOENT (value=2, my guess from "fuse: bad error value: 2") instead of -ENOENT. If you are using the high-level api, I believe you are supposed to return a negated errno to indicate error.

Regards,
Michael Theall

On Fri, Jan 20, 2017 at 1:04 PM ct clmsn <[hidden email]> wrote:
i've been implementing a fuse plugin and have been getting weird interactions with bash, ls, and cp on my fuse mount point.

the plugin can copy files from my fuse mount point into any of the local file system paths provided the copy operation is the first thing my plugin is told to perform.

if my fuse plugin performs any operations supporting bash's tab completion or ls on my mount point *prior* to the read operations that support a 'cp' command of data from the mount point to the local file system, fuse emits a "fuse: bad error value: 2" along with an "error: -34 (numerical result out of range -ERANGE)".

my plugin supports the following operations:

read, readdir, getattr, open, flush, opendir

thanks in advance for any help or advice,

chris
------------------------------------------------------------------------------
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


------------------------------------------------------------------------------
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: numerical result out of range help

Michael Theall-2
Hi Chris,

I think I misunderstood what you were asking. If you are looking for the 'mode_t' value passed to the 'open(2)' syscall by the user, then yeah those flags are available in 'fuse_file_info::flags' passed into your 'open' callback.

Regards,
Michael Theall

On Thu, Jan 26, 2017 at 2:09 PM Michael Theall <[hidden email]> wrote:
Hi Chris,

No, the mode_t of the file being opened is not available. If you are using 'default_permissions' the permissions will already have been checked according to the mode you returned in 'getattr' or 'lookup'. You won't get the 'open' callback if the permissions fail. Otherwise, you need to perform access rights checking yourself. You can either look it up again in your backend filesystem, or you should cache it from the 'getattr' or 'lookup' you will have already done before the 'open' happens.

Regards,
Michael Theall

On Thu, Jan 26, 2017 at 12:52 PM ct clmsn <[hidden email]> wrote:
Michael,

Sorry about the delayed resposne. Thanks for your help and assistance; you were correct! I had a follow-on question. Can the mode_t of a fuse_file_info struct be determined from the flags member variable?

chris

On Fri, Jan 20, 2017 at 3:24 PM, Michael Theall <[hidden email]> wrote:
Hi Chris,

It sounds like one of your callbacks is returning ENOENT (value=2, my guess from "fuse: bad error value: 2") instead of -ENOENT. If you are using the high-level api, I believe you are supposed to return a negated errno to indicate error.

Regards,
Michael Theall

On Fri, Jan 20, 2017 at 1:04 PM ct clmsn <[hidden email]> wrote:
i've been implementing a fuse plugin and have been getting weird interactions with bash, ls, and cp on my fuse mount point.

the plugin can copy files from my fuse mount point into any of the local file system paths provided the copy operation is the first thing my plugin is told to perform.

if my fuse plugin performs any operations supporting bash's tab completion or ls on my mount point *prior* to the read operations that support a 'cp' command of data from the mount point to the local file system, fuse emits a "fuse: bad error value: 2" along with an "error: -34 (numerical result out of range -ERANGE)".

my plugin supports the following operations:

read, readdir, getattr, open, flush, opendir

thanks in advance for any help or advice,

chris
------------------------------------------------------------------------------
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


------------------------------------------------------------------------------
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: numerical result out of range help

ct clmsn
not a problem. i found this documentation and realized there are specialized callbacks in fuse for managing some io modes. i appreciated your notes, much thanks!

https://www.cs.hmc.edu/~geoff/classes/hmc.cs135.201109/homework/fuse/fuse_doc.html

Chris

On Thu, Jan 26, 2017 at 3:12 PM, Michael Theall <[hidden email]> wrote:
Hi Chris,

I think I misunderstood what you were asking. If you are looking for the 'mode_t' value passed to the 'open(2)' syscall by the user, then yeah those flags are available in 'fuse_file_info::flags' passed into your 'open' callback.

Regards,
Michael Theall

On Thu, Jan 26, 2017 at 2:09 PM Michael Theall <[hidden email]> wrote:
Hi Chris,

No, the mode_t of the file being opened is not available. If you are using 'default_permissions' the permissions will already have been checked according to the mode you returned in 'getattr' or 'lookup'. You won't get the 'open' callback if the permissions fail. Otherwise, you need to perform access rights checking yourself. You can either look it up again in your backend filesystem, or you should cache it from the 'getattr' or 'lookup' you will have already done before the 'open' happens.

Regards,
Michael Theall

On Thu, Jan 26, 2017 at 12:52 PM ct clmsn <[hidden email]> wrote:
Michael,

Sorry about the delayed resposne. Thanks for your help and assistance; you were correct! I had a follow-on question. Can the mode_t of a fuse_file_info struct be determined from the flags member variable?

chris

On Fri, Jan 20, 2017 at 3:24 PM, Michael Theall <[hidden email]> wrote:
Hi Chris,

It sounds like one of your callbacks is returning ENOENT (value=2, my guess from "fuse: bad error value: 2") instead of -ENOENT. If you are using the high-level api, I believe you are supposed to return a negated errno to indicate error.

Regards,
Michael Theall

On Fri, Jan 20, 2017 at 1:04 PM ct clmsn <[hidden email]> wrote:
i've been implementing a fuse plugin and have been getting weird interactions with bash, ls, and cp on my fuse mount point.

the plugin can copy files from my fuse mount point into any of the local file system paths provided the copy operation is the first thing my plugin is told to perform.

if my fuse plugin performs any operations supporting bash's tab completion or ls on my mount point *prior* to the read operations that support a 'cp' command of data from the mount point to the local file system, fuse emits a "fuse: bad error value: 2" along with an "error: -34 (numerical result out of range -ERANGE)".

my plugin supports the following operations:

read, readdir, getattr, open, flush, opendir

thanks in advance for any help or advice,

chris
------------------------------------------------------------------------------
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



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