public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Chandan Babu R <chandanrlinux@gmail.com>
To: Christoph Hellwig <hch@lst.de>
Cc: linux-xfs@vger.kernel.org
Subject: Re: [PATCH 1/8] xfs: change the type of ic_datap
Date: Fri, 18 Jun 2021 11:22:35 +0530	[thread overview]
Message-ID: <878s37u3bw.fsf@garuda> (raw)
In-Reply-To: <20210616163212.1480297-2-hch@lst.de>

On 16 Jun 2021 at 22:02, Christoph Hellwig wrote:
> Turn ic_datap from a char into a void pointer given that it points
> to arbitrary data.
>

xlog_alloc_log() has the following statement,

iclog->ic_datap = (char *)iclog->ic_data + log->l_iclog_hsize;

Maybe the "char *" typecast can be converted to "void *" as part of this
patch.

The remaining changes look good to me.

Reviewed-by: Chandan Babu R <chandanrlinux@gmail.com>

> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
>  fs/xfs/xfs_log.c      | 2 +-
>  fs/xfs/xfs_log_priv.h | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c
> index e921b554b68367..8999c78f3ac6d9 100644
> --- a/fs/xfs/xfs_log.c
> +++ b/fs/xfs/xfs_log.c
> @@ -3613,7 +3613,7 @@ xlog_verify_iclog(
>  		if (field_offset & 0x1ff) {
>  			clientid = ophead->oh_clientid;
>  		} else {
> -			idx = BTOBBT((char *)&ophead->oh_clientid - iclog->ic_datap);
> +			idx = BTOBBT((void *)&ophead->oh_clientid - iclog->ic_datap);
>  			if (idx >= (XLOG_HEADER_CYCLE_SIZE / BBSIZE)) {
>  				j = idx / (XLOG_HEADER_CYCLE_SIZE / BBSIZE);
>  				k = idx % (XLOG_HEADER_CYCLE_SIZE / BBSIZE);
> diff --git a/fs/xfs/xfs_log_priv.h b/fs/xfs/xfs_log_priv.h
> index e4e421a7033558..96dbe713954f7e 100644
> --- a/fs/xfs/xfs_log_priv.h
> +++ b/fs/xfs/xfs_log_priv.h
> @@ -185,7 +185,7 @@ typedef struct xlog_in_core {
>  	u32			ic_offset;
>  	enum xlog_iclog_state	ic_state;
>  	unsigned int		ic_flags;
> -	char			*ic_datap;	/* pointer to iclog data */
> +	void			*ic_datap;	/* pointer to iclog data */
>  
>  	/* Callback structures need their own cacheline */
>  	spinlock_t		ic_callback_lock ____cacheline_aligned_in_smp;


-- 
chandan

  parent reply	other threads:[~2021-06-18  5:52 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-16 16:32 log write cleanups Christoph Hellwig
2021-06-16 16:32 ` [PATCH 1/8] xfs: change the type of ic_datap Christoph Hellwig
2021-06-17 16:22   ` Brian Foster
2021-06-18  5:52   ` Chandan Babu R [this message]
2021-06-16 16:32 ` [PATCH 2/8] xfs: list entry elements don't need to be initialized Christoph Hellwig
2021-06-17 16:23   ` Brian Foster
2021-06-18  5:59   ` Chandan Babu R
2021-06-16 16:32 ` [PATCH 3/8] xfs: factor out a helper to write a log_iovec into the iclog Christoph Hellwig
2021-06-17 16:23   ` Brian Foster
2021-06-18 13:24     ` Christoph Hellwig
2021-06-18  7:42   ` Chandan Babu R
2021-06-16 16:32 ` [PATCH 4/8] xfs: remove xlog_write_adv_cnt and simplify xlog_write_partial Christoph Hellwig
2021-06-17 16:23   ` Brian Foster
2021-06-18  7:50   ` Chandan Babu R
2021-06-16 16:32 ` [PATCH 5/8] xfs: remove xlog_verify_dest_ptr Christoph Hellwig
2021-06-17 16:24   ` Brian Foster
2021-06-18 10:31   ` Chandan Babu R
2021-06-16 16:32 ` [PATCH 6/8] xfs: simplify the xlog_write_partial calling conventions Christoph Hellwig
2021-06-17 16:24   ` Brian Foster
2021-06-18 11:07   ` Chandan Babu R
2021-06-16 16:32 ` [PATCH 7/8] xfs: factor out a xlog_write_full_log_vec helper Christoph Hellwig
2021-06-17 16:24   ` Brian Foster
2021-06-18 13:33     ` Christoph Hellwig
2021-06-16 16:32 ` [PATCH 8/8] xfs: simplify the list iteration in xlog_write Christoph Hellwig
2021-06-17 16:24   ` Brian Foster
2021-06-18 22:51 ` log write cleanups Dave Chinner

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=878s37u3bw.fsf@garuda \
    --to=chandanrlinux@gmail.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