Web lists-archives.com

Re: [Samba] Does samba support fsync() a directory?


Afair, fsync()ing a directory is subject to platform-specific and
implementation-defined behaviour, and may either

 - work as you'd want and (probably) expect
 - fail with an error
 - fail silently

at least if your application targets more than one operating system/kernel -
and even on one and the same platform, different filesystems might exhibit
sublty different patterns of behaviour.

So whatever you do, it's probably best to assume that the fsync() operation on
your dir fd is going to fail, and route around that (potential) failure as
best as you can.

It still can be beneficial to try fsync()ing to try as hard as possibe to get
operations against the directory as consistent as possible in face of a
potential crash.


with best regards:
- Johannes Truschnigg ( johannes@xxxxxxxxxxxxxxx )

www:   https://johannes.truschnigg.info/
phone: +43 650 2 133337
xmpp:  johannes@xxxxxxxxxxxxxxx

Please do not bother me with HTML-email or attachments. Thank you.

Attachment: signature.asc
Description: PGP signature

To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba