Function report |
Source Code:fs\quota\dquot.c |
Create Date:2022-07-28 20:32:57 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:Generic routine for setting common part of quota structure
Proto:static int do_set_dqblk(struct dquot *dquot, struct qc_dqblk *di)
Type:int
Parameter:
| Type | Parameter | Name |
|---|---|---|
| struct dquot * | dquot | |
| struct qc_dqblk * | di |
| 2653 | dm = Diskquota usage [dq_dqb_lock] |
| 2654 | check_blim = 0 , check_ilim = 0 |
| 2655 | dqi = Information for each quota type [ USRQUOTA (uid) or GRPQUOTA (gid) or PRJQUOTA (projid) ] |
| 2657 | If mask of fields to change in ->set_dqblk() & ~VFS_QC_MASK Then Return -EINVAL |
| 2670 | spin_lock( & Lock protecting dq_dqb changes ) |
| 2671 | If mask of fields to change in ->set_dqblk() & QC_SPACE Then |
| 2673 | check_blim = 1 |
| 2677 | If mask of fields to change in ->set_dqblk() & QC_SPC_SOFT Then preferred limit on disk blks = preferred limit on used space |
| 2679 | If mask of fields to change in ->set_dqblk() & QC_SPC_HARD Then absolute limit on disk blks alloc = absolute limit on used space |
| 2681 | If mask of fields to change in ->set_dqblk() & (QC_SPC_SOFT | QC_SPC_HARD) Then |
| 2682 | check_blim = 1 |
| 2686 | If mask of fields to change in ->set_dqblk() & QC_INO_COUNT Then |
| 2688 | check_ilim = 1 |
| 2694 | If mask of fields to change in ->set_dqblk() & QC_INO_HARD Then absolute limit on allocated inodes = maximum # allocated inodes |
| 2697 | check_ilim = 1 |
| 2701 | If mask of fields to change in ->set_dqblk() & QC_SPC_TIMER Then |
| 2703 | check_blim = 1 |
| 2707 | If mask of fields to change in ->set_dqblk() & QC_INO_TIMER Then |
| 2709 | check_ilim = 1 |
| 2713 | If check_blim Then |
| 2714 | If Not preferred limit on disk blks || current used space + current reserved space for delalloc <= preferred limit on disk blks Then |
| 2716 | ime limit for excessive disk use = 0 |
| 2722 | If check_ilim Then |
| 2723 | If Not preferred inode limit || current # allocated inodes <= preferred inode limit Then |
| 2725 | ime limit for excessive inode use = 0 |
| 2734 | Else Atomically set a bit in memory |
| 2736 | spin_unlock( & Lock protecting dq_dqb changes ) |
| 2737 | mark_dquot_dirty(dquot) |
| 2739 | Return 0 |
| Name | Describe |
|---|---|
| dquot_set_dqblk |
| Source code conversion tool public plug-in interface | X |
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |