LKML Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] fs/quota: update quota state flags scheme with project quota flags
@ 2020-10-18  2:56 Roman Anufriev
  2020-10-19  9:26 ` Jan Kara
  0 siblings, 1 reply; 2+ messages in thread
From: Roman Anufriev @ 2020-10-18  2:56 UTC (permalink / raw)
  To: linux-kernel; +Cc: jack, dmtrmonakhov, dotdot

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 <dotdot@yandex-team.ru>
---
 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:
- *				USRQUOTA	GRPQUOTA
- *  DQUOT_USAGE_ENABLED		0x0001		0x0002
- *  DQUOT_LIMITS_ENABLED	0x0004		0x0008
- *  DQUOT_SUSPENDED		0x0010		0x0020
+ *				USRQUOTA	GRPQUOTA	PRJQUOTA
+ *  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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] fs/quota: update quota state flags scheme with project quota flags
  2020-10-18  2:56 [PATCH] fs/quota: update quota state flags scheme with project quota flags Roman Anufriev
@ 2020-10-19  9:26 ` Jan Kara
  0 siblings, 0 replies; 2+ messages in thread
From: Jan Kara @ 2020-10-19  9:26 UTC (permalink / raw)
  To: Roman Anufriev; +Cc: linux-kernel, jack, dmtrmonakhov

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 <dotdot@yandex-team.ru>

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:
> - *				USRQUOTA	GRPQUOTA
> - *  DQUOT_USAGE_ENABLED		0x0001		0x0002
> - *  DQUOT_LIMITS_ENABLED	0x0004		0x0008
> - *  DQUOT_SUSPENDED		0x0010		0x0020
> + *				USRQUOTA	GRPQUOTA	PRJQUOTA
> + *  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 <jack@suse.com>
SUSE Labs, CR

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-18  2:56 [PATCH] fs/quota: update quota state flags scheme with project quota flags Roman Anufriev
2020-10-19  9:26 ` Jan Kara

LKML Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/lkml/0 lkml/git/0.git
	git clone --mirror https://lore.kernel.org/lkml/1 lkml/git/1.git
	git clone --mirror https://lore.kernel.org/lkml/2 lkml/git/2.git
	git clone --mirror https://lore.kernel.org/lkml/3 lkml/git/3.git
	git clone --mirror https://lore.kernel.org/lkml/4 lkml/git/4.git
	git clone --mirror https://lore.kernel.org/lkml/5 lkml/git/5.git
	git clone --mirror https://lore.kernel.org/lkml/6 lkml/git/6.git
	git clone --mirror https://lore.kernel.org/lkml/7 lkml/git/7.git
	git clone --mirror https://lore.kernel.org/lkml/8 lkml/git/8.git
	git clone --mirror https://lore.kernel.org/lkml/9 lkml/git/9.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 lkml lkml/ https://lore.kernel.org/lkml \
		linux-kernel@vger.kernel.org
	public-inbox-index lkml

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-kernel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git