Lines Matching defs:dst

184 static void copy_to_if_dqblk(struct if_dqblk *dst, struct qc_dqblk *src)
186 memset(dst, 0, sizeof(*dst));
187 dst->dqb_bhardlimit = stoqb(src->d_spc_hardlimit);
188 dst->dqb_bsoftlimit = stoqb(src->d_spc_softlimit);
189 dst->dqb_curspace = src->d_space;
190 dst->dqb_ihardlimit = src->d_ino_hardlimit;
191 dst->dqb_isoftlimit = src->d_ino_softlimit;
192 dst->dqb_curinodes = src->d_ino_count;
193 dst->dqb_btime = src->d_spc_timer;
194 dst->dqb_itime = src->d_ino_timer;
195 dst->dqb_valid = QIF_ALL;
258 static void copy_from_if_dqblk(struct qc_dqblk *dst, struct if_dqblk *src)
260 dst->d_spc_hardlimit = qbtos(src->dqb_bhardlimit);
261 dst->d_spc_softlimit = qbtos(src->dqb_bsoftlimit);
262 dst->d_space = src->dqb_curspace;
263 dst->d_ino_hardlimit = src->dqb_ihardlimit;
264 dst->d_ino_softlimit = src->dqb_isoftlimit;
265 dst->d_ino_count = src->dqb_curinodes;
266 dst->d_spc_timer = src->dqb_btime;
267 dst->d_ino_timer = src->dqb_itime;
269 dst->d_fieldmask = 0;
271 dst->d_fieldmask |= QC_SPC_SOFT | QC_SPC_HARD;
273 dst->d_fieldmask |= QC_SPACE;
275 dst->d_fieldmask |= QC_INO_SOFT | QC_INO_HARD;
277 dst->d_fieldmask |= QC_INO_COUNT;
279 dst->d_fieldmask |= QC_SPC_TIMER;
281 dst->d_fieldmask |= QC_INO_TIMER;
543 static void copy_from_xfs_dqblk(struct qc_dqblk *dst, struct fs_disk_quota *src)
545 dst->d_spc_hardlimit = quota_bbtob(src->d_blk_hardlimit);
546 dst->d_spc_softlimit = quota_bbtob(src->d_blk_softlimit);
547 dst->d_ino_hardlimit = src->d_ino_hardlimit;
548 dst->d_ino_softlimit = src->d_ino_softlimit;
549 dst->d_space = quota_bbtob(src->d_bcount);
550 dst->d_ino_count = src->d_icount;
551 dst->d_ino_timer = copy_from_xfs_dqblk_ts(src, src->d_itimer,
553 dst->d_spc_timer = copy_from_xfs_dqblk_ts(src, src->d_btimer,
555 dst->d_ino_warns = src->d_iwarns;
556 dst->d_spc_warns = src->d_bwarns;
557 dst->d_rt_spc_hardlimit = quota_bbtob(src->d_rtb_hardlimit);
558 dst->d_rt_spc_softlimit = quota_bbtob(src->d_rtb_softlimit);
559 dst->d_rt_space = quota_bbtob(src->d_rtbcount);
560 dst->d_rt_spc_timer = copy_from_xfs_dqblk_ts(src, src->d_rtbtimer,
562 dst->d_rt_spc_warns = src->d_rtbwarns;
563 dst->d_fieldmask = 0;
565 dst->d_fieldmask |= QC_INO_SOFT;
567 dst->d_fieldmask |= QC_INO_HARD;
569 dst->d_fieldmask |= QC_SPC_SOFT;
571 dst->d_fieldmask |= QC_SPC_HARD;
573 dst->d_fieldmask |= QC_RT_SPC_SOFT;
575 dst->d_fieldmask |= QC_RT_SPC_HARD;
577 dst->d_fieldmask |= QC_SPC_TIMER;
579 dst->d_fieldmask |= QC_INO_TIMER;
581 dst->d_fieldmask |= QC_RT_SPC_TIMER;
583 dst->d_fieldmask |= QC_SPC_WARNS;
585 dst->d_fieldmask |= QC_INO_WARNS;
587 dst->d_fieldmask |= QC_RT_SPC_WARNS;
589 dst->d_fieldmask |= QC_SPACE;
591 dst->d_fieldmask |= QC_INO_COUNT;
593 dst->d_fieldmask |= QC_RT_SPACE;
596 static void copy_qcinfo_from_xfs_dqblk(struct qc_info *dst,
599 memset(dst, 0, sizeof(*dst));
600 dst->i_spc_timelimit = src->d_btimer;
601 dst->i_ino_timelimit = src->d_itimer;
602 dst->i_rt_spc_timelimit = src->d_rtbtimer;
603 dst->i_ino_warnlimit = src->d_iwarns;
604 dst->i_spc_warnlimit = src->d_bwarns;
605 dst->i_rt_spc_warnlimit = src->d_rtbwarns;
607 dst->i_fieldmask |= QC_SPC_WARNS;
609 dst->i_fieldmask |= QC_INO_WARNS;
611 dst->i_fieldmask |= QC_RT_SPC_WARNS;
613 dst->i_fieldmask |= QC_SPC_TIMER;
615 dst->i_fieldmask |= QC_INO_TIMER;
617 dst->i_fieldmask |= QC_RT_SPC_TIMER;
666 static void copy_to_xfs_dqblk(struct fs_disk_quota *dst, struct qc_dqblk *src,
669 memset(dst, 0, sizeof(*dst));
672 dst->d_fieldmask |= FS_DQ_BIGTIME;
673 dst->d_version = FS_DQUOT_VERSION;
674 dst->d_id = id;
676 dst->d_flags = FS_USER_QUOTA;
678 dst->d_flags = FS_PROJ_QUOTA;
680 dst->d_flags = FS_GROUP_QUOTA;
681 dst->d_blk_hardlimit = quota_btobb(src->d_spc_hardlimit);
682 dst->d_blk_softlimit = quota_btobb(src->d_spc_softlimit);
683 dst->d_ino_hardlimit = src->d_ino_hardlimit;
684 dst->d_ino_softlimit = src->d_ino_softlimit;
685 dst->d_bcount = quota_btobb(src->d_space);
686 dst->d_icount = src->d_ino_count;
687 copy_to_xfs_dqblk_ts(dst, &dst->d_itimer, &dst->d_itimer_hi,
689 copy_to_xfs_dqblk_ts(dst, &dst->d_btimer, &dst->d_btimer_hi,
691 dst->d_iwarns = src->d_ino_warns;
692 dst->d_bwarns = src->d_spc_warns;
693 dst->d_rtb_hardlimit = quota_btobb(src->d_rt_spc_hardlimit);
694 dst->d_rtb_softlimit = quota_btobb(src->d_rt_spc_softlimit);
695 dst->d_rtbcount = quota_btobb(src->d_rt_space);
696 copy_to_xfs_dqblk_ts(dst, &dst->d_rtbtimer, &dst->d_rtbtimer_hi,
698 dst->d_rtbwarns = src->d_rt_spc_warns;