[PVFS2-CVS]
commit by neill in pvfs2/test/kernel/linux-2.6: file_open.c
CVS commit program
cvs at parl.clemson.edu
Tue Jul 20 12:17:59 EDT 2004
Update of /projects/cvsroot/pvfs2/test/kernel/linux-2.6
In directory parlweb:/tmp/cvs-serv25429/test/kernel/linux-2.6
Modified Files:
file_open.c
Log Message:
- add a PVFS_EACCES error code that maps to EACCES
- move PVFS_EDETAIL to be a non-errno pvfs2 error code
- re-add the lookup on create error -PVFS_EEXIST, as if enough clients
try the create, it can still happen (if lookup succeeds, pass
success to kernel, otherwise -PVFS_EACCES)
- update file_open test program with largefile support and some more tests
Index: file_open.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/test/kernel/linux-2.6/file_open.c,v
diff -p -u -r1.1 -r1.2
--- file_open.c 19 Jul 2004 21:13:16 -0000 1.1
+++ file_open.c 20 Jul 2004 15:17:59 -0000 1.2
@@ -6,10 +6,11 @@
unexpected way
compile with:
- gcc file_open.c -o file_open
+ gcc -D_LARGEFILE64_SOURCE file_open.c -o file_open
+ or for no largefile support tests, gcc file_open.c -o file_open
run like:
- ./file_open /mnt/pvfs/testfile
+ ./file_open /mnt/pvfs2/testfile
for comparison, try running it on another file system such as
ext2/ext3
@@ -37,6 +38,10 @@ static open_info_t oinfo[] =
{
REMOVE_FILE_INDICATOR,
+#ifdef _LARGEFILE64_SOURCE
+ { (O_RDONLY | O_LARGEFILE), 0666,
+ "O_RDONLY | O_LARGEFILE", 0, ENOENT },
+#endif
{ (O_RDONLY | O_APPEND), 0666,
"O_RDONLY | O_APPEND", 0, ENOENT },
@@ -45,12 +50,20 @@ static open_info_t oinfo[] =
{ (O_CREAT | O_WRONLY), 0666,
"O_CREAT | O_WRONLY", 0, 0 },
-
+#ifdef _LARGEFILE64_SOURCE
+ { (O_RDONLY | O_LARGEFILE), 0666,
+ "O_RDONLY | O_LARGEFILE", 0, 0 },
+#endif
REMOVE_FILE_INDICATOR,
{ (O_CREAT | O_RDONLY), 0666,
"O_CREAT | O_RDONLY", 0, 0 },
+ REMOVE_FILE_INDICATOR,
+#ifdef _LARGEFILE64_SOURCE
+ { (O_CREAT | O_RDONLY | O_LARGEFILE), 0666,
+ "O_CREAT | O_RDONLY", 0, 0 },
+#endif
REMOVE_FILE_INDICATOR,
{ (O_SYNC | O_RDONLY), 0666,
More information about the PVFS2-CVS
mailing list