X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Ftests%2Fmultiop.c;h=90dd41398dfc13c74ce785bbf26cd6469a33667e;hp=1feb1eea88218b227a14c61a603f22cc8f0a7259;hb=06be2b427fbca4f8a9a2be37b951a47ef3315925;hpb=55f2a237320f23cb59df23518f5a72698d4f251c diff --git a/lustre/tests/multiop.c b/lustre/tests/multiop.c index 1feb1ee..90dd413 100644 --- a/lustre/tests/multiop.c +++ b/lustre/tests/multiop.c @@ -15,11 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf - * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ @@ -27,7 +23,7 @@ * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * - * Copyright (c) 2012, 2014, Intel Corporation. + * Copyright (c) 2012, 2015, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/ @@ -37,16 +33,18 @@ #ifndef _GNU_SOURCE #define _GNU_SOURCE /* pull in O_DIRECTORY in bits/fcntl.h */ #endif -#include +#include #include +#include +#include #include -#include #include #include #include #include #include #include +#include #include #include #include @@ -54,7 +52,6 @@ #include #include -#include #include #define T1 "write data before unlink\n" @@ -219,7 +216,7 @@ int main(int argc, char **argv) int save_errno; int verbose = 0; int gid = 0; - lustre_fid fid; + struct lu_fid fid; struct timespec ts; struct lov_user_md_v3 lum; __u64 dv; @@ -414,6 +411,10 @@ int main(int argc, char **argv) exit(save_errno); } break; + case 'j': + if (flock(fd, LOCK_EX) == -1) + errx(-1, "flock()"); + break; case 'K': oldpath = POP_ARG(); if (oldpath == NULL) @@ -649,7 +650,7 @@ int main(int argc, char **argv) " %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) {