[OpenAFS-devel] Inconsistency on Linux-S390
jacobi@de.ibm.com
jacobi@de.ibm.com
Tue, 20 Mar 2001 18:08:20 +0100
I am "seeing" files in AFS space differently from Linux-S390!
The problem seems to occur when the data is read from the cache
(from my point of view). I have changed src/afs/LINUX/osi_vnodeops.c
to extract some data from the "read" operation:
src/afs/LINUX/osi_vnodeops.c, line 78
if (code)
code = -code;
else {
osi_FlushPages(vcp, credp); /* ensure stale pages are gone */
AFS_GUNLOCK();
+
+ copy_from_user (dump_output, buf, 16);
+ dump_output[16]='\0';
+ printk (KERN_DEBUG "afs_linux_read: First 16 bytes of the buffer are
\"%s\" before generic_file_read is called\n", dump_output);
+
code = generic_file_read(fp, buf, count, offp);
+
+ copy_from_user (dump_output, buf, 16);
+ dump_output[16]='\0';
+ printk (KERN_DEBUG "afs_linux_read: First 16 bytes of the buffer are
\"%s\" after generic_file_read is called\n", dump_output);
+
AFS_GLOCK();
}
After the patch I started "head .profile" on the same AFS File from
linux-x86 and
from linux-s390,
on linux-x86 I get:
afs_linux_read: First 16 bytes of the buffer are "" before
generic_file_read is called
afs_linux_read: First 16 bytes of the buffer are "## This line is " after
generic_file_read is called
and on linux-S390 I get:
afs_linux_read: First 16 bytes of the buffer are "" before
generic_file_read is called
afs_linux_read: First 16 bytes of the buffer are "# This line is t" after
generic_file_read is called
So it looks like the first byte is cut away for linux-S390. Therefore, a
"zero" char is added at
the end of the file (but for sure I don't want to trade with the AFS but
get that back what
I have stored there and nothing else).
When I look in the cache directory of linux-s390 on the other hand, there
is a corresponding
Vxxxx-file with the correct contents identical to an appropriate entry in
the cache directory of
linux-x86.
Now where is the piece of code responsible for reading out the cache file
and delivering it to
the "read" call from user space? Somewhere a buffer pointer is increased
for wrong, and that
only for S390 systems!
I think there have already been postings concerning inconsistency of the
AFS file cache
on S390-linux. Any successes in this issue?
I will look further to target the spot, but some hints may help me finding
that spot sooner.
Carsten Jacobi