From: Jan Kara <jack@suse.cz>
To: Chengguang Xu <cgxu519@gmail.com>
Cc: jack@suse.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] quota: add dqi_dirty_list description to comment of Dquot List Management
Date: Thu, 9 May 2019 12:51:10 +0200 [thread overview]
Message-ID: <20190509105110.GE23589@quack2.suse.cz> (raw)
In-Reply-To: <1557106743-19157-1-git-send-email-cgxu519@gmail.com>
On Mon 06-05-19 09:39:03, Chengguang Xu wrote:
> Actually there are four lists for dquot management, so add
> the description of dqui_dirty_list to comment.
>
> Signed-off-by: Chengguang Xu <cgxu519@gmail.com>
Thanks applied with small addition:
Note that some filesystems do dirty dquot tracking on their own (e.g. in a
journal) and thus don't use dqi_dirty_list.
Honza
> ---
> fs/quota/dquot.c | 10 +++++++---
> 1 file changed, 7 insertions(+), 3 deletions(-)
>
> diff --git a/fs/quota/dquot.c b/fs/quota/dquot.c
> index fc20e06c56ba..6a236bdaef89 100644
> --- a/fs/quota/dquot.c
> +++ b/fs/quota/dquot.c
> @@ -223,9 +223,9 @@ static void put_quota_format(struct quota_format_type *fmt)
>
> /*
> * Dquot List Management:
> - * The quota code uses three lists for dquot management: the inuse_list,
> - * free_dquots, and dquot_hash[] array. A single dquot structure may be
> - * on all three lists, depending on its current state.
> + * The quota code uses four lists for dquot management: the inuse_list,
> + * free_dquots, dqi_dirty_list, and dquot_hash[] array. A single dquot
> + * structure may be on some of those lists, depending on its current state.
> *
> * All dquots are placed to the end of inuse_list when first created, and this
> * list is used for invalidate operation, which must look at every dquot.
> @@ -236,6 +236,10 @@ static void put_quota_format(struct quota_format_type *fmt)
> * dqstats.free_dquots gives the number of dquots on the list. When
> * dquot is invalidated it's completely released from memory.
> *
> + * Dirty dquots are added to the dqi_dirty_list of quota_info when mark
> + * dirtied, and this list is searched when writeback diry dquots to
> + * quota file.
> + *
> * Dquots with a specific identity (device, type and id) are placed on
> * one of the dquot_hash[] hash chains. The provides an efficient search
> * mechanism to locate a specific dquot.
> --
> 2.17.2
>
>
--
Jan Kara <jack@suse.com>
SUSE Labs, CR
prev parent reply other threads:[~2019-05-09 10:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-06 1:39 Chengguang Xu
2019-05-09 10:51 ` Jan Kara [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190509105110.GE23589@quack2.suse.cz \
--to=jack@suse.cz \
--cc=cgxu519@gmail.com \
--cc=jack@suse.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®