Lines Matching refs:q
842 struct gfs2_quota q; in gfs2_adjust_quota() local
852 memset(&q, 0, sizeof(struct gfs2_quota)); in gfs2_adjust_quota()
853 err = gfs2_internal_read(ip, (char *)&q, &loc, sizeof(q)); in gfs2_adjust_quota()
857 loc -= sizeof(q); /* gfs2_internal_read would've advanced the loc ptr */ in gfs2_adjust_quota()
859 be64_add_cpu(&q.qu_value, change); in gfs2_adjust_quota()
860 if (((s64)be64_to_cpu(q.qu_value)) < 0) in gfs2_adjust_quota()
861 q.qu_value = 0; /* Never go negative on quota usage */ in gfs2_adjust_quota()
862 qd->qd_qb.qb_value = q.qu_value; in gfs2_adjust_quota()
865 q.qu_warn = cpu_to_be64(fdq->d_spc_softlimit >> sdp->sd_sb.sb_bsize_shift); in gfs2_adjust_quota()
866 qd->qd_qb.qb_warn = q.qu_warn; in gfs2_adjust_quota()
869 q.qu_limit = cpu_to_be64(fdq->d_spc_hardlimit >> sdp->sd_sb.sb_bsize_shift); in gfs2_adjust_quota()
870 qd->qd_qb.qb_limit = q.qu_limit; in gfs2_adjust_quota()
873 q.qu_value = cpu_to_be64(fdq->d_space >> sdp->sd_sb.sb_bsize_shift); in gfs2_adjust_quota()
874 qd->qd_qb.qb_value = q.qu_value; in gfs2_adjust_quota()
878 err = gfs2_write_disk_quota(ip, &q, loc); in gfs2_adjust_quota()
996 struct gfs2_quota q; in update_qd() local
1001 memset(&q, 0, sizeof(struct gfs2_quota)); in update_qd()
1003 error = gfs2_internal_read(ip, (char *)&q, &pos, sizeof(q)); in update_qd()
1010 qlvb->qb_limit = q.qu_limit; in update_qd()
1011 qlvb->qb_warn = q.qu_warn; in update_qd()
1012 qlvb->qb_value = q.qu_value; in update_qd()