From: Chandan Babu R <chandanrlinux@gmail.com>
To: "Darrick J. Wong" <darrick.wong@oracle.com>
Cc: Christoph Hellwig <hch@lst.de>, linux-xfs@vger.kernel.org
Subject: Re: [PATCH 07/26] xfs: rename dquot incore state flags
Date: Thu, 16 Jul 2020 12:29:08 +0530 [thread overview]
Message-ID: <3648569.ikp86AD9L0@garuda> (raw)
In-Reply-To: <159477788070.3263162.4867863895520340082.stgit@magnolia>
On Wednesday 15 July 2020 7:21:20 AM IST Darrick J. Wong wrote:
> From: Darrick J. Wong <darrick.wong@oracle.com>
>
> Rename the existing incore dquot "dq_flags" field to "q_flags" to match
> everything else in the structure, then move the two actual dquot state
> flags to the XFS_DQFLAG_ namespace from XFS_DQ_.
>
The changes look good to me.
Reviewed-by: Chandan Babu R <chandanrlinux@gmail.com>
> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
> Reviewed-by: Christoph Hellwig <hch@lst.de>
> ---
> fs/xfs/libxfs/xfs_quota_defs.h | 10 +++++-----
> fs/xfs/xfs_dquot.c | 6 +++---
> fs/xfs/xfs_dquot.h | 4 ++--
> fs/xfs/xfs_qm.c | 12 ++++++------
> fs/xfs/xfs_qm_syscalls.c | 2 +-
> fs/xfs/xfs_trace.h | 4 ++--
> fs/xfs/xfs_trans_dquot.c | 2 +-
> 7 files changed, 20 insertions(+), 20 deletions(-)
>
>
> diff --git a/fs/xfs/libxfs/xfs_quota_defs.h b/fs/xfs/libxfs/xfs_quota_defs.h
> index aaf85a47ae5f..2109fe621e1f 100644
> --- a/fs/xfs/libxfs/xfs_quota_defs.h
> +++ b/fs/xfs/libxfs/xfs_quota_defs.h
> @@ -37,17 +37,17 @@ typedef uint8_t xfs_dqtype_t;
> #define XFS_DQ_USER 0x0001 /* a user quota */
> #define XFS_DQ_PROJ 0x0002 /* project quota */
> #define XFS_DQ_GROUP 0x0004 /* a group quota */
> -#define XFS_DQ_DIRTY 0x0008 /* dquot is dirty */
> -#define XFS_DQ_FREEING 0x0010 /* dquot is being torn down */
> +#define XFS_DQFLAG_DIRTY 0x0008 /* dquot is dirty */
> +#define XFS_DQFLAG_FREEING 0x0010 /* dquot is being torn down */
>
> #define XFS_DQ_ALLTYPES (XFS_DQ_USER|XFS_DQ_PROJ|XFS_DQ_GROUP)
>
> -#define XFS_DQ_FLAGS \
> +#define XFS_DQFLAG_STRINGS \
> { XFS_DQ_USER, "USER" }, \
> { XFS_DQ_PROJ, "PROJ" }, \
> { XFS_DQ_GROUP, "GROUP" }, \
> - { XFS_DQ_DIRTY, "DIRTY" }, \
> - { XFS_DQ_FREEING, "FREEING" }
> + { XFS_DQFLAG_DIRTY, "DIRTY" }, \
> + { XFS_DQFLAG_FREEING, "FREEING" }
>
> /*
> * We have the possibility of all three quota types being active at once, and
> diff --git a/fs/xfs/xfs_dquot.c b/fs/xfs/xfs_dquot.c
> index 8230faa9f66e..91d81a346801 100644
> --- a/fs/xfs/xfs_dquot.c
> +++ b/fs/xfs/xfs_dquot.c
> @@ -730,7 +730,7 @@ xfs_qm_dqget_cache_lookup(
> }
>
> xfs_dqlock(dqp);
> - if (dqp->dq_flags & XFS_DQ_FREEING) {
> + if (dqp->q_flags & XFS_DQFLAG_FREEING) {
> xfs_dqunlock(dqp);
> mutex_unlock(&qi->qi_tree_lock);
> trace_xfs_dqget_freeing(dqp);
> @@ -1186,7 +1186,7 @@ xfs_qm_dqflush(
> /*
> * Clear the dirty field and remember the flush lsn for later use.
> */
> - dqp->dq_flags &= ~XFS_DQ_DIRTY;
> + dqp->q_flags &= ~XFS_DQFLAG_DIRTY;
>
> xfs_trans_ail_copy_lsn(mp->m_ail, &dqp->q_logitem.qli_flush_lsn,
> &dqp->q_logitem.qli_item.li_lsn);
> @@ -1227,7 +1227,7 @@ xfs_qm_dqflush(
> return 0;
>
> out_abort:
> - dqp->dq_flags &= ~XFS_DQ_DIRTY;
> + dqp->q_flags &= ~XFS_DQFLAG_DIRTY;
> xfs_trans_ail_delete(lip, 0);
> xfs_force_shutdown(mp, SHUTDOWN_CORRUPT_INCORE);
> out_unlock:
> diff --git a/fs/xfs/xfs_dquot.h b/fs/xfs/xfs_dquot.h
> index 077d0988cff9..7f3f734bced8 100644
> --- a/fs/xfs/xfs_dquot.h
> +++ b/fs/xfs/xfs_dquot.h
> @@ -31,10 +31,10 @@ enum {
> * The incore dquot structure
> */
> struct xfs_dquot {
> - uint dq_flags;
> struct list_head q_lru;
> struct xfs_mount *q_mount;
> xfs_dqtype_t q_type;
> + uint16_t q_flags;
> uint q_nrefs;
> xfs_daddr_t q_blkno;
> int q_bufoffset;
> @@ -152,7 +152,7 @@ static inline bool xfs_dquot_lowsp(struct xfs_dquot *dqp)
> }
>
> #define XFS_DQ_IS_LOCKED(dqp) (mutex_is_locked(&((dqp)->q_qlock)))
> -#define XFS_DQ_IS_DIRTY(dqp) ((dqp)->dq_flags & XFS_DQ_DIRTY)
> +#define XFS_DQ_IS_DIRTY(dqp) ((dqp)->q_flags & XFS_DQFLAG_DIRTY)
> #define XFS_QM_ISUDQ(dqp) ((dqp)->q_type == XFS_DQTYPE_USER)
> #define XFS_QM_ISPDQ(dqp) ((dqp)->q_type == XFS_DQTYPE_PROJ)
> #define XFS_QM_ISGDQ(dqp) ((dqp)->q_type == XFS_DQTYPE_GROUP)
> diff --git a/fs/xfs/xfs_qm.c b/fs/xfs/xfs_qm.c
> index 939ee728d9af..aabb08e85cd7 100644
> --- a/fs/xfs/xfs_qm.c
> +++ b/fs/xfs/xfs_qm.c
> @@ -124,10 +124,10 @@ xfs_qm_dqpurge(
> int error = -EAGAIN;
>
> xfs_dqlock(dqp);
> - if ((dqp->dq_flags & XFS_DQ_FREEING) || dqp->q_nrefs != 0)
> + if ((dqp->q_flags & XFS_DQFLAG_FREEING) || dqp->q_nrefs != 0)
> goto out_unlock;
>
> - dqp->dq_flags |= XFS_DQ_FREEING;
> + dqp->q_flags |= XFS_DQFLAG_FREEING;
>
> xfs_dqflock(dqp);
>
> @@ -148,7 +148,7 @@ xfs_qm_dqpurge(
> error = xfs_bwrite(bp);
> xfs_buf_relse(bp);
> } else if (error == -EAGAIN) {
> - dqp->dq_flags &= ~XFS_DQ_FREEING;
> + dqp->q_flags &= ~XFS_DQFLAG_FREEING;
> goto out_unlock;
> }
> xfs_dqflock(dqp);
> @@ -474,7 +474,7 @@ xfs_qm_dquot_isolate(
> /*
> * Prevent lookups now that we are past the point of no return.
> */
> - dqp->dq_flags |= XFS_DQ_FREEING;
> + dqp->q_flags |= XFS_DQFLAG_FREEING;
> xfs_dqunlock(dqp);
>
> ASSERT(dqp->q_nrefs == 0);
> @@ -1113,7 +1113,7 @@ xfs_qm_quotacheck_dqadjust(
> xfs_qm_adjust_dqtimers(mp, dqp);
> }
>
> - dqp->dq_flags |= XFS_DQ_DIRTY;
> + dqp->q_flags |= XFS_DQFLAG_DIRTY;
> xfs_qm_dqput(dqp);
> return 0;
> }
> @@ -1219,7 +1219,7 @@ xfs_qm_flush_one(
> int error = 0;
>
> xfs_dqlock(dqp);
> - if (dqp->dq_flags & XFS_DQ_FREEING)
> + if (dqp->q_flags & XFS_DQFLAG_FREEING)
> goto out_unlock;
> if (!XFS_DQ_IS_DIRTY(dqp))
> goto out_unlock;
> diff --git a/fs/xfs/xfs_qm_syscalls.c b/fs/xfs/xfs_qm_syscalls.c
> index c7cb8a356c88..7f157275e370 100644
> --- a/fs/xfs/xfs_qm_syscalls.c
> +++ b/fs/xfs/xfs_qm_syscalls.c
> @@ -598,7 +598,7 @@ xfs_qm_scall_setqlim(
> */
> xfs_qm_adjust_dqtimers(mp, dqp);
> }
> - dqp->dq_flags |= XFS_DQ_DIRTY;
> + dqp->q_flags |= XFS_DQFLAG_DIRTY;
> xfs_trans_log_dquot(tp, dqp);
>
> error = xfs_trans_commit(tp);
> diff --git a/fs/xfs/xfs_trace.h b/fs/xfs/xfs_trace.h
> index f19e66da6646..0b6738070619 100644
> --- a/fs/xfs/xfs_trace.h
> +++ b/fs/xfs/xfs_trace.h
> @@ -879,7 +879,7 @@ DECLARE_EVENT_CLASS(xfs_dquot_class,
> __entry->dev = dqp->q_mount->m_super->s_dev;
> __entry->id = be32_to_cpu(dqp->q_core.d_id);
> __entry->type = dqp->q_type;
> - __entry->flags = dqp->dq_flags;
> + __entry->flags = dqp->q_flags;
> __entry->nrefs = dqp->q_nrefs;
> __entry->res_bcount = dqp->q_res_bcount;
> __entry->bcount = be64_to_cpu(dqp->q_core.d_bcount);
> @@ -899,7 +899,7 @@ DECLARE_EVENT_CLASS(xfs_dquot_class,
> MAJOR(__entry->dev), MINOR(__entry->dev),
> __entry->id,
> __print_symbolic(__entry->type, XFS_DQTYPE_STRINGS),
> - __print_flags(__entry->flags, "|", XFS_DQ_FLAGS),
> + __print_flags(__entry->flags, "|", XFS_DQFLAG_STRINGS),
> __entry->nrefs,
> __entry->res_bcount,
> __entry->bcount,
> diff --git a/fs/xfs/xfs_trans_dquot.c b/fs/xfs/xfs_trans_dquot.c
> index 964f69a444a3..bdbd8e88c772 100644
> --- a/fs/xfs/xfs_trans_dquot.c
> +++ b/fs/xfs/xfs_trans_dquot.c
> @@ -391,7 +391,7 @@ xfs_trans_apply_dquot_deltas(
> xfs_qm_adjust_dqtimers(tp->t_mountp, dqp);
> }
>
> - dqp->dq_flags |= XFS_DQ_DIRTY;
> + dqp->q_flags |= XFS_DQFLAG_DIRTY;
> /*
> * add this to the list of items to get logged
> */
>
>
--
chandan
next prev parent reply other threads:[~2020-07-16 7:00 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-15 1:50 [PATCH v4 00/26] xfs: remove xfs_disk_quot from incore dquot Darrick J. Wong
2020-07-15 1:50 ` [PATCH 01/26] xfs: clear XFS_DQ_FREEING if we can't lock the dquot buffer to flush Darrick J. Wong
2020-07-15 1:50 ` [PATCH 02/26] xfs: fix inode quota reservation checks Darrick J. Wong
2020-07-15 1:50 ` [PATCH 03/26] xfs: validate ondisk/incore dquot flags Darrick J. Wong
2020-07-15 12:50 ` Chandan Babu R
2020-07-15 1:50 ` [PATCH 04/26] xfs: move the flags argument of xfs_qm_scall_trunc_qfiles to XFS_QMOPT_* Darrick J. Wong
2020-07-15 12:50 ` Chandan Babu R
2020-07-15 1:51 ` [PATCH 05/26] xfs: split the incore dquot type into a separate field Darrick J. Wong
2020-07-16 6:59 ` Chandan Babu R
2020-07-15 1:51 ` [PATCH 06/26] xfs: refactor quotacheck flags usage Darrick J. Wong
2020-07-16 6:59 ` Chandan Babu R
2020-07-15 1:51 ` [PATCH 07/26] xfs: rename dquot incore state flags Darrick J. Wong
2020-07-16 6:59 ` Chandan Babu R [this message]
2020-07-15 1:51 ` [PATCH 08/26] xfs: move the ondisk dquot flags to their own namespace Darrick J. Wong
2020-07-15 1:51 ` [PATCH 09/26] xfs: make XFS_DQUOT_CLUSTER_SIZE_FSB part of the ondisk format Darrick J. Wong
2020-07-20 5:37 ` Chandan Babu R
2020-07-15 1:51 ` [PATCH 10/26] xfs: stop using q_core.d_flags in the quota code Darrick J. Wong
2020-07-20 5:37 ` Chandan Babu R
2020-07-15 1:51 ` [PATCH 11/26] xfs: stop using q_core.d_id " Darrick J. Wong
2020-07-15 1:51 ` [PATCH 12/26] xfs: use a per-resource struct for incore dquot data Darrick J. Wong
2020-07-15 1:52 ` [PATCH 13/26] xfs: stop using q_core limits in the quota code Darrick J. Wong
2020-07-15 1:52 ` [PATCH 14/26] xfs: stop using q_core counters " Darrick J. Wong
2020-07-15 1:52 ` [PATCH 15/26] xfs: stop using q_core warning " Darrick J. Wong
2020-07-15 1:52 ` [PATCH 16/26] xfs: stop using q_core timers " Darrick J. Wong
2020-07-15 1:52 ` [PATCH 17/26] xfs: remove qcore from incore dquots Darrick J. Wong
2020-07-15 1:52 ` [PATCH 18/26] xfs: refactor default quota limits by resource Darrick J. Wong
2020-07-15 1:52 ` [PATCH 19/26] xfs: remove unnecessary arguments from quota adjust functions Darrick J. Wong
2020-07-15 1:52 ` [PATCH 20/26] xfs: refactor quota exceeded test Darrick J. Wong
2020-07-15 1:52 ` [PATCH 21/26] xfs: refactor xfs_qm_scall_setqlim Darrick J. Wong
2020-07-15 1:52 ` [PATCH 22/26] xfs: refactor xfs_trans_dqresv Darrick J. Wong
2020-07-15 1:53 ` [PATCH 23/26] xfs: refactor xfs_trans_apply_dquot_deltas Darrick J. Wong
2020-07-15 1:53 ` [PATCH 24/26] xfs: assume the default quota limits are always set in xfs_qm_adjust_dqlimits Darrick J. Wong
2020-07-20 5:38 ` Chandan Babu R
2020-07-15 1:53 ` [PATCH 25/26] xfs: actually bump warning counts when we send warnings Darrick J. Wong
2020-07-20 5:38 ` Chandan Babu R
2022-03-01 19:31 ` Quota warning woes (was: [PATCH 25/26] xfs: actually bump warning counts when we send warnings) Eric Sandeen
2022-03-02 18:19 ` Eric Sandeen
2022-03-03 0:38 ` Darrick J. Wong
2020-07-15 1:53 ` [PATCH 26/26] xfs: add more dquot tracepoints Darrick J. Wong
-- strict thread matches above, loose matches on Subject: below --
2020-07-14 1:31 [PATCH v3 00/26] xfs: remove xfs_disk_quot from incore dquot Darrick J. Wong
2020-07-14 1:32 ` [PATCH 07/26] xfs: rename dquot incore state flags Darrick J. Wong
2020-07-14 8:00 ` Christoph Hellwig
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=3648569.ikp86AD9L0@garuda \
--to=chandanrlinux@gmail.com \
--cc=darrick.wong@oracle.com \
--cc=hch@lst.de \
--cc=linux-xfs@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;
as well as URLs for NNTP newsgroup(s).