• Home
  • Raw
  • Download

Lines Matching +full:- +full:qf

4  * Jan Kara <jack@suse.cz> - sponsored by SuSE CR
5 * Hyojun Kim <hyojun@google.com> - Ported to f2fs-tools
50 struct util_dqblk *m = &dquot->dq_dqb; in v2r1_disk2memdqblk()
53 dquot->dq_id = le32_to_cpu(d->dqb_id); in v2r1_disk2memdqblk()
54 m->dqb_ihardlimit = le64_to_cpu(d->dqb_ihardlimit); in v2r1_disk2memdqblk()
55 m->dqb_isoftlimit = le64_to_cpu(d->dqb_isoftlimit); in v2r1_disk2memdqblk()
56 m->dqb_bhardlimit = le64_to_cpu(d->dqb_bhardlimit); in v2r1_disk2memdqblk()
57 m->dqb_bsoftlimit = le64_to_cpu(d->dqb_bsoftlimit); in v2r1_disk2memdqblk()
58 m->dqb_curinodes = le64_to_cpu(d->dqb_curinodes); in v2r1_disk2memdqblk()
59 m->dqb_curspace = le64_to_cpu(d->dqb_curspace); in v2r1_disk2memdqblk()
60 m->dqb_itime = le64_to_cpu(d->dqb_itime); in v2r1_disk2memdqblk()
61 m->dqb_btime = le64_to_cpu(d->dqb_btime); in v2r1_disk2memdqblk()
66 m->dqb_itime = 0; in v2r1_disk2memdqblk()
74 struct util_dqblk *m = &dquot->dq_dqb; in v2r1_mem2diskdqblk()
77 d->dqb_ihardlimit = cpu_to_le64(m->dqb_ihardlimit); in v2r1_mem2diskdqblk()
78 d->dqb_isoftlimit = cpu_to_le64(m->dqb_isoftlimit); in v2r1_mem2diskdqblk()
79 d->dqb_bhardlimit = cpu_to_le64(m->dqb_bhardlimit); in v2r1_mem2diskdqblk()
80 d->dqb_bsoftlimit = cpu_to_le64(m->dqb_bsoftlimit); in v2r1_mem2diskdqblk()
81 d->dqb_curinodes = cpu_to_le64(m->dqb_curinodes); in v2r1_mem2diskdqblk()
82 d->dqb_curspace = cpu_to_le64(m->dqb_curspace); in v2r1_mem2diskdqblk()
83 d->dqb_itime = cpu_to_le64(m->dqb_itime); in v2r1_mem2diskdqblk()
84 d->dqb_btime = cpu_to_le64(m->dqb_btime); in v2r1_mem2diskdqblk()
85 d->dqb_id = cpu_to_le32(dquot->dq_id); in v2r1_mem2diskdqblk()
86 if (qtree_entry_unused(&dquot->dq_h->qh_info.u.v2_mdqi.dqi_qtree, dp)) in v2r1_mem2diskdqblk()
87 d->dqb_itime = cpu_to_le64(1); in v2r1_mem2diskdqblk()
94 &dquot->dq_h->qh_info.u.v2_mdqi.dqi_qtree; in v2r1_is_id()
98 return le32_to_cpu(d->dqb_id) == dquot->dq_id; in v2r1_is_id()
113 m->dqi_bgrace = le32_to_cpu(d->dqi_bgrace); in v2_disk2memdqinfo()
114 m->dqi_igrace = le32_to_cpu(d->dqi_igrace); in v2_disk2memdqinfo()
115 m->u.v2_mdqi.dqi_flags = le32_to_cpu(d->dqi_flags) & V2_DQF_MASK; in v2_disk2memdqinfo()
116 m->u.v2_mdqi.dqi_qtree.dqi_blocks = le32_to_cpu(d->dqi_blocks); in v2_disk2memdqinfo()
117 m->u.v2_mdqi.dqi_qtree.dqi_free_blk = in v2_disk2memdqinfo()
118 le32_to_cpu(d->dqi_free_blk); in v2_disk2memdqinfo()
119 m->u.v2_mdqi.dqi_qtree.dqi_free_entry = in v2_disk2memdqinfo()
120 le32_to_cpu(d->dqi_free_entry); in v2_disk2memdqinfo()
129 d->dqi_bgrace = cpu_to_le32(m->dqi_bgrace); in v2_mem2diskdqinfo()
130 d->dqi_igrace = cpu_to_le32(m->dqi_igrace); in v2_mem2diskdqinfo()
131 d->dqi_flags = cpu_to_le32(m->u.v2_mdqi.dqi_flags & V2_DQF_MASK); in v2_mem2diskdqinfo()
132 d->dqi_blocks = cpu_to_le32(m->u.v2_mdqi.dqi_qtree.dqi_blocks); in v2_mem2diskdqinfo()
133 d->dqi_free_blk = in v2_mem2diskdqinfo()
134 cpu_to_le32(m->u.v2_mdqi.dqi_qtree.dqi_free_blk); in v2_mem2diskdqinfo()
135 d->dqi_free_entry = in v2_mem2diskdqinfo()
136 cpu_to_le32(m->u.v2_mdqi.dqi_qtree.dqi_free_entry); in v2_mem2diskdqinfo()
141 if (h->read(&h->qh_qf, 0, dqh, sizeof(struct v2_disk_dqheader)) != in v2_read_header()
178 struct quota_file *qf = &h->qh_qf; in v2_init_io() local
181 h->qh_info.u.v2_mdqi.dqi_qtree.dqi_entry_size = in v2_init_io()
183 h->qh_info.u.v2_mdqi.dqi_qtree.dqi_ops = &v2r1_fmt_ops; in v2_init_io()
186 if (h->read(qf, V2_DQINFOOFF, &ddqinfo, in v2_init_io()
188 return -1; in v2_init_io()
189 v2_disk2memdqinfo(&h->qh_info, &ddqinfo); in v2_init_io()
192 info = &h->qh_info.u.v2_mdqi; in v2_init_io()
193 filesize = qf->filesize = f2fs_quota_size(qf); in v2_init_io()
195 ((filesize + F2FS_BLKSIZE - 1) >> F2FS_BLKSIZE_BITS < in v2_init_io()
203 h->qh_qf.ino, in v2_init_io()
207 f2fs_filesize_update(qf->sbi, qf->ino, filesize); in v2_init_io()
210 if ((info->dqi_qtree.dqi_blocks > in v2_init_io()
211 (filesize + QT_BLKSIZE - 1) >> QT_BLKSIZE_BITS)) { in v2_init_io()
213 "dqi_blocks %u", h->qh_qf.ino, in v2_init_io()
214 filesize, info->dqi_qtree.dqi_blocks); in v2_init_io()
215 return -1; in v2_init_io()
217 if (info->dqi_qtree.dqi_free_blk >= info->dqi_qtree.dqi_blocks) { in v2_init_io()
220 h->qh_qf.ino, info->dqi_qtree.dqi_free_blk, in v2_init_io()
221 info->dqi_qtree.dqi_blocks); in v2_init_io()
222 return -1; in v2_init_io()
224 if (info->dqi_qtree.dqi_free_entry >= info->dqi_qtree.dqi_blocks) { in v2_init_io()
226 "dqi_blocks %u", h->qh_qf.ino, in v2_init_io()
227 info->dqi_qtree.dqi_free_entry, in v2_init_io()
228 info->dqi_qtree.dqi_blocks); in v2_init_io()
229 return -1; in v2_init_io()
243 if (h->qh_fmt != QFMT_VFS_V1) in v2_new_io()
244 return -1; in v2_new_io()
247 ddqheader.dqh_magic = cpu_to_le32(file_magics[h->qh_type]); in v2_new_io()
249 if (h->write(&h->qh_qf, 0, &ddqheader, sizeof(ddqheader)) != in v2_new_io()
251 return -1; in v2_new_io()
254 h->qh_info.dqi_bgrace = MAX_DQ_TIME; in v2_new_io()
255 h->qh_info.dqi_igrace = MAX_IQ_TIME; in v2_new_io()
256 h->qh_info.u.v2_mdqi.dqi_flags = 0; in v2_new_io()
257 h->qh_info.u.v2_mdqi.dqi_qtree.dqi_blocks = QT_TREEOFF + 1; in v2_new_io()
258 h->qh_info.u.v2_mdqi.dqi_qtree.dqi_free_blk = 0; in v2_new_io()
259 h->qh_info.u.v2_mdqi.dqi_qtree.dqi_free_entry = 0; in v2_new_io()
260 h->qh_info.u.v2_mdqi.dqi_qtree.dqi_entry_size = in v2_new_io()
262 h->qh_info.u.v2_mdqi.dqi_qtree.dqi_ops = &v2r1_fmt_ops; in v2_new_io()
263 v2_mem2diskdqinfo(&ddqinfo, &h->qh_info); in v2_new_io()
264 if (h->write(&h->qh_qf, V2_DQINFOOFF, &ddqinfo, in v2_new_io()
267 return -1; in v2_new_io()
279 v2_mem2diskdqinfo(&ddqinfo, &h->qh_info); in v2_write_info()
280 if (h->write(&h->qh_qf, V2_DQINFOOFF, &ddqinfo, sizeof(ddqinfo)) != in v2_write_info()
282 return -1; in v2_write_info()
296 * Commit changes of dquot to disk - it might also mean deleting it when quota
302 struct util_dqblk *b = &dquot->dq_dqb; in v2_commit_dquot()
304 if (!b->dqb_curspace && !b->dqb_curinodes && !b->dqb_bsoftlimit && in v2_commit_dquot()
305 !b->dqb_isoftlimit && !b->dqb_bhardlimit && !b->dqb_ihardlimit) in v2_commit_dquot()
328 return -1; in v2_report()