Lines Matching full:blocks
22 // Bugfix: fill blocks with inodes
30 // 03 Aug 2000 Bugfix: ind. blocks endian swap
49 // number of blocks per group should be a
160 /* Percentage of blocks that are reserved.*/
166 /* The field i_blocks in the ext2 inode stores the number of data blocks
168 INOBLK is the number of such blocks in an actual disk block */
175 #define EXT2_BAD_INO 1 // Bad blocks inode
190 #define EXT2_NDIR_BLOCKS 11 // direct blocks
445 udecl32(s_blocks_count) /* Count of blocks in the filesystem */ \
446 udecl32(s_r_blocks_count) /* Count of the number of reserved blocks */ \
447 udecl32(s_free_blocks_count) /* Count of the number of free blocks */ \
452 udecl32(s_blocks_per_group) /* Count of the number of blocks in each block group */ \
467 udecl16(s_def_resuid) /* The default uid for reserved blocks */ \
468 udecl16(s_def_resgid) /* The default gid for reserved blocks */
474 udecl16(bg_free_blocks_count) /* Free blocks in the group */ \
489 udecl32(i_blocks) /* Number of blocks used (1 block = 512 bytes) */ \
492 utdecl32(i_block,15) /* Blocks table */ \
541 The blockwalker is used to access all the blocks of a file (including
542 the indirection blocks) through repeated calls to walk_bw.
545 bnum -> total number of blocks so far accessed. including indirection
546 blocks.
547 bpind,bpdind,bptind -> index into indirection blocks.
550 indirect blocks resp. as you might expect from their names. Instead
889 error_msg_and_die("group descr %d. free blocks count == 0 (corrupted fs?)",grp);
891 error_msg_and_die("superblock free blocks count == 0 (corrupted fs?)");
917 /* Distribute inodes amongst all the blocks */
919 /* find the one with the most free blocks and allocate node there */
934 error_msg_and_die("group descr. free blocks count == 0 (corrupted fs?)");
936 error_msg_and_die("superblock free blocks count == 0 (corrupted fs?)");
956 // initalize a blockwalker (iterator for blocks list)
966 // if *create<0, free the block - warning, the metadata blocks contents is
968 // freeing blocks don't stop until the end of
1092 blocks and the first data block
1162 double indirect block and the single,data blocks for it
1203 // add blocks to an inode (file/dir/etc...)
1270 while((bk = walk_bw(fs, dnod, &bw, 0, 0)) != WALK_END) // for all blocks in dir
1796 // endianness swap of x-indirect blocks
1813 /* Currently this will fail b'cos the number of blocks as stored
1814 in i_blocks also includes the indirection blocks (see
1816 stores the count of data blocks ( Actually according to
1818 i_blocks IS supposed to store the count of data blocks). so
1975 error_msg_and_die("reserved blocks value is invalid. Note: options have changed, see --help or the man page.");
1979 error_msg_and_die("too few blocks. Note: options have changed, see --help or the man page.");
1986 /* nbblocks is the total number of blocks in the filesystem.
1987 * a block group can have no more than 8192 blocks.
2002 error_msg_and_die("too much overhead, try fewer inodes or more blocks. Note: options have changed, see --help or the man page.");
2048 /* Mark non-filesystem blocks and inodes as allocated */
2049 /* Mark system blocks and inodes as allocated */
2054 //non-filesystem blocks
2058 //system blocks
2101 // make lost+found directory and reserve blocks
2158 // just walk through blocks list
2170 // walk through blocks list
2178 printf("blocks in inode %d:", nod);
2181 printf("\n%d blocks (%d bytes)\n", bn, bn * BLOCKSIZE);
2184 // saves blocks to FILE*
2323 s = "bad blocks";
2386 printf("%d blocks (%d free, %d reserved), first data block: %d\n",
2395 printf("%d blocks per group,%d frags per group,%d inodes per group\n",
2398 printf("Size of inode table: %d blocks\n",
2488 " -b, --size-in-blocks <blocks>\n"
2491 " -m, --reserved-percentage <percentage of blocks to reserve>\n"
2493 " -e, --fill-value <value> Fill unallocated blocks with value.\n"
2547 { "size-in-blocks", required_argument, NULL, 'b' },