Home | History | Annotate | Download | only in ext2fs

Lines Matching refs:fs

26 static unsigned int list_backups(ext2_filsys fs, unsigned int *three,
33 if (!(fs->super->s_feature_ro_compat &
61 errcode_t ext2fs_create_resize_inode(ext2_filsys fs)
71 EXT2_CHECK_MAGIC(fs, EXT2_ET_MAGIC_EXT2FS_FILSYS);
73 sb = fs->super;
75 retval = ext2fs_get_array(2, fs->blocksize, &dindir_buf);
78 gdt_buf = (__u32 *)((char *)dindir_buf + fs->blocksize);
80 retval = ext2fs_read_inode(fs, EXT2_RESIZE_INO, &inode);
90 retval = ext2fs_read_ind_block(fs, dindir_blk, dindir_buf);
94 blk_t goal = sb->s_first_data_block + fs->desc_blocks +
96 fs->inode_blocks_per_group;
98 retval = ext2fs_alloc_block(fs, goal, 0, &dindir_blk);
104 ext2fs_iblk_set(fs, &inode, 1);
105 memset(dindir_buf, 0, fs->blocksize);
111 inode_size *= fs->blocksize;
118 inode.i_ctime = fs->now ? fs->now : time(0);
121 for (rsv_off = 0, gdt_off = fs->desc_blocks,
122 gdt_blk = sb->s_first_data_block + 1 + fs->desc_blocks;
134 retval = ext2fs_new_block(fs, gdt_blk, 0, &new_blk);
143 memset(gdt_buf, 0, fs->blocksize);
145 ext2fs_iblk_add_blocks(fs, &inode, 1);
154 retval = ext2fs_read_ind_block(fs, gdt_blk, gdt_buf);
166 while ((grp = list_backups(fs, &three, &five, &seven)) <
167 fs->group_desc_count) {
176 ext2fs_iblk_add_blocks(fs, &inode, 1);
192 retval = ext2fs_write_ind_block(fs, gdt_blk, gdt_buf);
200 retval2 = ext2fs_write_ind_block(fs, dindir_blk, dindir_buf);
210 inode.i_atime = inode.i_mtime = fs->now ? fs->now : time(0);
211 retval2 = ext2fs_write_new_inode(fs, EXT2_RESIZE_INO, &inode);