Re: pread/pwrite bug on linux?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Qiuyang Wu <Qiuyang.Wu@xxxxxxxxxxxx> writes:

> Hi All,
>
> Are there any known bugs with pread/pwrite on RHEL Linux when the disk
> partition is close to full?
>
> Reduced a complex application fatal down to a simple program just
> opens a regular file and performs 1M sequential pwrite() of size 8KB
> blocks; at every 100th write, does a pread() to load the very first
> 8KB block and validate its content still matching what was originally
> written.

Could you attach your test program, please?

> BEHAVIOR: pwrite() works for many iterations, then pread() suddenly
> returns data of the requested size but filled with 0's, and strerror
> shows errno="No such file or directory", condition
>       if(size_to_read != pread(fd, buf, size_to_read, ...)) ...
> is not triggered and application has to check errno immediately after
> every call to pread.

The value of errno is undefined if the pread call did not return -1.

Cheers,
Jeff
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux