[linux-cifs-client] Error detection when multiple processes write
to same file
Peter Schwenke
peter at bluetoad.com.au
Sat Apr 25 00:54:06 GMT 2009
This potentially opens a can of worms about correct behaviour definition
and is probably a silly question. It popped into my head when I was
looking around the code for the background write-back error detection.
If multiple processes have the same file open (say append mode) and
ignoring all concurrent write, order of write issues etc and just
concentrating on error detection.
If an error occurs in one process (say host down) should the other
processes say when they do an fsync?
man 3 write says
"This volume of IEEE Std 1003.1-2001 does not specify behaviour of
concurrent writes to a file from multiple processes. Applications
should use some form of concurrency control."
So it probably should be left at that.
Currently it seems like, say, the first process can get EHOSTDOWN (from
the write syscall because cifs_writepages invokes as a result of
clientCanCacheAll being false in this situation) , the second will get
EIO probably from flagged error pages after write2 failed in
cifs_writepages for the first process. A third process seems to not get
an error.
--
Regards
...Peter
More information about the linux-cifs-client
mailing list