Lines Matching refs:blocksize
1429 static struct buffer_head *getblk(kdev_t kdev, blk_t blocknr, int blocksize)
1442 bh->b_size = blocksize;
1577 journal->j_blocksize = ctx->fs->blocksize;
1677 io_channel_set_blksize(ctx->journal_io, ctx->fs->blocksize);
1680 if (ctx->fs->blocksize == 1024)
1682 bh = getblk(dev_journal, start, ctx->fs->blocksize);
1783 ctx->fs->blocksize-V1_SB_SIZE);
1901 memset (p, 0, ctx->fs->blocksize-sizeof(journal_header_t));
1903 jsb->s_blocksize = htonl(ctx->fs->blocksize);
2120 int blocksize = ctx->fs->blocksize;
2141 ctx->superblock, blocksize, io_ptr,
2971 if ((inode->i_size >= fs->blocksize) ||
2972 (blocks != fs->blocksize >> 9) ||
2984 len = strnlen(buf, fs->blocksize);
2985 if (len == fs->blocksize)
3279 block_buf = (char *) e2fsck_allocate_memory(ctx, fs->blocksize * 3,
3968 region = region_create(0, fs->blocksize);
3980 end = block_buf + fs->blocksize;
4169 ((inode->i_size / fs->blocksize) >= 3))
4186 pb.num_blocks *= (fs->blocksize / 512);
4200 (size < (__u64) pb.last_block * fs->blocksize))
4207 pctx->num = (pb.last_block+1) * fs->blocksize;
4291 if (blockcnt * fs->blocksize < p->inode->i_size) {
4877 int blocksize FSCK_ATTR((unused)),
5237 retval = ext2fs_get_mem(fs->blocksize, &cs.buf);
5422 buf = (char *) e2fsck_allocate_memory(ctx, 2*fs->blocksize,
5858 expect_limit = (fs->blocksize - ((char *) ent - block_buf)) /
5929 int left = fs->blocksize - *offset - dirent->rec_len;
5970 prev->rec_len += fs->blocksize - *offset;
5971 *offset = fs->blocksize;
5973 dirent->rec_len = fs->blocksize - *offset;
6053 memset(buf, 0, fs->blocksize);
6085 (dirent->rec_len == fs->blocksize) &&
6088 ((fs->blocksize-8) /
6101 if (((offset + dirent->rec_len) > fs->blocksize) ||
6213 buf + fs->blocksize)) {
6293 } while (offset < fs->blocksize);
6302 if (offset != fs->blocksize) {
6303 cd->pctx.num = dirent->rec_len - fs->blocksize + offset;
6463 (inode.i_blocks == fs->blocksize >> 9))
6635 inode.i_blocks += fs->blocksize / 512;
6636 if (inode.i_size < (db->blockcnt+1) * fs->blocksize)
6637 inode.i_size = (db->blockcnt+1) * fs->blocksize;
6857 inode.i_size = fs->blocksize;
6860 inode.i_blocks = fs->blocksize / 512;
7105 inode.i_size = fs->blocksize;
7108 inode.i_blocks = fs->blocksize / 512;
7241 int blocksize FSCK_ATTR((unused)),
7351 retval = ext2fs_get_mem(fs->blocksize, &block);
7356 memset(block, 0, fs->blocksize);
7416 inode.i_size = (es.last_block + 1) * fs->blocksize;
7417 inode.i_blocks += (fs->blocksize / 512) * es.newblocks;
7538 fs->blocksize, "bad_inode buffer");
10166 * directory supported using a 4k blocksize is roughly a gigabyte, and
10241 offset = blockcnt * fs->blocksize;
10242 if (offset + fs->blocksize > fd->inode->i_size) {
10248 memset(dir, 0, fs->blocksize);
10250 dirent->rec_len = fs->blocksize;
10258 while (dir_offset < fs->blocksize) {
10260 if (((dir_offset + dirent->rec_len) > fs->blocksize) ||
10359 new_mem = realloc(outdir->buf, blocks * fs->blocksize);
10369 outdir->buf = malloc(blocks * fs->blocksize);
10395 *ret = outdir->buf + (outdir->num++ * fs->blocksize);
10396 memset(*ret, 0, fs->blocksize);
10536 (fd->dir_size / fs->blocksize) + 2);
10546 left = fs->blocksize;
10560 left = fs->blocksize - offset;
10599 memset(buf, 0, fs->blocksize);
10610 dir->rec_len = fs->blocksize - 12;
10620 limits->limit = (fs->blocksize - 32) / sizeof(struct ext2_dx_entry);
10632 memset(buf, 0, fs->blocksize);
10635 dir->rec_len = fs->blocksize;
10638 limits->limit = (fs->blocksize - 8) / sizeof(struct ext2_dx_entry);
10758 dir = wd->outdir->buf + (blockcnt * fs->blocksize);
10794 inode.i_size = outdir->num * fs->blocksize;
10795 inode.i_blocks -= (fs->blocksize / 512) * wd.cleared;
10834 (inode.i_size / fs->blocksize) < 2)
11351 limit = fs->blocksize >> 2;
11373 fs->blocksize - pb->truncate_offset);
11405 pb.buf = block_buf + 3 * ctx->fs->blocksize;
11414 inode->i_size + fs->blocksize - 1) /
11415 fs->blocksize);
11416 pb.truncate_offset = inode->i_size % fs->blocksize;
11438 (fs->blocksize / 512);
11497 block_buf = (char *) e2fsck_allocate_memory(ctx, fs->blocksize * 4,
11629 dind_buf = (__u32 *) e2fsck_allocate_memory(ctx, fs->blocksize * 2,
11631 ind_buf = (__u32 *) ((char *) dind_buf + fs->blocksize);
11641 gdt_off %= fs->blocksize/4;
11721 fs->blocksize/4);
11725 EXT2_GOOD_OLD_INODE_SIZE, fs->blocksize);
12005 sb.dir_buf = block_buf + ctx->fs->blocksize*3;
12037 retval = ext2fs_get_mem(fs->blocksize * fs->inode_blocks_per_group,
12044 block_buf = (char *) e2fsck_allocate_memory(ctx, fs->blocksize * 4,
12418 int blocksize;
12426 ctx->blocksize = fs->blocksize;
12432 if (ctx->blocksize) {
12433 ret_sb = ctx->blocksize * 8;
12434 if (ctx->blocksize == 1024)
12440 ctx->blocksize = 1024;
12453 for (blocksize = EXT2_MIN_BLOCK_SIZE;
12454 blocksize <= EXT2_MAX_BLOCK_SIZE; blocksize *= 2) {
12455 superblock = blocksize*8;
12456 if (blocksize == 1024)
12458 io_channel_set_blksize(io, blocksize);
12470 ctx->blocksize = blocksize;
13055 ctx->blocksize = atoi(optarg);
13226 if (ctx->superblock && ctx->blocksize) {
13228 flags, ctx->superblock, ctx->blocksize,
13231 int blocksize;
13232 for (blocksize = EXT2_MIN_BLOCK_SIZE;
13233 blocksize <= EXT2_MAX_BLOCK_SIZE; blocksize *= 2) {
13236 ctx->superblock, blocksize,