Hi Justin,
I am terribly sorry for the breakage that I introduced when fixing the
append problem. Attached patch should fix the data corruption issues (I
hope!) for pread/pwrite interface users. Thanks for the report and do let
us know if it fixes the Samba errors.
As for fsx, I downloaded from the source url you mentioned and it does
work both in Lite and non-Lite mode, so I could not reproduce your error.
But yes it should succeed even in non-Lite mode.
PVFS2 is not POSIX in certain aspects by design (data consistency, unlinks
of opened files and so on), but most of the basic operations do work
according to spec (Please report if they don't).
The error message "no extend on truncate! not posix!" should not be
printed at all because all the code does is an ftruncate() followed by an
fstat() to check if the size matches that passed to ftruncate().
So something else must be going on. Could you do an strace of the fsx
command and mail to me? It would be good to also see if the kernel logs
(with debugging enabled using insmod pvfs2.ko debug=1) has anything
interesting to report...
Thanks,
Murali
On Thu, 5 Jan 2006, Justin Mazzola Paluska wrote:
> Hello,
>
> I'm trying to debug some problems I've been having with FreeBSD's fsx
> utility on our test PVFS2 cluster. I ask because I'm trying to track
> down some file corruption issues with PVFS and Samba--and the Samba
> people suggested that I try running fs tests like fsx.
>
> We're running PVFS2 1.3.2. I'm using the version of fsx that I've
> pulled from
> <http://www.freebsd.org/cgi/cvsweb.cgi/src/tools/regression/fsx/>.
> Looking at the test code PVFS2's CVS , it looks like the way that I
> should call fsx is:
>
> ./fsx -N 1000 -W -R ${PVFS2_MOUNTPOINT}/fsx_testfile
>
> However, this fails with the error:
>
> no extend on truncate! not posix!
>
> Calling it in "Lite" mode with -L seems to do the trick:
>
> $ ./fsx -L -N 1000 -W -R /RAIDS/RAID_2/pvfs-fsx-test
> mapped writes DISABLED
> All operations completed A-OK!
>
> Then, my question is, should the test succeed in non-Lite mode? I
> realize that PVFS2 is not a POSIX file system, but it seems that PVFS
> is failing on truncation tests. However, this might be something
> that's causing Samba to fail.
>
> As a side note, the samba people also suggested running one of their
> home-grown tests <http://samba.org/ftp/unpacked/junkcode/fstest.c>.
> Their test fails with random data corruption.
> --Justin
>
>
> _______________________________________________
> PVFS2-users mailing list
> [email protected]
> http://www.beowulf-underground.org/mailman/listinfo/pvfs2-users
>
>diff -Naur --exclude doc
/tmp/pvfs2-1.3.2/src/apps/kernel/linux/pvfs2-client-core.c
/home/vilayann/pvfs2-1.3.2/src/apps/kernel/linux/pvfs2-client-core.c
--- /tmp/pvfs2-1.3.2/src/apps/kernel/linux/pvfs2-client-core.c 2005-12-02
09:55:47.000000000 -0600
+++ /home/vilayann/pvfs2-1.3.2/src/apps/kernel/linux/pvfs2-client-core.c
2006-01-05 16:41:02.000000000 -0600
@@ -1294,6 +1294,10 @@
}
#endif /* USE_MMAP_RA_CACHE */
+ gossip_debug(GOSSIP_CLIENTCORE_DEBUG, "%s: off %ld size %ld\n",
+ vfs_request->in_upcall.req.io.io_type == PVFS_IO_READ ? "read" :
"write",
+ (unsigned long) vfs_request->in_upcall.req.io.offset,
+ (unsigned long) vfs_request->in_upcall.req.io.count);
ret = PVFS_Request_contiguous(
(int32_t)vfs_request->in_upcall.req.io.count,
PVFS_BYTE, &vfs_request->mem_req);
diff -Naur --exclude doc /tmp/pvfs2-1.3.2/src/kernel/linux-2.6/file.c
/home/vilayann/pvfs2-1.3.2/src/kernel/linux-2.6/file.c
--- /tmp/pvfs2-1.3.2/src/kernel/linux-2.6/file.c 2005-12-02
09:55:49.000000000 -0600
+++ /home/vilayann/pvfs2-1.3.2/src/kernel/linux-2.6/file.c 2006-01-05
17:02:19.000000000 -0600
@@ -246,9 +246,10 @@
size_t count,
loff_t *offset)
{
- pvfs2_print("pvfs2_file_read: called on %s\n",
+ pvfs2_print("pvfs2_file_read: called on %s [off %lu size %lu]\n",
(file && file->f_dentry && file->f_dentry->d_name.name ?
- (char *)file->f_dentry->d_name.name : "UNKNOWN"));
+ (char *)file->f_dentry->d_name.name : "UNKNOWN"),
+ (unsigned long) *offset, (unsigned long) count);
return pvfs2_inode_read(
file->f_dentry->d_inode, buf, count, offset, 1, 0);
@@ -274,9 +275,11 @@
size_t amt_complete = 0;
int dc_status;
- pvfs2_print("pvfs2_file_write: called on %s\n",
+ pvfs2_print("pvfs2_file_write: called on %s [f_pos %ld off %ld size
%ld]\n",
(file && file->f_dentry && file->f_dentry->d_name.name ?
- (char *)file->f_dentry->d_name.name : "UNKNOWN"));
+ (char *)file->f_dentry->d_name.name : "UNKNOWN"),
+ (unsigned long) file->f_pos,
+ (unsigned long) *offset, (unsigned long) count);
if (!access_ok(VERIFY_READ, buf, count))
return -EFAULT;
@@ -298,7 +301,7 @@
* we would have to do a getattr for the size which is ridiculous.
* So we work that around here...
*/
- if (*offset != file->f_pos)
+ if ((file->f_flags & O_APPEND) && (*offset != file->f_pos))
{
*offset = file->f_pos;
}
_______________________________________________
PVFS2-users mailing list
[email protected]
http://www.beowulf-underground.org/mailman/listinfo/pvfs2-users