Lines Matching refs:fh
36 HANDLE fh; /**< File handle */ member
116 if (!INVALIDHANDLE(wal->fh)) { in _destroy()
117 iwp_unlock(wal->fh); in _destroy()
118 iwp_closefh(wal->fh); in _destroy()
149 rc = iwp_write(wal->fh, wp, wz); in _flush_wl()
154 rc = iwp_fsync(wal->fh); in _flush_wl()
160 iwrc rc = iwp_ftruncate(wal->fh, 0); in _truncate_wl()
163 rc = iwp_lseek(wal->fh, 0, IWP_SEEK_SET, 0); in _truncate_wl()
165 rc = iwp_fsync(wal->fh); in _truncate_wl()
183 rc = iwp_write(wal->fh, data, (size_t) len); in _write_wl()
388 iwrc rc = iwp_lseek(wal->fh, 0, IWP_SEEK_END, &fsz); in _rollforward_exl()
399 uint8_t *wmm = mmap(0, (size_t) pfsz, PROT_READ, MAP_PRIVATE, wal->fh, 0); in _rollforward_exl()
403 uint8_t *wmm = mmap(0, 0, PROT_READ, MAP_PRIVATE, wal->fh, 0); in _rollforward_exl()
569 IWRC(iwp_lseek(wal->fh, 0, IWP_SEEK_END, &fsz), rc); in _rollforward_exl()
586 iwrc rc = iwp_lseek(wal->fh, 0, IWP_SEEK_END, &fsz); in _recover_wl()
882 HANDLE fh = open(target_file, O_CREAT | O_WRONLY | O_TRUNC, 00600); in iwal_online_backup() local
883 if (INVALIDHANDLE(fh)) { in iwal_online_backup()
888 …HANDLE fh = CreateFile(target_file, GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRI… in iwal_online_backup() local
890 if (INVALIDHANDLE(fh)) { in iwal_online_backup()
910 rc = iwp_pread(fstate.exfile.file.fh, off, buf, sizeof(buf), &sp); in iwal_online_backup()
913 rc = iwp_write(fh, buf, sp); in iwal_online_backup()
930 rc = iwp_pread(wal->fh, off, buf, sizeof(buf), &sp); in iwal_online_backup()
933 rc = iwp_write(fh, buf, sp); in iwal_online_backup()
947 rc = iwp_pread(wal->fh, off, buf, sizeof(buf), &sp); in iwal_online_backup()
950 rc = iwp_write(fh, buf, sp); in iwal_online_backup()
957 rc = iwp_write(fh, &llv, sizeof(llv)); in iwal_online_backup()
961 rc = iwp_write(fh, &lv, sizeof(lv)); in iwal_online_backup()
976 if (!INVALIDHANDLE(fh)) { in iwal_online_backup()
977 IWRC(iwp_fdatasync(fh), rc); in iwal_online_backup()
978 IWRC(iwp_closefh(fh), rc); in iwal_online_backup()
1046 wal->fh = INVALID_HANDLE_VALUE; in iwal_create()
1121 HANDLE fh = open(wal->path, O_CREAT | O_RDWR, IWFS_DEFAULT_FILEMODE); in iwal_create() local
1122 if (INVALIDHANDLE(fh)) { in iwal_create()
1127 HANDLE fh = CreateFile(wal->path, GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ, in iwal_create() local
1129 if (INVALIDHANDLE(fh)) { in iwal_create()
1135 wal->fh = fh; in iwal_create()
1136 rc = iwp_flock(wal->fh, IWP_WLOCK); in iwal_create()