Whamcloud - gitweb
an open(O_LOV_CREATE_DELAY) test
authorpschwan <pschwan>
Thu, 30 Jan 2003 21:09:09 +0000 (21:09 +0000)
committerpschwan <pschwan>
Thu, 30 Jan 2003 21:09:09 +0000 (21:09 +0000)
lustre/tests/open_delay.c [new file with mode: 0644]

diff --git a/lustre/tests/open_delay.c b/lustre/tests/open_delay.c
new file mode 100644 (file)
index 0000000..2f41884
--- /dev/null
@@ -0,0 +1,25 @@
+#include <fcntl.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <linux/lustre_lib.h>
+#include <linux/lustre_lite.h>
+#include <linux/obd_lov.h>
+
+int main(int argc, char **argv)
+{
+        int fd; 
+
+        if (argc != 2) { 
+                printf("Usage %s <filename>\n", argv[0]); 
+                exit(1);
+        }
+
+        fd = open(argv[1], O_RDONLY | O_LOV_DELAY_CREATE);
+        if (fd == -1) { 
+                printf("Error opening %s\n", argv[1]);
+                exit(1);
+        }
+
+        return 0;
+}