kernel version(SUSE): 2.6.5-7.97.

There seems to be an abnormal write behavior when
we are writing on /dev/sdc in a loop with following user application code
----------------------------------------------------------------------------
#include <errno.h>
#include<stdio.h>
#include<unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>

for ( i = 0; i<100 ; i++)
{
    ret = write(fd,buf,1000000);
    printf("%d\n", ret);
   fsync(fd);
   printf("%d\n",errno);

}
O/P on scenario-----------------------------------------
before plug pull O/P is like this for each write
1000000
0

and after plug pull O/P for remaining writes is always 
98603
5

Is this correct and why
Or
should be the behaviour
for all remaining writes be
-1
5
or
0
5

since after a plug pull no data transfer can occur.

Thanks and Regards
Deepak
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to