diff options
author | Michael Cahill <michael.cahill@wiredtiger.com> | 2013-05-09 21:23:47 +1000 |
---|---|---|
committer | Michael Cahill <michael.cahill@wiredtiger.com> | 2013-05-09 21:23:47 +1000 |
commit | 7e073cfa08380fca6096911fba8ed34514133e2e (patch) | |
tree | 2b483d880f62773f276623181a83a93ff9addf51 /test | |
parent | ae50550dde2adae738c626b764dd2e37a39e145b (diff) | |
download | mongo-7e073cfa08380fca6096911fba8ed34514133e2e.tar.gz |
Use the allocation size for the file "desc" block. This is important for direct I/O, so that reads and writes are aligned as expected.
Diffstat (limited to 'test')
-rw-r--r-- | test/salvage/salvage.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/salvage/salvage.c b/test/salvage/salvage.c index e8a473c7d89..2486d18e439 100644 --- a/test/salvage/salvage.c +++ b/test/salvage/salvage.c @@ -560,8 +560,8 @@ copy(u_int gen, u_int recno) */ if (access(SLVG, F_OK)) { assert((ofp = fopen(SLVG, "w")) != NULL); - assert(fread(buf, 1, 512, ifp) == 512); - assert(fwrite(buf, 1, 512, ofp) == 512); + assert(fread(buf, 1, PSIZE, ifp) == PSIZE); + assert(fwrite(buf, 1, PSIZE, ofp) == PSIZE); } else assert((ofp = fopen(SLVG, "a")) != NULL); @@ -569,7 +569,7 @@ copy(u_int gen, u_int recno) * If there's data, copy/update the first formatted page. */ if (gen != 0) { - assert(fseek(ifp, (long)512, SEEK_SET) == 0); + assert(fseek(ifp, (long)PSIZE, SEEK_SET) == 0); assert(fread(buf, 1, PSIZE, ifp) == PSIZE); dsk = (void *)buf; if (page_type != WT_PAGE_ROW_LEAF) |