Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
LU-8150 mdt: Track open+create as mknod
[fs/lustre-release.git]
/
lustre
/
tests
/
multiop.c
diff --git
a/lustre/tests/multiop.c
b/lustre/tests/multiop.c
index
a7436ec
..
40a8cb4
100644
(file)
--- a/
lustre/tests/multiop.c
+++ b/
lustre/tests/multiop.c
@@
-27,7
+27,7
@@
* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
*
* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
*
- * Copyright (c) 2012, 201
4
, Intel Corporation.
+ * Copyright (c) 2012, 201
5
, Intel Corporation.
*/
/*
* This file is part of Lustre, http://www.lustre.org/
*/
/*
* This file is part of Lustre, http://www.lustre.org/
@@
-37,22
+37,23
@@
#ifndef _GNU_SOURCE
#define _GNU_SOURCE /* pull in O_DIRECTORY in bits/fcntl.h */
#endif
#ifndef _GNU_SOURCE
#define _GNU_SOURCE /* pull in O_DIRECTORY in bits/fcntl.h */
#endif
-#include <
stdi
o.h>
+#include <
errn
o.h>
#include <fcntl.h>
#include <fcntl.h>
+#include <limits.h>
+#include <stdio.h>
#include <string.h>
#include <string.h>
-#include <errno.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/mman.h>
#include <sys/vfs.h>
#include <sys/ioctl.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/mman.h>
#include <sys/vfs.h>
#include <sys/ioctl.h>
+#include <sys/xattr.h>
#include <signal.h>
#include <stdlib.h>
#include <unistd.h>
#include <semaphore.h>
#include <time.h>
#include <err.h>
#include <signal.h>
#include <stdlib.h>
#include <unistd.h>
#include <semaphore.h>
#include <time.h>
#include <err.h>
-#include <attr/xattr.h>
#include <lustre/lustre_idl.h>
#include <lustre/lustreapi.h>
#include <lustre/lustre_idl.h>
#include <lustre/lustreapi.h>
@@
-515,12
+516,15
@@
int main(int argc, char **argv)
if (len <= 0)
len = 1;
if (bufsize < len) {
if (len <= 0)
len = 1;
if (bufsize < len) {
- buf = realloc(buf, len + ALIGN_LEN);
- if (buf == NULL) {
+ void *tmp;
+ tmp = realloc(buf, len + ALIGN_LEN);
+ if (tmp == NULL) {
+ free(buf);
save_errno = errno;
perror("allocating buf for read\n");
exit(save_errno);
}
save_errno = errno;
perror("allocating buf for read\n");
exit(save_errno);
}
+ buf = tmp;
bufsize = len;
buf_align = (char *)((long)(buf + ALIGN_LEN) &
~ALIGN_LEN);
bufsize = len;
buf_align = (char *)((long)(buf + ALIGN_LEN) &
~ALIGN_LEN);
@@
-608,12
+612,15
@@
int main(int argc, char **argv)
if (len <= 0)
len = 1;
if (bufsize < len) {
if (len <= 0)
len = 1;
if (bufsize < len) {
- buf = realloc(buf, len + ALIGN_LEN);
- if (buf == NULL) {
+ void *tmp;
+ tmp = realloc(buf, len + ALIGN_LEN);
+ if (tmp == NULL) {
+ free(buf);
save_errno = errno;
perror("allocating buf for write\n");
exit(save_errno);
}
save_errno = errno;
perror("allocating buf for write\n");
exit(save_errno);
}
+ buf = tmp;
bufsize = len;
buf_align = (char *)((long)(buf + ALIGN_LEN) &
~ALIGN_LEN);
bufsize = len;
buf_align = (char *)((long)(buf + ALIGN_LEN) &
~ALIGN_LEN);
@@
-643,7
+650,7
@@
int main(int argc, char **argv)
" %d\n", rc);
exit(-rc);
}
" %d\n", rc);
exit(-rc);
}
- printf("dataversion is
"LPU64"\n",
dv);
+ printf("dataversion is
%ju\n", (uintmax_t)
dv);
break;
case 'y':
if (fsync(fd) == -1) {
break;
case 'y':
if (fsync(fd) == -1) {