CHUNKSIZE
ptr = malloc(CHUNKSIZE * sizeof *ptr); \
else if (((sz) + 1) % CHUNKSIZE == 0) \
ptr = realloc(ptr, ((sz) + CHUNKSIZE) * sizeof *ptr); \
char buf[CHUNKSIZE];
for (off = 0; finish - start < 10; off += CHUNKSIZE) {
if (pread(fd, buf, CHUNKSIZE, off) < 0)
while (i && cbp->b_bcount < CHUNKSIZE) {
if (bp->b_bcount > (CHUNKSIZE - cbp->b_bcount))
p = cbp->b_data = lfs_malloc(fs, CHUNKSIZE,
fd = setup(width, &args, CHUNKSIZE);
teardown(fd, &args, CHUNKSIZE);
if (check_file(UNCHANGED_CONTROL, CHUNKSIZE, 0) != 0)
write_file(UNCHANGED_CONTROL, CHUNKSIZE, 1, 0);
write_file(UNCHANGED_CONTROL, CHUNKSIZE, 1, 3);
write_file(TO_BE_DELETED, CHUNKSIZE, 1, 4);
write_file(TO_BE_APPENDED, CHUNKSIZE, 1, 5);
write_file(NEWLY_CREATED, CHUNKSIZE, 1, 6);
write_file(TO_BE_APPENDED, CHUNKSIZE, 1, 5);
if (check_file(UNCHANGED_CONTROL, CHUNKSIZE, 3) != 0)
if (check_file(TO_BE_APPENDED, 2 * CHUNKSIZE, 5) != 0)
if (check_file(NEWLY_CREATED, CHUNKSIZE, 6) != 0)
char buf[CHUNKSIZE];
todo = (left_to_copy > CHUNKSIZE) ? CHUNKSIZE : left_to_copy;