Question on continuous EIOs in CIFS protocol

Volker Lendecke Volker.Lendecke at SerNet.DE
Thu Sep 18 11:08:11 MDT 2014


Windows servers expect writes to succeed unless there's a
real error like a full disk or permission denied or so.
There won't be a retry. The retry logic needs to live within
smbd completely.

For a VFS that goes out to a socket and not to a local
syscall, I would recommend that you look at our async I/O.
With Samba 4.1 we have implemented very flexible VFS
operations (pread_send/recv and pwrite_send/recv) that are
able to handle this nicely. In case you're sitting on an
earlier version, you need to take a look at
aio_read/aio_write/aio_return. Not as flexibile, but you can
also implement async retry logic there.

It would be best if you would post your VFS module source
somewhere (it's GPL in the end :-)) so that we can make


On Thu, Sep 18, 2014 at 09:59:53AM -0700, sandeep nag wrote:
> Sure,
> We have written a samba server VFS plugin and I am returning an error EIO
> from the plugin when there is a interrupt to smbd, while reading the data
> from the socket in the plugin, data was sent by the windows client write()
> operation.
> Now my questions is;
> On seeing EIO in the response, what does CIFS protocol on window client do?
> does it retry to do write operation? if so how many times does it try?
> after certain number of times does it stop to try and returns an error
> message to the appliciation?
> Thanks in advance, if it is not clear, I can send the code snippet.
> Thanks,
> Sandeep
> On Wed, Sep 17, 2014 at 1:58 PM, Jeremy Allison <jra at> wrote:
> > On Thu, Sep 18, 2014 at 12:23:23AM +0530, sandeep nag wrote:
> > > There is a scenario in the code, when there are continuous interrupts due
> > > to networks issues I am returning an EIO. Now I would like to know, what
> > > if, there are continuous EIOs from the samba server? What does windows
> > > client do when it sees continuous EIOs from server.
> >
> > More details please. Not enough info here to help.
> >

SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen, mailto:kontakt at

More information about the samba-technical mailing list