public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: Pavel Reichl <preichl@redhat.com>
Cc: linux-xfs@vger.kernel.org
Subject: Re: [PATCH v2 3/4] xfs: remove the xfs_dq_logitem_t typedef
Date: Fri, 8 Nov 2019 14:24:14 -0800	[thread overview]
Message-ID: <20191108222414.GM6219@magnolia> (raw)
In-Reply-To: <20191108210612.423439-4-preichl@redhat.com>

On Fri, Nov 08, 2019 at 10:06:11PM +0100, Pavel Reichl wrote:
> Signed-off-by: Pavel Reichl <preichl@redhat.com>
> ---
>  fs/xfs/xfs_dquot.c      |  2 +-
>  fs/xfs/xfs_dquot.h      | 18 +++++++++---------
>  fs/xfs/xfs_dquot_item.h |  4 ++--
>  3 files changed, 12 insertions(+), 12 deletions(-)
> 
> diff --git a/fs/xfs/xfs_dquot.c b/fs/xfs/xfs_dquot.c
> index 5b089afd7087..4df8ffb9906f 100644
> --- a/fs/xfs/xfs_dquot.c
> +++ b/fs/xfs/xfs_dquot.c
> @@ -1018,7 +1018,7 @@ xfs_qm_dqflush_done(
>  	struct xfs_buf		*bp,
>  	struct xfs_log_item	*lip)
>  {
> -	xfs_dq_logitem_t	*qip = (struct xfs_dq_logitem *)lip;
> +	struct xfs_dq_logitem	*qip = (struct xfs_dq_logitem *)lip;
>  	struct xfs_dquot	*dqp = qip->qli_dquot;
>  	struct xfs_ail		*ailp = lip->li_ailp;
>  
> diff --git a/fs/xfs/xfs_dquot.h b/fs/xfs/xfs_dquot.h
> index a6bb264d71ce..1defab19d550 100644
> --- a/fs/xfs/xfs_dquot.h
> +++ b/fs/xfs/xfs_dquot.h
> @@ -39,15 +39,15 @@ struct xfs_dquot {
>  	int		  q_bufoffset;	/* off of dq in buffer (# dquots) */
>  	xfs_fileoff_t	  q_fileoffset;	/* offset in quotas file */
>  
> -	struct xfs_disk_dquot	q_core;	/* actual usage & quotas */
> -	xfs_dq_logitem_t  q_logitem;	/* dquot log item */
> -	xfs_qcnt_t	  q_res_bcount;	/* total regular nblks used+reserved */
> -	xfs_qcnt_t	  q_res_icount;	/* total inos allocd+reserved */
> -	xfs_qcnt_t	  q_res_rtbcount;/* total realtime blks used+reserved */
> -	xfs_qcnt_t	  q_prealloc_lo_wmark;/* prealloc throttle wmark */
> -	xfs_qcnt_t	  q_prealloc_hi_wmark;/* prealloc disabled wmark */
> -	int64_t		  q_low_space[XFS_QLOWSP_MAX];
> -	struct mutex	  q_qlock;	/* quota lock */
> +	struct xfs_disk_dquot	 q_core;	/* actual usage & quotas */
> +	struct xfs_dq_logitem	 q_logitem;	/* dquot log item */
> +	xfs_qcnt_t	 q_res_bcount;	/* total regular nblks used+reserved */
> +	xfs_qcnt_t	 q_res_icount;	/* total inos allocd+reserved */
> +	xfs_qcnt_t	 q_res_rtbcount;/* total realtime blks used+reserved */
> +	xfs_qcnt_t	 q_prealloc_lo_wmark;/* prealloc throttle wmark */
> +	xfs_qcnt_t	 q_prealloc_hi_wmark;/* prealloc disabled wmark */
> +	int64_t		 q_low_space[XFS_QLOWSP_MAX];
> +	struct mutex	 q_qlock;	/* quota lock */
>  	struct completion q_flush;	/* flush completion queue */

These look like they're more misaligned than the previous patch.

Please consider reformatting the structure from:

	some_type	some_variable; /* squashed comment */

into:

	/* not as squashed of a comment */
	some_type	some_variable;

Because that's a lot less cluttered, and it means that you can actually
make all the field names line up without having to worry about how much
that will screw up the comments.

--D

>  	atomic_t	  q_pincount;	/* dquot pin count */
>  	wait_queue_head_t q_pinwait;	/* dquot pinning wait queue */
> diff --git a/fs/xfs/xfs_dquot_item.h b/fs/xfs/xfs_dquot_item.h
> index 1aed34ccdabc..e0a24eb7a545 100644
> --- a/fs/xfs/xfs_dquot_item.h
> +++ b/fs/xfs/xfs_dquot_item.h
> @@ -11,11 +11,11 @@ struct xfs_trans;
>  struct xfs_mount;
>  struct xfs_qoff_logitem;
>  
> -typedef struct xfs_dq_logitem {
> +struct xfs_dq_logitem {
>  	struct xfs_log_item	 qli_item;	   /* common portion */
>  	struct xfs_dquot	*qli_dquot;	   /* dquot ptr */
>  	xfs_lsn_t		 qli_flush_lsn;	   /* lsn at last flush */
> -} xfs_dq_logitem_t;
> +};
>  
>  typedef struct xfs_qoff_logitem {
>  	struct xfs_log_item	 qql_item;	/* common portion */
> -- 
> 2.23.0
> 

  reply	other threads:[~2019-11-08 22:24 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-08 21:06 [PATCH v2 0/4] xfs: remove several typedefs in quota code Pavel Reichl
2019-11-08 21:06 ` [PATCH v2 1/4] xfs: remove the xfs_disk_dquot_t and xfs_dquot_t typedefs Pavel Reichl
2019-11-08 22:13   ` Darrick J. Wong
2019-11-08 21:06 ` [PATCH v2 2/4] xfs: remove the xfs_quotainfo_t typedef Pavel Reichl
2019-11-08 22:16   ` Darrick J. Wong
2019-11-11 18:24     ` Pavel Reichl
2019-11-08 21:06 ` [PATCH v2 3/4] xfs: remove the xfs_dq_logitem_t typedef Pavel Reichl
2019-11-08 22:24   ` Darrick J. Wong [this message]
2019-11-08 21:06 ` [PATCH v2 4/4] xfs: remove the xfs_qoff_logitem_t typedef Pavel Reichl
2019-11-08 22:29   ` Darrick J. Wong

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=20191108222414.GM6219@magnolia \
    --to=darrick.wong@oracle.com \
    --cc=linux-xfs@vger.kernel.org \
    --cc=preichl@redhat.com \
    /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