diff options
author | Larry Knox <lrknox@hdfgroup.org> | 2020-08-18 17:51:13 (GMT) |
---|---|---|
committer | Larry Knox <lrknox@hdfgroup.org> | 2020-08-18 17:51:13 (GMT) |
commit | 98754591b8dcf2be70957d67ec7172c53cbaa827 (patch) | |
tree | 9bd3faa90a915cf7690e2f2a40ce34ccfa219222 /src/H5FDlog.c | |
parent | 18012b1d98f6f77de78ea5e9a3e01670c66e4bed (diff) | |
download | hdf5-98754591b8dcf2be70957d67ec7172c53cbaa827.zip hdf5-98754591b8dcf2be70957d67ec7172c53cbaa827.tar.gz hdf5-98754591b8dcf2be70957d67ec7172c53cbaa827.tar.bz2 |
Revert "Merge pull request #2477 in HDFFV/hdf5 from pio_update to develop"
This reverts commit ba80bcaff24113f438da0f40cb5b5479d4a21cc6, reversing
changes made to 522ef0dd5ca1daa2b26c3fe4459ddbb1eaf6ec20.
Diffstat (limited to 'src/H5FDlog.c')
-rw-r--r-- | src/H5FDlog.c | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/src/H5FDlog.c b/src/H5FDlog.c index cbd475f..5d1b536 100644 --- a/src/H5FDlog.c +++ b/src/H5FDlog.c @@ -81,10 +81,8 @@ typedef struct H5FD_log_t { int fd; /* the unix file */ haddr_t eoa; /* end of allocated region */ haddr_t eof; /* end of file; current file size */ -#ifndef H5_HAVE_PREADWRITE haddr_t pos; /* current file I/O position */ H5FD_file_op_t op; /* last operation */ -#endif /* H5_HAVE_PREADWRITE */ hbool_t ignore_disabled_file_locks; char filename[H5FD_MAX_FILENAME_LEN]; /* Copy of file name from open operation */ #ifndef H5_HAVE_WIN32_API @@ -573,10 +571,8 @@ H5FD__log_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr) file->fd = fd; H5_CHECKED_ASSIGN(file->eof, haddr_t, sb.st_size, h5_stat_size_t); -#ifndef H5_HAVE_PREADWRITE file->pos = HADDR_UNDEF; file->op = OP_UNKNOWN; -#endif /* H5_HAVE_PREADWRITE */ #ifdef H5_HAVE_WIN32_API file->hFile = (HANDLE)_get_osfhandle(fd); if(INVALID_HANDLE_VALUE == file->hFile) @@ -1284,9 +1280,7 @@ H5FD__log_read(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, had int myerrno = errno; time_t mytime = HDtime(NULL); -#ifndef H5_HAVE_PREADWRITE offset = HDlseek(file->fd, (HDoff_t)0, SEEK_CUR); -#endif /* H5_HAVE_PREADWRITE */ if(file->fa.flags & H5FD_LOG_LOC_READ) HDfprintf(file->logfp, "Error! Reading: %10a-%10a (%10Zu bytes)\n", orig_addr, (orig_addr + orig_size) - 1, orig_size); @@ -1343,19 +1337,15 @@ H5FD__log_read(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, had HDfprintf(file->logfp, "\n"); } /* end if */ -#ifndef H5_HAVE_PREADWRITE /* Update current position */ file->pos = addr; file->op = OP_READ; -#endif /* H5_HAVE_PREADWRITE */ done: if(ret_value < 0) { -#ifndef H5_HAVE_PREADWRITE /* Reset last file I/O information */ file->pos = HADDR_UNDEF; file->op = OP_UNKNOWN; -#endif /* H5_HAVE_PREADWRITE */ } /* end if */ FUNC_LEAVE_NOAPI(ret_value) @@ -1499,9 +1489,7 @@ H5FD__log_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, ha int myerrno = errno; time_t mytime = HDtime(NULL); -#ifndef H5_HAVE_PREADWRITE offset = HDlseek(file->fd, (HDoff_t)0, SEEK_CUR); -#endif /* H5_HAVE_PREADWRITE */ if(file->fa.flags & H5FD_LOG_LOC_WRITE) HDfprintf(file->logfp, "Error! Writing: %10a-%10a (%10Zu bytes)\n", orig_addr, (orig_addr + orig_size) - 1, orig_size); @@ -1553,24 +1541,17 @@ H5FD__log_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, ha HDfprintf(file->logfp, "\n"); } /* end if */ -#ifndef H5_HAVE_PREADWRITE /* Update current position and eof */ file->pos = addr; file->op = OP_WRITE; if(file->pos > file->eof) file->eof = file->pos; -#else /* H5_HAVE_PREADWRITE */ - if(addr > file->eof) - file->eof = addr; -#endif /* H5_HAVE_PREADWRITE */ done: if(ret_value < 0) { -#ifndef H5_HAVE_PREADWRITE /* Reset last file I/O information */ file->pos = HADDR_UNDEF; file->op = OP_UNKNOWN; -#endif /* H5_HAVE_PREADWRITE */ } /* end if */ FUNC_LEAVE_NOAPI(ret_value) @@ -1675,11 +1656,9 @@ H5FD__log_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t H5_ATTR_ /* Update the eof value */ file->eof = file->eoa; -#ifndef H5_HAVE_PREADWRITE /* Reset last file I/O information */ file->pos = HADDR_UNDEF; file->op = OP_UNKNOWN; -#endif /* H5_HAVE_PREADWRITE */ } /* end if */ done: |