ocfs2-devel.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Joseph Qi <joseph.qi@linux.alibaba.com>
To: Heming Zhao <heming.zhao@suse.com>
Cc: ocfs2-devel@lists.linux.dev, ailiop@suse.com
Subject: Re: [PATCH v4 3/3] ocfs2: speed up chain-list searching
Date: Wed, 27 Mar 2024 19:17:35 +0800	[thread overview]
Message-ID: <d9ab276e-5d68-4759-8d15-3a94bd9ff4ab@linux.alibaba.com> (raw)
In-Reply-To: <20240327082146.6258-4-heming.zhao@suse.com>



On 3/27/24 4:21 PM, Heming Zhao wrote:
> ocfs2_claim_suballoc_bits():
> - Add short-circuit code to speed up searching
> 
> ocfs2_local_alloc_new_window():
> - remove 1 sparse warning
> ```
> fs/ocfs2/localalloc.c:1224:41: warning: incorrect type in argument 1 (different base types)
> fs/ocfs2/localalloc.c:1224:41:    expected unsigned long long val1
> fs/ocfs2/localalloc.c:1224:41:    got restricted __le32 [usertype] la_bm_off
> ```

Could you please split the sparse warning into a separate patch?
For 'la_bm_off', it seems that other place may also has similar warning,
e.g. ocfs2_load_local_alloc().

Joseph

> 
> Signed-off-by: Heming Zhao <heming.zhao@suse.com>
> ---
>  fs/ocfs2/localalloc.c | 2 +-
>  fs/ocfs2/suballoc.c   | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/fs/ocfs2/localalloc.c b/fs/ocfs2/localalloc.c
> index 2391b96b8a3b..2758ae9164f3 100644
> --- a/fs/ocfs2/localalloc.c
> +++ b/fs/ocfs2/localalloc.c
> @@ -1221,7 +1221,7 @@ static int ocfs2_local_alloc_new_window(struct ocfs2_super *osb,
>  			     OCFS2_LOCAL_ALLOC(alloc)->la_bitmap);
>  
>  	trace_ocfs2_local_alloc_new_window_result(
> -		OCFS2_LOCAL_ALLOC(alloc)->la_bm_off,
> +		le32_to_cpu(OCFS2_LOCAL_ALLOC(alloc)->la_bm_off),
>  		le32_to_cpu(alloc->id1.bitmap1.i_total));
>  
>  bail:
> diff --git a/fs/ocfs2/suballoc.c b/fs/ocfs2/suballoc.c
> index 4163554b0383..ebfa17dccf97 100644
> --- a/fs/ocfs2/suballoc.c
> +++ b/fs/ocfs2/suballoc.c
> @@ -2008,7 +2008,7 @@ static int ocfs2_claim_suballoc_bits(struct ocfs2_alloc_context *ac,
>  	for (i = 0; i < le16_to_cpu(cl->cl_next_free_rec); i ++) {
>  		if (i == victim)
>  			continue;
> -		if (!cl->cl_recs[i].c_free)
> +		if (le32_to_cpu(cl->cl_recs[i].c_free) < bits_wanted)
>  			continue;
>  
>  		ac->ac_chain = i;

  reply	other threads:[~2024-03-27 11:17 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-27  8:21 [PATCH v4 0/3] improve write IO performance when fragmentation is high Heming Zhao
2024-03-27  8:21 ` [PATCH v4 1/3] ocfs2: " Heming Zhao
2024-03-27 10:58   ` Joseph Qi
2024-03-27 12:54     ` Heming Zhao
2024-03-28  1:50       ` Joseph Qi
2024-03-28  1:55         ` Heming Zhao
2024-03-27  8:21 ` [PATCH v4 2/3] ocfs2: adjust enabling place for la window Heming Zhao
2024-03-27 11:05   ` Joseph Qi
2024-03-27 12:59     ` Heming Zhao
2024-03-28  1:58       ` Joseph Qi
2024-03-28  2:36         ` Heming Zhao
2024-03-27  8:21 ` [PATCH v4 3/3] ocfs2: speed up chain-list searching Heming Zhao
2024-03-27 11:17   ` Joseph Qi [this message]
2024-03-27 12:59     ` Heming Zhao

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=d9ab276e-5d68-4759-8d15-3a94bd9ff4ab@linux.alibaba.com \
    --to=joseph.qi@linux.alibaba.com \
    --cc=ailiop@suse.com \
    --cc=heming.zhao@suse.com \
    --cc=ocfs2-devel@lists.linux.dev \
    /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).