2007-08-01 18:14:40

by Wim Colgate

[permalink] [raw]
Subject: question (perhaps unaswerable)

Hi,



I'm looking into a potential problem. The setup is a little arcane; so
please bear with me.



I have an NFS mount (soft, timeo=66, retrans=1, tcp) to a NAS filer. The
client is linux 2.6.18-8 derived.



The client user-mode application uses O_DIRECT and kernel aio support
(io_submit io_getevents) to perform IO. On EIO's the data is retried by
the application.



While running a test program to write a specific pattern to a file, I
will manually bring down, bring up, bring down, etc... the nfs service
on the filer.



Some of the time, everything is as it should be; on an occasion, I will
have "corrupt" data - and by corrupt, I mean the data doesn't actually
get written on disk (the application will read back the file after all
writes are completed and compare the contents to an expected value).



I've run a wireshark (used to be ethereal) trace and discovered that the
file offset to the non-written data never hits the wire. However, with
adequate tracing in the application, I have determined that the aio
writes are returned as succeeded; subsequent IO's just after the one in
question are returned as EIO's, until sometime in the future when I have
the NFS server service restarted.



Firstly, since I'm on 2.6.18 ... does anyone know if there is a later
patch that might address this?



Second, if not, I'm not afraid of kernel hacking to ferret the problem
out - and suggestions on where the "light looks good" for examination
are readily accepted.



Thanks,



Wim


Attachments:
(No filename) (315.00 B)
(No filename) (140.00 B)
Download all attachments