direct_io in fuse

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

direct_io in fuse

Christian Magnusson

BTW: Shouldn't we try to mount the fuse-directory with the
-odirect_io option just to make the read-operations "atomic".
I'm mostly thinking about the the LCD's counters.ALL which reset
every time you read it, but without this option two different
processes could catch a pressed button.

> cat /var/1wire/FF.720200000100/counters.ALL
           0,           0,           2,           0

The same goes for all uncached files which are supposed to return
a new value... not some other ongoing conversion from another
process.

I thought about it when I say this post from Miklos in fuse-devel.

/Christian


>> I have a question about the usage of the sleep function with
>> fuse. When I tried to use sleep(20) in the read function of
>> hello.c. And then tried to read from it 2 times (the 2nd proces was
>> started 10 sec later) the 1st proces would stop after 20 seconds but
>> the 2nd proces would stop when the 1st process stopped thus after 10
>> seconds. Is this the right behaviour? If so why?
>
>Data from the first read is cached, and immediately returned to the
>second read, once the first was completed.
>
>You can try '-odirect_io' to make each read() start a new request.
>
>Miklos


--
Christian Magnusson <[hidden email]>



-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Owfs-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/owfs-developers
Reply | Threaded
Open this post in threaded view
|

RE: direct_io in fuse

Alfille, Paul H.,M.D.
Absolutely. Do you want to do it, or should I?

Paul

-----Original Message-----
From: [hidden email]
[mailto:[hidden email]]On Behalf Of
Christian Magnusson
Sent: Tuesday, June 21, 2005 2:54 AM
To: owfs-developers
Subject: [Owfs-developers] direct_io in fuse



BTW: Shouldn't we try to mount the fuse-directory with the
-odirect_io option just to make the read-operations "atomic".
I'm mostly thinking about the the LCD's counters.ALL which reset
every time you read it, but without this option two different
processes could catch a pressed button.

> cat /var/1wire/FF.720200000100/counters.ALL
           0,           0,           2,           0

The same goes for all uncached files which are supposed to return
a new value... not some other ongoing conversion from another
process.

I thought about it when I say this post from Miklos in fuse-devel.

/Christian


>> I have a question about the usage of the sleep function with
>> fuse. When I tried to use sleep(20) in the read function of
>> hello.c. And then tried to read from it 2 times (the 2nd proces was
>> started 10 sec later) the 1st proces would stop after 20 seconds but
>> the 2nd proces would stop when the 1st process stopped thus after 10
>> seconds. Is this the right behaviour? If so why?
>
>Data from the first read is cached, and immediately returned to the
>second read, once the first was completed.
>
>You can try '-odirect_io' to make each read() start a new request.
>
>Miklos


--
Christian Magnusson <[hidden email]>



-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Owfs-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/owfs-developers


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. <a href="http://ads.osdn.com/?ad_idt77&alloc_id492&op=click">http://ads.osdn.com/?ad_idt77&alloc_id492&op=click
_______________________________________________
Owfs-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/owfs-developers