Ah: a bit more information after reading fcntl64(2) and mount.cifs(8), noticing that the "mand" flag was present in /proc/mounts for the CIFS mount, and some more testing:
I'm able to successfully perform the record insertion if i mount the
CIFS share with the "nobrl" option. When i mount it with "nobrl", the
"mand" flag in the /proc/mounts line disappears. The record insertion
works whether or not i've build libsqlite3 with
-DSQLITE_DISABLE_DIRSYNC=1, so that particular concern appears to be
unrelated (note that the fsync() call still fails with DIRSYNC
enabled, but sqlite appears to just plow ahead).
From mount.cifs(8):
nobrl
Do not send byte range lock requests to the server. This is
necessary for certain applications that break with cifs
style mandatory byte range locks (and most cifs servers do
not yet support requesting advisory byte range locks).
Does this mean that SQLite (and any application which uses it) are
those "certain applications"?
Or is there a bug in SQLite in the way that it uses locks? Or a bug
in the cifs kernel module?
--dkg
pgpQloU7c8boA.pgp
Description: PGP signature

