diff options
author | Keith Bostic <keith@wiredtiger.com> | 2015-04-12 10:16:34 -0400 |
---|---|---|
committer | Keith Bostic <keith@wiredtiger.com> | 2015-04-12 10:16:34 -0400 |
commit | f26f1c1c59d5cbbc8f5f543215d8fc636e7175d2 (patch) | |
tree | 0b6548f7106ee60b2f3e94d9efe685ea0f3c16a6 /src/os_posix | |
parent | 2e8422edcf233f141507f2a743f118f22c009cb5 (diff) | |
download | mongo-f26f1c1c59d5cbbc8f5f543215d8fc636e7175d2.tar.gz |
The OS layer ftruncate() code sets the WT_FH file size, so when
ftruncate is used to extend the file, we skip over the bytes added to
the file during block allocation, and verify eventually fails because
there are unverified blocks in the file.
Reference #1871.
Diffstat (limited to 'src/os_posix')
-rw-r--r-- | src/os_posix/os_ftruncate.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/os_posix/os_ftruncate.c b/src/os_posix/os_ftruncate.c index ce2527e87e2..696d8da54f4 100644 --- a/src/os_posix/os_ftruncate.c +++ b/src/os_posix/os_ftruncate.c @@ -18,10 +18,8 @@ __wt_ftruncate(WT_SESSION_IMPL *session, WT_FH *fh, wt_off_t len) WT_DECL_RET; WT_SYSCALL_RETRY(ftruncate(fh->fd, len), ret); - if (ret == 0) { - fh->size = fh->extend_size = len; + if (ret == 0) return (0); - } WT_RET_MSG(session, ret, "%s ftruncate error", fh->name); } |