*/
/*
* This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
*
* lustre/tests/rwv.c
*/
#define ACT_VERIFY 16
#define ACT_OUTPUT 32
-void usage()
+static void usage(void)
{
printf("usage: rwv -f filename <-r|-w> [-a] [-z] [-d] [-v]");
printf(" [-s offset] [-o[outf]] -n iovcnt SIZE1 SIZE2 SIZE3...\n");
printf("-a append IO (O_APPEND)\n");
printf("-r file read (O_RDONLY)\n");
printf("-w file write (O_WRONLY)\n");
+ printf("-D open file with (O_DIRECT)\n");
printf("-s set the start pos of the read/write test\n");
printf("-z test for read hitting hole\n");
printf("-d create flags (O_LOV_DELAY_CREATE)\n");
printf("-o write the file content of read to an optional file\n");
}
-int data_verify(struct iovec *iov, int iovcnt, char c)
+static int data_verify(struct iovec *iov, int iovcnt, char c)
{
int i;
struct iovec *iov;
off64_t offset = 0;
- while ((c = getopt(argc, argv, "f:n:s:rwahvdzo::")) != -1) {
+ while ((c = getopt(argc, argv, "f:n:s:rwahvdDzo::")) != -1) {
switch (c) {
case 'f':
fname = optarg;
case 'd':
flags |= O_LOV_DELAY_CREATE;
break;
+ case 'D':
+ flags |= O_DIRECT;
+ break;
case 'z':
pad = 0;
act |= ACT_READHOLE;