Lines Matching refs:blocksize
43 static int check_zero_block(char *buf, int blocksize)
46 int left = blocksize;
69 buf = malloc(fs->blocksize * BUF_BLOCKS);
94 if (check_zero_block(cp, fs->blocksize)) {
98 cp += fs->blocksize;
99 lseek(fd, fs->blocksize, SEEK_CUR);
104 if (check_zero_block(cp + d*fs->blocksize, fs->blocksize))
108 actual = write(fd, cp, fs->blocksize * d);
113 if (actual != (ssize_t) (fs->blocksize * d)) {
119 cp += fs->blocksize * d;
143 buf = malloc(fs->blocksize * BUF_BLOCKS);
158 actual = read(fd, buf, fs->blocksize * c);
163 if (actual != (ssize_t) (fs->blocksize * c)) {
192 buf = malloc(fs->blocksize);
199 memset(buf, 0, fs->blocksize);
201 actual = write(fd, buf, fs->blocksize);
206 if (actual != (ssize_t) fs->blocksize) {
215 actual = write(fd, cp, fs->blocksize * fs->desc_blocks);
220 if (actual != (ssize_t) (fs->blocksize * fs->desc_blocks)) {
242 size = fs->blocksize * (fs->group_desc_count + 1);
265 memcpy(fs->group_desc, buf + fs->blocksize,
266 fs->blocksize * fs->group_desc_count);
332 size = total_size % fs->blocksize;
335 size = fs->blocksize - size;