Seeing 'Short read' error in Samba-plugin's pwrite() while reading data from socket data.
Volker Lendecke
Volker.Lendecke at SerNet.DE
Mon May 12 22:45:18 MDT 2014
On Mon, May 12, 2014 at 11:56:59PM +0530, sandeep nag wrote:
> I am seeing 'Short read' errors in pwrite() call of our Samba-VFS plugin
> while reading data from socket data. Please suggest me the function to
> debug in samba code and tell me, what could be the possible reasons for
> 'Short read' errors and how can it be fixed.
>
>
> bytes_read = 0;
> while(bytes_read != n)
> {
> read_ret = read(wd->u.rfd, buf + bytes_read, n - bytes_read);
> if (read_ret == 0)
> {
> read_ret = -1;
> CIFS_NOTICE("%s: Short read from socket, n %ld, bytes_read
> %ld," <==== This error is seen in logs.
> " errno %d", __FUNCTION__, n, bytes_read, errno);
As Jeremy said: On a nonblocking socket it just means the
buffer is empty. On a blocking socket, the other end has
closed it.
With best regrads,
Volker Lendecke
--
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
http://www.sernet.de, mailto:kontakt at sernet.de
More information about the samba-technical
mailing list