* [PATCH 1/3] f2fs: shrink sbi->sb_lock coverage in set_file_temperature()
@ 2018-10-04 3:15 Chao Yu
2018-10-04 3:15 ` [PATCH 2/3] f2fs: remove unused sbi->trigger_ssr_threshold Chao Yu
2018-10-04 3:15 ` [PATCH 3/3] f2fs: remove unneeded disable_nat_bits() Chao Yu
0 siblings, 2 replies; 3+ messages in thread
From: Chao Yu @ 2018-10-04 3:15 UTC (permalink / raw)
To: jaegeuk; +Cc: linux-f2fs-devel, linux-kernel, Chao Yu
From: Chao Yu <yuchao0@huawei.com>
file_set_{cold,hot} doesn't need holding sbi->sb_lock, so moving them
out of the lock.
Signed-off-by: Chao Yu <yuchao0@huawei.com>
---
fs/f2fs/namei.c | 17 ++++++++++-------
1 file changed, 10 insertions(+), 7 deletions(-)
diff --git a/fs/f2fs/namei.c b/fs/f2fs/namei.c
index a14632744a6a..d5de8a99532d 100644
--- a/fs/f2fs/namei.c
+++ b/fs/f2fs/namei.c
@@ -182,16 +182,19 @@ static inline void set_file_temperature(struct f2fs_sb_info *sbi, struct inode *
hot_count = sbi->raw_super->hot_ext_count;
for (i = 0; i < cold_count + hot_count; i++) {
- if (!is_extension_exist(name, extlist[i]))
- continue;
- if (i < cold_count)
- file_set_cold(inode);
- else
- file_set_hot(inode);
- break;
+ if (is_extension_exist(name, extlist[i]))
+ break;
}
up_read(&sbi->sb_lock);
+
+ if (i == cold_count + hot_count)
+ return;
+
+ if (i < cold_count)
+ file_set_cold(inode);
+ else
+ file_set_hot(inode);
}
int f2fs_update_extension_list(struct f2fs_sb_info *sbi, const char *name,
--
2.18.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 2/3] f2fs: remove unused sbi->trigger_ssr_threshold
2018-10-04 3:15 [PATCH 1/3] f2fs: shrink sbi->sb_lock coverage in set_file_temperature() Chao Yu
@ 2018-10-04 3:15 ` Chao Yu
2018-10-04 3:15 ` [PATCH 3/3] f2fs: remove unneeded disable_nat_bits() Chao Yu
1 sibling, 0 replies; 3+ messages in thread
From: Chao Yu @ 2018-10-04 3:15 UTC (permalink / raw)
To: jaegeuk; +Cc: linux-f2fs-devel, linux-kernel, Chao Yu
From: Chao Yu <yuchao0@huawei.com>
Commit a2a12b679f36 ("f2fs: export SSR allocation threshold") introduced
two threshold .min_ssr_sections and .trigger_ssr_threshold, but only
.min_ssr_sections is used, so just remove redundant one for cleanup.
Signed-off-by: Chao Yu <yuchao0@huawei.com>
---
fs/f2fs/f2fs.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h
index c4d30c090399..2297492fc56d 100644
--- a/fs/f2fs/f2fs.h
+++ b/fs/f2fs/f2fs.h
@@ -1218,7 +1218,6 @@ struct f2fs_sb_info {
unsigned int total_valid_node_count; /* valid node block count */
loff_t max_file_blocks; /* max block index of file */
int dir_level; /* directory level */
- unsigned int trigger_ssr_threshold; /* threshold to trigger ssr */
int readdir_ra; /* readahead inode in readdir */
block_t user_block_count; /* # of user blocks */
--
2.18.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 3/3] f2fs: remove unneeded disable_nat_bits()
2018-10-04 3:15 [PATCH 1/3] f2fs: shrink sbi->sb_lock coverage in set_file_temperature() Chao Yu
2018-10-04 3:15 ` [PATCH 2/3] f2fs: remove unused sbi->trigger_ssr_threshold Chao Yu
@ 2018-10-04 3:15 ` Chao Yu
1 sibling, 0 replies; 3+ messages in thread
From: Chao Yu @ 2018-10-04 3:15 UTC (permalink / raw)
To: jaegeuk; +Cc: linux-f2fs-devel, linux-kernel, Chao Yu
From: Chao Yu <yuchao0@huawei.com>
Commit 7735730d39d7 ("f2fs: fix to propagate error from __get_meta_page()")
added disable_nat_bits() in error path of __get_nat_bitmaps(), but it's
unneeded, beause we will fail mount, we won't have chance to change nid
usage status w/o nat full/empty bitmaps.
Signed-off-by: Chao Yu <yuchao0@huawei.com>
---
fs/f2fs/node.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c
index 8c0367cfb1bb..2b34206486d8 100644
--- a/fs/f2fs/node.c
+++ b/fs/f2fs/node.c
@@ -2879,10 +2879,8 @@ static int __get_nat_bitmaps(struct f2fs_sb_info *sbi)
struct page *page;
page = f2fs_get_meta_page(sbi, nat_bits_addr++);
- if (IS_ERR(page)) {
- disable_nat_bits(sbi, true);
+ if (IS_ERR(page))
return PTR_ERR(page);
- }
memcpy(nm_i->nat_bits + (i << F2FS_BLKSIZE_BITS),
page_address(page), F2FS_BLKSIZE);
--
2.18.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-10-04 3:15 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-04 3:15 [PATCH 1/3] f2fs: shrink sbi->sb_lock coverage in set_file_temperature() Chao Yu
2018-10-04 3:15 ` [PATCH 2/3] f2fs: remove unused sbi->trigger_ssr_threshold Chao Yu
2018-10-04 3:15 ` [PATCH 3/3] f2fs: remove unneeded disable_nat_bits() 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).