* [f2fs-dev] [PATCH 1/3] f2fs: avoid unused f2fs_show_compress_options()
@ 2021-02-20 9:38 Chao Yu
2021-02-20 9:38 ` [f2fs-dev] [PATCH 2/3] f2fs: remove unused FORCE_FG_GC macro Chao Yu
2021-02-20 9:38 ` [f2fs-dev] [PATCH 3/3] f2fs: update comments for explicit memory barrier Chao Yu
0 siblings, 2 replies; 3+ messages in thread
From: Chao Yu @ 2021-02-20 9:38 UTC (permalink / raw)
To: jaegeuk; +Cc: kernel test robot, linux-kernel, linux-f2fs-devel
LKP reports:
fs/f2fs/super.c:1516:20: warning: unused function 'f2fs_show_compress_options' [-Wunused-function]
static inline void f2fs_show_compress_options(struct seq_file *seq,
Fix this issue by covering f2fs_show_compress_options() with
CONFIG_F2FS_FS_COMPRESSION macro.
Fixes: 4c8ff7095bef ("f2fs: support data compression")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Chao Yu <yuchao0@huawei.com>
---
fs/f2fs/super.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index 78d9e54bc4f7..042925c6c2cb 100644
--- a/fs/f2fs/super.c
+++ b/fs/f2fs/super.c
@@ -1620,6 +1620,7 @@ static inline void f2fs_show_quota_options(struct seq_file *seq,
#endif
}
+#ifdef CONFIG_F2FS_FS_COMPRESSION
static inline void f2fs_show_compress_options(struct seq_file *seq,
struct super_block *sb)
{
@@ -1665,6 +1666,7 @@ static inline void f2fs_show_compress_options(struct seq_file *seq,
else if (F2FS_OPTION(sbi).compress_mode == COMPR_MODE_USER)
seq_printf(seq, ",compress_mode=%s", "user");
}
+#endif
static int f2fs_show_options(struct seq_file *seq, struct dentry *root)
{
--
2.29.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] 3+ messages in thread
* [f2fs-dev] [PATCH 2/3] f2fs: remove unused FORCE_FG_GC macro
2021-02-20 9:38 [f2fs-dev] [PATCH 1/3] f2fs: avoid unused f2fs_show_compress_options() Chao Yu
@ 2021-02-20 9:38 ` Chao Yu
2021-02-20 9:38 ` [f2fs-dev] [PATCH 3/3] f2fs: update comments for explicit memory barrier Chao Yu
1 sibling, 0 replies; 3+ messages in thread
From: Chao Yu @ 2021-02-20 9:38 UTC (permalink / raw)
To: jaegeuk; +Cc: linux-kernel, linux-f2fs-devel
FORCE_FG_GC was introduced by commit 6aefd93b0137 ("f2fs: introduce
background_gc=sync mount option"), but never be used, remove it.
Signed-off-by: Chao Yu <yuchao0@huawei.com>
---
fs/f2fs/segment.h | 2 --
1 file changed, 2 deletions(-)
diff --git a/fs/f2fs/segment.h b/fs/f2fs/segment.h
index 229814b4f4a6..144980b62f9e 100644
--- a/fs/f2fs/segment.h
+++ b/fs/f2fs/segment.h
@@ -172,12 +172,10 @@ enum {
/*
* BG_GC means the background cleaning job.
* FG_GC means the on-demand cleaning job.
- * FORCE_FG_GC means on-demand cleaning job in background.
*/
enum {
BG_GC = 0,
FG_GC,
- FORCE_FG_GC,
};
/* for a function parameter to select a victim segment */
--
2.29.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] 3+ messages in thread
* [f2fs-dev] [PATCH 3/3] f2fs: update comments for explicit memory barrier
2021-02-20 9:38 [f2fs-dev] [PATCH 1/3] f2fs: avoid unused f2fs_show_compress_options() Chao Yu
2021-02-20 9:38 ` [f2fs-dev] [PATCH 2/3] f2fs: remove unused FORCE_FG_GC macro Chao Yu
@ 2021-02-20 9:38 ` Chao Yu
1 sibling, 0 replies; 3+ messages in thread
From: Chao Yu @ 2021-02-20 9:38 UTC (permalink / raw)
To: jaegeuk; +Cc: linux-kernel, linux-f2fs-devel
Add more detailed comments for explicit memory barrier used by
f2fs, in order to enhance code readability.
Signed-off-by: Chao Yu <yuchao0@huawei.com>
---
fs/f2fs/checkpoint.c | 6 +++++-
fs/f2fs/segment.c | 6 +++++-
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c
index 174a0819ad96..c75866cd72fa 100644
--- a/fs/f2fs/checkpoint.c
+++ b/fs/f2fs/checkpoint.c
@@ -1818,7 +1818,11 @@ int f2fs_issue_checkpoint(struct f2fs_sb_info *sbi)
llist_add(&req.llnode, &cprc->issue_list);
atomic_inc(&cprc->queued_ckpt);
- /* update issue_list before we wake up issue_checkpoint thread */
+ /*
+ * update issue_list before we wake up issue_checkpoint thread,
+ * this smp_mb() pairs with another barrier in ___wait_event(),
+ * see more details in comments of waitqueue_active().
+ */
smp_mb();
if (waitqueue_active(&cprc->ckpt_wait_queue))
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
index 2190910c68b0..2d5a82c4ca15 100644
--- a/fs/f2fs/segment.c
+++ b/fs/f2fs/segment.c
@@ -663,7 +663,11 @@ int f2fs_issue_flush(struct f2fs_sb_info *sbi, nid_t ino)
llist_add(&cmd.llnode, &fcc->issue_list);
- /* update issue_list before we wake up issue_flush thread */
+ /*
+ * update issue_list before we wake up issue_flush thread, this
+ * smp_mb() pairs with another barrier in ___wait_event(), see
+ * more details in comments of waitqueue_active().
+ */
smp_mb();
if (waitqueue_active(&fcc->flush_wait_queue))
--
2.29.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] 3+ messages in thread
end of thread, other threads:[~2021-02-20 9:39 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-20 9:38 [f2fs-dev] [PATCH 1/3] f2fs: avoid unused f2fs_show_compress_options() Chao Yu
2021-02-20 9:38 ` [f2fs-dev] [PATCH 2/3] f2fs: remove unused FORCE_FG_GC macro Chao Yu
2021-02-20 9:38 ` [f2fs-dev] [PATCH 3/3] f2fs: update comments for explicit memory barrier Chao Yu
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).