Lines Matching refs:block

39 /* The inode block count for a file/directory is in units of 512 byte blocks,
40 * _NOT_ the filesystem block size!
229 critical_error_errno("failed to seek to block group descriptors");
233 critical_error_errno("failed to read block group descriptors");
235 critical_error("failed to read all of block group descriptors");
247 printf(" Reserved block group size: %d\n", info.bg_desc_reserve_blocks);
282 static int read_block(int fd, unsigned long long block_num, void *block)
290 critical_error_errno("failed to seek to block %lld\n", block_num);
293 len=read(fd, block, info.block_size);
295 critical_error_errno("failed to read block %lld\n", block_num);
301 static int write_block(int fd, unsigned long long block_num, void *block)
313 critical_error_errno("failed to seek to block %lld\n", block_num);
316 len=write(fd, block, info.block_size);
318 critical_error_errno("failed to write block %lld\n", block_num);
342 unsigned char block[MAX_EXT4_BLOCK_SIZE];
351 read_block(fd, inode_bitmap_block_num, block);
354 if (bitmap_get_bit(block, i)) {
355 bitmap_clear_bit(block, i);
362 printf("Warning: updated inode bitmap for block group %d\n", bg_num);
364 write_block(fd, inode_bitmap_block_num, block);
370 /* Update the superblock and bgdesc of the specified block group */
389 /* Update the free inodes count in each block group descriptor */
434 critical_error_errno("failed to seek to block group descriptors");
439 critical_error_errno("failed to write block group descriptors");
441 critical_error("failed to write all of block group descriptors");
545 unsigned char block[MAX_EXT4_BLOCK_SIZE];
559 read_block(fd, fs_block_num, block);
560 tmp_ext_hdr = (struct ext4_extent_header *)block;
683 * didn't properly include the rest of the block in rec_len.
685 * the block and exit the loop.