PolicyKit confusion

Roland Smith rsmith at xs4all.nl
Sat Dec 24 12:22:24 UTC 2011


On Sat, Dec 24, 2011 at 12:03:30PM +1000, Da Rock wrote:
> > might render the application performing it unresponsive during that time.
> Bingo! Thats exactly the issue. Taking a look at FUSE I can see there 
> are calls that FUSE_FSYNC which I would say is the closest to what is 
> needed. The question is are they implemented in say fuse_msdosfs (I may 
> have just barfed that, but you get the idea) and maybe some others? 

Use the source, Luke! ;-)

> That 
> way the filesystem is treated as normal, the app writes and can return 
> happily, and FUSE takes the responsibility to ensure the data continues 
> to write until finished instead of holding it in buffer for an 
> indeterminate period leaving the user thinking alls well (ergo, the 
> light continues flashing).

I'm not sure how long the defaults waits are. Normally the systems tries to
cluster writes sequenstially for improved throughput. But I'm guessing we're
talking about fractions of seconds at most. Again, browsing the source might
be useful. Also chapter 6 of "The Design and Implementation of the FreeBSD
operating system" might provide insight. 

> Failing that, how does one ensure data is synced manually? Is there a 
> call that could be run periodically at a shorter, more regular intervals?

The sync(1) program flushes the system's write cache.

Roland
-- 
R.F.Smith                                   http://www.xs4all.nl/~rsmith/
[plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated]
pgp: 1A2B 477F 9970 BA3C 2914  B7CE 1277 EFB0 C321 A725 (KeyID: C321A725)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20111224/c2a9371f/attachment.pgp


More information about the freebsd-questions mailing list