problem in read operations - inconsistency

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

 



Hi All,

My system configuration is   :
Arch : ppc7400
kernel : 2.6.21
Memory : 512MB.
Filesystem : XFS

I am facing a strange problem !

When i do a read operation on a large file, i am not getting the expected data (ie., it reads wrong data).

I have written a simple read & write program, where it does the following :

1.allocate a buffer of 314MB
2.memset it to '5'
3.write this buffer to a file
4.fsync the file
5.close the file
6.open the same file
7.read the contents in chunksize of 4k into a buffer.
8.check the contents for '5'
Here i am supposed to get only '5's, but i get some different value after some reads.

The interesting thing here is : If i open the file with O_DIRECT, i don't see such inconsistency.

Due to this inconsistency, i am not able to untar a large file (600MB) properly. In the middle of untarring i get "Invalid headers". Copy operations are also not happening properly, get "Structure needs cleanining" in the middle of copy. Even the compare on two same files shows me differences.

I guess all the above inconsistency is due to the "buffered read path". Some thing goes wrong in the flow of buffered reads. I have checked the buffer inside the "do_generic_mapping_read" function (ie., before the copy_to_user ), even here there is inconsistency.

I checked the memory with memtest, and harddisk with smartmon tools, found no errors here. Also same problem is reproduced on different m/c's with similar configuration.

Is this a bug in kernel-2.6.21-PPC?
Please help me on finding out the problem.

Thanks
Ashok



--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux