* [f2fs-dev] [PATCH 1/2] f2fs: fix macro definition on_f2fs_build_free_nids
@ 2024-07-21 13:17 Julian Sun
2024-07-21 13:17 ` [f2fs-dev] [PATCH 2/2] f2fs: fix macro definition stat_inc_cp_count Julian Sun
2024-07-22 1:32 ` [f2fs-dev] [PATCH 1/2] f2fs: fix macro definition on_f2fs_build_free_nids Chao Yu
0 siblings, 2 replies; 5+ messages in thread
From: Julian Sun @ 2024-07-21 13:17 UTC (permalink / raw)
To: linux-f2fs-devel; +Cc: Julian Sun, jaegeuk
The macro on_f2fs_build_free_nids accepts a parameter nmi,
but it was not used, rather the variable nm_i was directly used,
which may be a local variable inside a function that calls the macros.
Signed-off-by: Julian Sun <sunjunchao2870@gmail.com>
---
fs/f2fs/node.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c
index b72ef96f7e33..34eeb2a8598c 100644
--- a/fs/f2fs/node.c
+++ b/fs/f2fs/node.c
@@ -20,7 +20,7 @@
#include "iostat.h"
#include <trace/events/f2fs.h>
-#define on_f2fs_build_free_nids(nmi) mutex_is_locked(&(nm_i)->build_lock)
+#define on_f2fs_build_free_nids(nmi) mutex_is_locked(&(nmi)->build_lock)
static struct kmem_cache *nat_entry_slab;
static struct kmem_cache *free_nid_slab;
--
2.39.2
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [f2fs-dev] [PATCH 2/2] f2fs: fix macro definition stat_inc_cp_count
2024-07-21 13:17 [f2fs-dev] [PATCH 1/2] f2fs: fix macro definition on_f2fs_build_free_nids Julian Sun
@ 2024-07-21 13:17 ` Julian Sun
2024-07-22 1:33 ` Chao Yu
2024-07-22 1:32 ` [f2fs-dev] [PATCH 1/2] f2fs: fix macro definition on_f2fs_build_free_nids Chao Yu
1 sibling, 1 reply; 5+ messages in thread
From: Julian Sun @ 2024-07-21 13:17 UTC (permalink / raw)
To: linux-f2fs-devel; +Cc: Julian Sun, jaegeuk
The macro stat_inc_cp_count accepts a parameter si,
but it was not used, rather the variable sbi was directly used,
which may be a local variable inside a function that calls the macros.
Signed-off-by: Julian Sun <sunjunchao2870@gmail.com>
---
fs/f2fs/f2fs.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h
index 8a9d910aa552..c9925d1ca2df 100644
--- a/fs/f2fs/f2fs.h
+++ b/fs/f2fs/f2fs.h
@@ -3987,7 +3987,7 @@ static inline struct f2fs_stat_info *F2FS_STAT(struct f2fs_sb_info *sbi)
#define stat_inc_cp_call_count(sbi, foreground) \
atomic_inc(&sbi->cp_call_count[(foreground)])
-#define stat_inc_cp_count(si) (F2FS_STAT(sbi)->cp_count++)
+#define stat_inc_cp_count(_sbi) (F2FS_STAT(_sbi)->cp_count++)
#define stat_io_skip_bggc_count(sbi) ((sbi)->io_skip_bggc++)
#define stat_other_skip_bggc_count(sbi) ((sbi)->other_skip_bggc++)
#define stat_inc_dirty_inode(sbi, type) ((sbi)->ndirty_inode[type]++)
--
2.39.2
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [f2fs-dev] [PATCH 1/2] f2fs: fix macro definition on_f2fs_build_free_nids
2024-07-21 13:17 [f2fs-dev] [PATCH 1/2] f2fs: fix macro definition on_f2fs_build_free_nids Julian Sun
2024-07-21 13:17 ` [f2fs-dev] [PATCH 2/2] f2fs: fix macro definition stat_inc_cp_count Julian Sun
@ 2024-07-22 1:32 ` Chao Yu
2024-07-22 2:14 ` Julian Sun
1 sibling, 1 reply; 5+ messages in thread
From: Chao Yu @ 2024-07-22 1:32 UTC (permalink / raw)
To: Julian Sun, linux-f2fs-devel; +Cc: jaegeuk
On 2024/7/21 21:17, Julian Sun wrote:
> The macro on_f2fs_build_free_nids accepts a parameter nmi,
> but it was not used, rather the variable nm_i was directly used,
> which may be a local variable inside a function that calls the macros.
>
> Signed-off-by: Julian Sun <sunjunchao2870@gmail.com>
> ---
> fs/f2fs/node.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c
> index b72ef96f7e33..34eeb2a8598c 100644
> --- a/fs/f2fs/node.c
> +++ b/fs/f2fs/node.c
> @@ -20,7 +20,7 @@
> #include "iostat.h"
> #include <trace/events/f2fs.h>
>
> -#define on_f2fs_build_free_nids(nmi) mutex_is_locked(&(nm_i)->build_lock)
> +#define on_f2fs_build_free_nids(nmi) mutex_is_locked(&(nmi)->build_lock)
It's better to use nm_i instead of nmi?
Thanks,
>
> static struct kmem_cache *nat_entry_slab;
> static struct kmem_cache *free_nid_slab;
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [f2fs-dev] [PATCH 2/2] f2fs: fix macro definition stat_inc_cp_count
2024-07-21 13:17 ` [f2fs-dev] [PATCH 2/2] f2fs: fix macro definition stat_inc_cp_count Julian Sun
@ 2024-07-22 1:33 ` Chao Yu
0 siblings, 0 replies; 5+ messages in thread
From: Chao Yu @ 2024-07-22 1:33 UTC (permalink / raw)
To: Julian Sun, linux-f2fs-devel; +Cc: jaegeuk
On 2024/7/21 21:17, Julian Sun wrote:
> The macro stat_inc_cp_count accepts a parameter si,
> but it was not used, rather the variable sbi was directly used,
> which may be a local variable inside a function that calls the macros.
>
> Signed-off-by: Julian Sun <sunjunchao2870@gmail.com>
> ---
> fs/f2fs/f2fs.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h
> index 8a9d910aa552..c9925d1ca2df 100644
> --- a/fs/f2fs/f2fs.h
> +++ b/fs/f2fs/f2fs.h
> @@ -3987,7 +3987,7 @@ static inline struct f2fs_stat_info *F2FS_STAT(struct f2fs_sb_info *sbi)
>
> #define stat_inc_cp_call_count(sbi, foreground) \
> atomic_inc(&sbi->cp_call_count[(foreground)])
> -#define stat_inc_cp_count(si) (F2FS_STAT(sbi)->cp_count++)
> +#define stat_inc_cp_count(_sbi) (F2FS_STAT(_sbi)->cp_count++)
Let's use sbi instead of _sbi.
Thanks,
> #define stat_io_skip_bggc_count(sbi) ((sbi)->io_skip_bggc++)
> #define stat_other_skip_bggc_count(sbi) ((sbi)->other_skip_bggc++)
> #define stat_inc_dirty_inode(sbi, type) ((sbi)->ndirty_inode[type]++)
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [f2fs-dev] [PATCH 1/2] f2fs: fix macro definition on_f2fs_build_free_nids
2024-07-22 1:32 ` [f2fs-dev] [PATCH 1/2] f2fs: fix macro definition on_f2fs_build_free_nids Chao Yu
@ 2024-07-22 2:14 ` Julian Sun
0 siblings, 0 replies; 5+ messages in thread
From: Julian Sun @ 2024-07-22 2:14 UTC (permalink / raw)
To: Chao Yu; +Cc: jaegeuk, linux-f2fs-devel
Chao Yu <chao@kernel.org> 于2024年7月21日周日 21:32写道:
>
> On 2024/7/21 21:17, Julian Sun wrote:
> > The macro on_f2fs_build_free_nids accepts a parameter nmi,
> > but it was not used, rather the variable nm_i was directly used,
> > which may be a local variable inside a function that calls the macros.
> >
> > Signed-off-by: Julian Sun <sunjunchao2870@gmail.com>
> > ---
> > fs/f2fs/node.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c
> > index b72ef96f7e33..34eeb2a8598c 100644
> > --- a/fs/f2fs/node.c
> > +++ b/fs/f2fs/node.c
> > @@ -20,7 +20,7 @@
> > #include "iostat.h"
> > #include <trace/events/f2fs.h>
> >
> > -#define on_f2fs_build_free_nids(nmi) mutex_is_locked(&(nm_i)->build_lock)
> > +#define on_f2fs_build_free_nids(nmi) mutex_is_locked(&(nmi)->build_lock)
>
>
> > It's better to use nm_i instead of nmi?
> >
> > Thanks,
Thanks a lot for your review.
Sure. I will send patch v2.
>
> >
> > static struct kmem_cache *nat_entry_slab;
> > static struct kmem_cache *free_nid_slab;
Best regards,
--
Julian Sun <sunjunchao2870@gmail.com>
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-07-22 2:15 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-21 13:17 [f2fs-dev] [PATCH 1/2] f2fs: fix macro definition on_f2fs_build_free_nids Julian Sun
2024-07-21 13:17 ` [f2fs-dev] [PATCH 2/2] f2fs: fix macro definition stat_inc_cp_count Julian Sun
2024-07-22 1:33 ` Chao Yu
2024-07-22 1:32 ` [f2fs-dev] [PATCH 1/2] f2fs: fix macro definition on_f2fs_build_free_nids Chao Yu
2024-07-22 2:14 ` Julian Sun
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.