Lines Matching +full:- +full:qf
4 * Jan Kara <jack@suse.cz> - sponsored by SuSE CR
5 * Aditya Kali <adityakali@google.com> - Ported to e2fsprogs
61 return sb->s_prj_quota_inum; in quota_type2inum()
89 if (q->dq_dqb.dqb_bsoftlimit && toqb(q->dq_dqb.dqb_curspace) > in update_grace_times()
90 q->dq_dqb.dqb_bsoftlimit) { in update_grace_times()
91 if (!q->dq_dqb.dqb_btime) in update_grace_times()
92 q->dq_dqb.dqb_btime = in update_grace_times()
93 now + q->dq_h->qh_info.dqi_bgrace; in update_grace_times()
95 q->dq_dqb.dqb_btime = 0; in update_grace_times()
98 if (q->dq_dqb.dqb_isoftlimit && q->dq_dqb.dqb_curinodes > in update_grace_times()
99 q->dq_dqb.dqb_isoftlimit) { in update_grace_times()
100 if (!q->dq_dqb.dqb_itime) in update_grace_times()
101 q->dq_dqb.dqb_itime = in update_grace_times()
102 now + q->dq_h->qh_info.dqi_igrace; in update_grace_times()
104 q->dq_dqb.dqb_itime = 0; in update_grace_times()
118 if (ino == quota_type2inum(qtype, fs->super)) in quota_inode_truncate()
122 inode.i_dtime = fs->now ? fs->now : time(0); in quota_inode_truncate()
128 fs->flags &= ~EXT2_FLAG_SUPER_ONLY; in quota_inode_truncate()
138 static unsigned int quota_write_nomount(struct quota_file *qf, in quota_write_nomount() argument
142 ext2_file_t e2_file = qf->e2_file; in quota_write_nomount()
162 static unsigned int quota_read_nomount(struct quota_file *qf, in quota_read_nomount() argument
166 ext2_file_t e2_file = qf->e2_file; in quota_read_nomount()
192 ext2_filsys fs = qctx->fs; in quota_file_open()
200 if (fmt == -1) in quota_file_open()
208 qf_ino = *quota_sb_inump(fs->super, qtype); in quota_file_open()
218 if (qctx->quota_file[qtype]) { in quota_file_open()
219 h = qctx->quota_file[qtype]; in quota_file_open()
221 (h->qh_file_flags & EXT2_FILE_WRITE)) { in quota_file_open()
236 h->qh_qf.e2_file = e2_file; in quota_file_open()
237 h->qh_qf.fs = fs; in quota_file_open()
238 h->qh_qf.ino = qf_ino; in quota_file_open()
239 h->e2fs_write = quota_write_nomount; in quota_file_open()
240 h->e2fs_read = quota_read_nomount; in quota_file_open()
241 h->qh_file_flags = flags; in quota_file_open()
242 h->qh_io_flags = 0; in quota_file_open()
243 h->qh_type = qtype; in quota_file_open()
244 h->qh_fmt = fmt; in quota_file_open()
245 memset(&h->qh_info, 0, sizeof(h->qh_info)); in quota_file_open()
246 h->qh_ops = "afile_ops_2; in quota_file_open()
248 if (h->qh_ops->check_file && in quota_file_open()
249 (h->qh_ops->check_file(h, qtype, fmt) == 0)) { in quota_file_open()
250 log_err("qh_ops->check_file failed"); in quota_file_open()
255 if (h->qh_ops->init_io && (h->qh_ops->init_io(h) < 0)) { in quota_file_open()
256 log_err("qh_ops->init_io failed"); in quota_file_open()
261 qctx->quota_file[qtype] = h; in quota_file_open()
291 inode.i_ctime = fs->now ? fs->now : time(0); in quota_inode_init_new()
295 if (ext2fs_has_feature_extents(fs->super)) in quota_inode_init_new()
316 if (fmt == -1) in quota_file_create()
319 h->qh_qf.fs = fs; in quota_file_create()
320 qf_inum = quota_type2inum(qtype, fs->super); in quota_file_create()
341 h->qh_qf.ino = qf_inum; in quota_file_create()
342 h->qh_file_flags = EXT2_FILE_WRITE | EXT2_FILE_CREATE; in quota_file_create()
343 h->e2fs_write = quota_write_nomount; in quota_file_create()
344 h->e2fs_read = quota_read_nomount; in quota_file_create()
347 err = ext2fs_file_open(fs, qf_inum, h->qh_file_flags, &e2_file); in quota_file_create()
352 h->qh_qf.e2_file = e2_file; in quota_file_create()
354 h->qh_io_flags = 0; in quota_file_create()
355 h->qh_type = qtype; in quota_file_create()
356 h->qh_fmt = fmt; in quota_file_create()
357 memset(&h->qh_info, 0, sizeof(h->qh_info)); in quota_file_create()
358 h->qh_ops = "afile_ops_2; in quota_file_create()
360 if (h->qh_ops->new_io && (h->qh_ops->new_io(h) < 0)) { in quota_file_create()
361 log_err("qh_ops->new_io failed"); in quota_file_create()
383 if (h->qh_io_flags & IOFL_INFODIRTY) { in quota_file_close()
384 if (h->qh_ops->write_info && h->qh_ops->write_info(h) < 0) in quota_file_close()
386 h->qh_io_flags &= ~IOFL_INFODIRTY; in quota_file_close()
389 if (h->qh_ops->end_io && h->qh_ops->end_io(h) < 0) in quota_file_close()
391 if (h->qh_qf.e2_file) in quota_file_close()
392 ext2fs_file_close(h->qh_qf.e2_file); in quota_file_close()
393 if (qctx->quota_file[h->qh_type] == h) in quota_file_close()
394 ext2fs_free_mem(&qctx->quota_file[h->qh_type]); in quota_file_close()
410 dquot->dq_id = -1; in get_empty_dquot()