ioctl documentation

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

ioctl documentation

Antonio SJ Musumeci
Is there a fuller description of how ioctl works in FUSE? How something gets to be passed through? With regards to the high level API? What's 'void* arg' vs data?

I'm trying to pass through calls in my overlay filesystem and while certain things work  (FS_IOC_{GET,SET}FLAGS) others don't (FS_IOC_FIEMAP,FIBMAP).

Thanks.

------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
--
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: ioctl documentation

Michael j Theall

Not 100% sure but aren't the FIEMAP/FIBMAP sent as FUSE_BMAP requests? I have never handled this callback myself.

Regards,
Michael Theall

Antonio SJ Musumeci <[hidden email]> wrote on 05/23/2016 09:04:56 AM:

> From: Antonio SJ Musumeci <[hidden email]>

> To: fuse-devel <[hidden email]>
> Date: 05/23/2016 09:37 AM
> Subject: [fuse-devel] ioctl documentation
>
> Is there a fuller description of how ioctl works in FUSE? How
> something gets to be passed through? With regards to the high level
> API? What's 'void* arg' vs data?

>
> I'm trying to pass through calls in my overlay filesystem and while
> certain things work  (FS_IOC_{GET,SET}FLAGS) others
> don't (FS_IOC_FIEMAP,FIBMAP).

>


> Thanks.
> ------------------------------------------------------------------------------
> Mobile security can be enabling, not merely restricting. Employees who
> bring their own devices (BYOD) to work are irked by the imposition of MDM
> restrictions. Mobile Device Manager Plus allows you to control only the
> apps on BYO-devices by containerizing them, leaving personal data untouched!
> https://ad.doubleclick.net/ddm/clk/304595813;131938128;j--
> fuse-devel mailing list
> To unsubscribe or subscribe, visit https://lists.sourceforge.net/
> lists/listinfo/fuse-devel


------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
--
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: ioctl documentation

Nikolaus Rath
In reply to this post by Antonio SJ Musumeci
On May 23 2016, Antonio SJ Musumeci <[hidden email]> wrote:
> Is there a fuller description of how ioctl works in FUSE? How something
> gets to be passed through? With regards to the high level API? What's
> 'void* arg' vs data?

I don't think so, but if you have specific questions I may be able to
answer them (I recently had to dig through the code to figure out how
the example was meant to work).

> I'm trying to pass through calls in my overlay filesystem and while certain
> things work  (FS_IOC_{GET,SET}FLAGS) others don't
> (FS_IOC_FIEMAP,FIBMAP).

My first guess is that the ones that don't work don't have a fixed size
request data (third argument to ioctl syscall)


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

------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
--
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: ioctl documentation

Antonio SJ Musumeci
FIBMAP is fixed and sortof works (it doesn't error) however it always seems to always return 0. FS_IOC_FIEMAP is variable.

What's *arg? I don't see any reference to it's use in any examples or in high level libfuse code.


On Mon, May 23, 2016 at 11:51 AM, Nikolaus Rath <[hidden email]> wrote:
On May 23 2016, Antonio SJ Musumeci <[hidden email]> wrote:
> Is there a fuller description of how ioctl works in FUSE? How something
> gets to be passed through? With regards to the high level API? What's
> 'void* arg' vs data?

I don't think so, but if you have specific questions I may be able to
answer them (I recently had to dig through the code to figure out how
the example was meant to work).

> I'm trying to pass through calls in my overlay filesystem and while certain
> things work  (FS_IOC_{GET,SET}FLAGS) others don't
> (FS_IOC_FIEMAP,FIBMAP).

My first guess is that the ones that don't work don't have a fixed size
request data (third argument to ioctl syscall)


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

------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
--
fuse-devel mailing list
To unsubscribe or subscribe, visit https://lists.sourceforge.net/lists/listinfo/fuse-devel


------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
--
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: ioctl documentation

Nikolaus Rath
On May 23 2016, Antonio SJ Musumeci <[hidden email]> wrote:

>> > I'm trying to pass through calls in my overlay filesystem and while
>> > certain things work (FS_IOC_{GET,SET}FLAGS) others don't
>> > (FS_IOC_FIEMAP,FIBMAP).
>>
>> My first guess is that the ones that don't work don't have a fixed size
>> request data (third argument to ioctl syscall)
>
> FIBMAP is fixed and sortof works (it doesn't error) however it always seems
> to always return 0. FS_IOC_FIEMAP is variable.
>
> What's *arg? I don't see any reference to it's use in any examples or in
> high level libfuse code.

Well, it carries the data (if any) that is provided as an *arg*ument to
the ioctl command. Example from the low-level API:

  if (ioctl(fd, FIOC_GET_SIZE, &size)) {

The command is FIOC_GET_SIZE, and the FUSE file system stores the size
in the "size" variable. The size of "size" is fixed (in fioc.h) to
size_t, so this works.


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

------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
--
fuse-devel mailing list
To unsubscribe or subscribe, visit https://lists.sourceforge.net/lists/listinfo/fuse-devel