Re: [PATCH] fs/quota: update quota state flags scheme with project quota flags

2020-10-19 Thread Jan Kara
On Sun 18-10-20 05:56:54, Roman Anufriev wrote:
> Current quota state flags scheme doesn't include project quota and thus
> shows all flags after DQUOT_USAGE_ENABLED wrong. Fix this and also add
> DQUOT_NOLIST_DIRTY to the scheme.
> 
> Signed-off-by: Roman Anufriev 

Thanks. I've added the patch to my tree.

Honza

> ---
>  include/linux/quota.h | 15 ---
>  1 file changed, 8 insertions(+), 7 deletions(-)
> 
> diff --git a/include/linux/quota.h b/include/linux/quota.h
> index 27aab84..18ebd39 100644
> --- a/include/linux/quota.h
> +++ b/include/linux/quota.h
> @@ -448,17 +448,18 @@ struct quota_format_type {
>  };
>  
>  /**
> - * Quota state flags - they actually come in two flavors - for users and 
> groups.
> + * Quota state flags - they come in three flavors - for users, groups and 
> projects.
>   *
>   * Actual typed flags layout:
> - *   USRQUOTAGRPQUOTA
> - *  DQUOT_USAGE_ENABLED  0x0001  0x0002
> - *  DQUOT_LIMITS_ENABLED 0x0004  0x0008
> - *  DQUOT_SUSPENDED  0x0010  0x0020
> + *   USRQUOTAGRPQUOTAPRJQUOTA
> + *  DQUOT_USAGE_ENABLED  0x0001  0x0002  0x0004
> + *  DQUOT_LIMITS_ENABLED 0x0008  0x0010  0x0020
> + *  DQUOT_SUSPENDED  0x0040  0x0080  0x0100
>   *
>   * Following bits are used for non-typed flags:
> - *  DQUOT_QUOTA_SYS_FILE 0x0040
> - *  DQUOT_NEGATIVE_USAGE 0x0080
> + *  DQUOT_QUOTA_SYS_FILE 0x0200
> + *  DQUOT_NEGATIVE_USAGE 0x0400
> + *  DQUOT_NOLIST_DIRTY   0x0800
>   */
>  enum {
>   _DQUOT_USAGE_ENABLED = 0,   /* Track disk usage for users */
> -- 
> 2.7.4
> 
-- 
Jan Kara 
SUSE Labs, CR


[PATCH] fs/quota: update quota state flags scheme with project quota flags

2020-10-17 Thread Roman Anufriev
Current quota state flags scheme doesn't include project quota and thus
shows all flags after DQUOT_USAGE_ENABLED wrong. Fix this and also add
DQUOT_NOLIST_DIRTY to the scheme.

Signed-off-by: Roman Anufriev 
---
 include/linux/quota.h | 15 ---
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/include/linux/quota.h b/include/linux/quota.h
index 27aab84..18ebd39 100644
--- a/include/linux/quota.h
+++ b/include/linux/quota.h
@@ -448,17 +448,18 @@ struct quota_format_type {
 };
 
 /**
- * Quota state flags - they actually come in two flavors - for users and 
groups.
+ * Quota state flags - they come in three flavors - for users, groups and 
projects.
  *
  * Actual typed flags layout:
- * USRQUOTAGRPQUOTA
- *  DQUOT_USAGE_ENABLED0x0001  0x0002
- *  DQUOT_LIMITS_ENABLED   0x0004  0x0008
- *  DQUOT_SUSPENDED0x0010  0x0020
+ * USRQUOTAGRPQUOTAPRJQUOTA
+ *  DQUOT_USAGE_ENABLED0x0001  0x0002  0x0004
+ *  DQUOT_LIMITS_ENABLED   0x0008  0x0010  0x0020
+ *  DQUOT_SUSPENDED0x0040  0x0080  0x0100
  *
  * Following bits are used for non-typed flags:
- *  DQUOT_QUOTA_SYS_FILE   0x0040
- *  DQUOT_NEGATIVE_USAGE   0x0080
+ *  DQUOT_QUOTA_SYS_FILE   0x0200
+ *  DQUOT_NEGATIVE_USAGE   0x0400
+ *  DQUOT_NOLIST_DIRTY 0x0800
  */
 enum {
_DQUOT_USAGE_ENABLED = 0,   /* Track disk usage for users */
-- 
2.7.4