Home | History | Annotate | Download | only in quota

Lines Matching refs:fs

100 static int compute_num_blocks_proc(ext2_filsys fs, blk64_t *blocknr,
112 errcode_t quota_inode_truncate(ext2_filsys fs, ext2_ino_t ino)
117 if ((err = ext2fs_read_inode(fs, ino, &inode)))
121 inode.i_dtime = fs->now ? fs->now : time(0);
122 if (!ext2fs_inode_has_valid_blocks2(fs, &inode))
124 err = ext2fs_punch(fs, ino, &inode, NULL, 0, ~0ULL);
127 fs->flags &= ~EXT2_FLAG_SUPER_ONLY;
132 err = ext2fs_write_inode(fs, ino, &inode);
136 static ext2_off64_t compute_inode_size(ext2_filsys fs, ext2_ino_t ino)
140 ext2fs_block_iterate3(fs, ino,
145 return num_blocks * fs->blocksize;
199 errcode_t quota_file_open(struct quota_handle *h, ext2_filsys fs,
208 err = ext2fs_read_bitmaps(fs);
213 err = ext2fs_file_open(fs, qf_ino, flags, &e2_file);
220 h->qh_qf.fs = fs;
246 static errcode_t quota_inode_init_new(ext2_filsys fs, ext2_ino_t ino)
251 err = ext2fs_read_inode(fs, ino, &inode);
258 quota_inode_truncate(fs, ino);
261 ext2fs_iblk_set(fs, &inode, 0);
263 inode.i_ctime = fs->now ? fs->now : time(0);
267 if (fs->super->s_feature_incompat &
271 err = ext2fs_write_new_inode(fs, ino, &inode);
282 errcode_t quota_file_create(struct quota_handle *h, ext2_filsys fs, int type, int fmt)
291 h->qh_qf.fs = fs;
299 err = ext2fs_read_bitmaps(fs);
303 err = quota_inode_init_new(fs, qf_inum);
313 err = ext2fs_file_open(fs, qf_inum,
339 quota_inode_truncate(fs, qf_inum);
360 compute_inode_size(h->qh_qf.fs, h->qh_qf.ino));