From cc0ac5008660c4979f596d328c93dcc16fcb321b Mon Sep 17 00:00:00 2001 From: Julian Kunkel Date: Wed, 2 Sep 2020 10:08:52 +0100 Subject: [PATCH] POSIX GFPS adjusted to new API #248 (#253) --- src/aiori-POSIX.c | 12 ++++++------ src/ior-output.c | 8 ++++---- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/aiori-POSIX.c b/src/aiori-POSIX.c index c46c99b..b099903 100755 --- a/src/aiori-POSIX.c +++ b/src/aiori-POSIX.c @@ -179,7 +179,7 @@ void gpfs_free_all_locks(int fd) EWARNF("gpfs_fcntl(%d, ...) release all locks hint failed.", fd); } } -void gpfs_access_start(int fd, IOR_offset_t length, int access) +void gpfs_access_start(int fd, IOR_offset_t length, IOR_offset_t offset, int access) { int rc; struct { @@ -193,7 +193,7 @@ void gpfs_access_start(int fd, IOR_offset_t length, int access) take_locks.access.structLen = sizeof(take_locks.access); take_locks.access.structType = GPFS_ACCESS_RANGE; - take_locks.access.start = hints->offset; + take_locks.access.start = offset; take_locks.access.length = length; take_locks.access.isWrite = (access == WRITE); @@ -203,7 +203,7 @@ void gpfs_access_start(int fd, IOR_offset_t length, int access) } } -void gpfs_access_end(int fd, IOR_offset_t length, int access) +void gpfs_access_end(int fd, IOR_offset_t length, IOR_offset_t offset, int access) { int rc; struct { @@ -218,7 +218,7 @@ void gpfs_access_end(int fd, IOR_offset_t length, int access) free_locks.free.structLen = sizeof(free_locks.free); free_locks.free.structType = GPFS_FREE_RANGE; - free_locks.free.start = hints->offset; + free_locks.free.start = offset; free_locks.free.length = length; rc = gpfs_fcntl(fd, &free_locks); @@ -539,7 +539,7 @@ static IOR_offset_t POSIX_Xfer(int access, aiori_fd_t *file, IOR_size_t * buffer #ifdef HAVE_GPFS_FCNTL_H if (o->gpfs_hint_access) { - gpfs_access_start(fd, length, access); + gpfs_access_start(fd, length, offset, access); } #endif @@ -600,7 +600,7 @@ static IOR_offset_t POSIX_Xfer(int access, aiori_fd_t *file, IOR_size_t * buffer } #ifdef HAVE_GPFS_FCNTL_H if (o->gpfs_hint_access) { - gpfs_access_end(fd, length, param, access); + gpfs_access_end(fd, length, offset, access); } #endif return (length); diff --git a/src/ior-output.c b/src/ior-output.c index 25366eb..4c05170 100644 --- a/src/ior-output.c +++ b/src/ior-output.c @@ -371,10 +371,10 @@ void ShowTestStart(IOR_param_t *test) PrintKeyValInt("setTimeStampSignature/incompressibleSeed", test->setTimeStampSignature); /* Seed value was copied into setTimeStampSignature as well */ PrintKeyValInt("collective", test->collective); PrintKeyValInt("segmentCount", test->segmentCount); - #ifdef HAVE_GPFS_FCNTL_H - PrintKeyValInt("gpfsHintAccess", test->gpfs_hint_access); - PrintKeyValInt("gpfsReleaseToken", test->gpfs_release_token); - #endif + //#ifdef HAVE_GPFS_FCNTL_H + //PrintKeyValInt("gpfsHintAccess", test->gpfs_hint_access); + //PrintKeyValInt("gpfsReleaseToken", test->gpfs_release_token); + //#endif PrintKeyValInt("transferSize", test->transferSize); PrintKeyValInt("blockSize", test->blockSize); PrintEndSection();