linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/5] f2fs: kill EXT_TREE_VEC_SIZE
@ 2018-07-17 12:41 Chao Yu
  2018-07-17 12:41 ` [PATCH 2/5] f2fs: clean up with get_current_nat_page Chao Yu
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Chao Yu @ 2018-07-17 12:41 UTC (permalink / raw)
  To: jaegeuk; +Cc: linux-f2fs-devel, linux-kernel, chao, Chao Yu

Since commit 201ef5e080c9 ("f2fs: improve shrink performance of extent nodes"),
there is no user of EXT_TREE_VEC_SIZE, just kill it for cleanup.

Signed-off-by: Chao Yu <yuchao0@huawei.com>
---
 fs/f2fs/f2fs.h | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h
index 806006ed0d0a..ff3b80da32f3 100644
--- a/fs/f2fs/f2fs.h
+++ b/fs/f2fs/f2fs.h
@@ -524,9 +524,6 @@ enum {
 
 #define MAX_DIR_RA_PAGES	4	/* maximum ra pages of dir */
 
-/* vector size for gang look-up from extent cache that consists of radix tree */
-#define EXT_TREE_VEC_SIZE	64
-
 /* for in-memory extent cache entry */
 #define F2FS_MIN_EXTENT_LEN	64	/* minimum extent length */
 
-- 
2.18.0.rc1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/5] f2fs: clean up with get_current_nat_page
  2018-07-17 12:41 [PATCH 1/5] f2fs: kill EXT_TREE_VEC_SIZE Chao Yu
@ 2018-07-17 12:41 ` Chao Yu
  2018-07-17 12:41 ` [PATCH 3/5] f2fs: clean up with f2fs_encrypted_inode() Chao Yu
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Chao Yu @ 2018-07-17 12:41 UTC (permalink / raw)
  To: jaegeuk; +Cc: linux-f2fs-devel, linux-kernel, chao, Chao Yu

Just cleanup, no logic change.

Signed-off-by: Chao Yu <yuchao0@huawei.com>
---
 fs/f2fs/node.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c
index 99dc1a1d02e3..021d095dc3c5 100644
--- a/fs/f2fs/node.c
+++ b/fs/f2fs/node.c
@@ -113,25 +113,22 @@ static void clear_node_page_dirty(struct page *page)
 
 static struct page *get_current_nat_page(struct f2fs_sb_info *sbi, nid_t nid)
 {
-	pgoff_t index = current_nat_addr(sbi, nid);
-	return f2fs_get_meta_page_nofail(sbi, index);
+	return f2fs_get_meta_page_nofail(sbi, current_nat_addr(sbi, nid));
 }
 
 static struct page *get_next_nat_page(struct f2fs_sb_info *sbi, nid_t nid)
 {
 	struct page *src_page;
 	struct page *dst_page;
-	pgoff_t src_off;
 	pgoff_t dst_off;
 	void *src_addr;
 	void *dst_addr;
 	struct f2fs_nm_info *nm_i = NM_I(sbi);
 
-	src_off = current_nat_addr(sbi, nid);
-	dst_off = next_nat_addr(sbi, src_off);
+	dst_off = next_nat_addr(sbi, current_nat_addr(sbi, nid));
 
 	/* get current nat block page with lock */
-	src_page = f2fs_get_meta_page(sbi, src_off);
+	src_page = get_current_nat_page(sbi, nid);
 	dst_page = f2fs_grab_meta_page(sbi, dst_off);
 	f2fs_bug_on(sbi, PageDirty(src_page));
 
-- 
2.18.0.rc1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 3/5] f2fs: clean up with f2fs_encrypted_inode()
  2018-07-17 12:41 [PATCH 1/5] f2fs: kill EXT_TREE_VEC_SIZE Chao Yu
  2018-07-17 12:41 ` [PATCH 2/5] f2fs: clean up with get_current_nat_page Chao Yu
@ 2018-07-17 12:41 ` Chao Yu
  2018-07-17 12:41 ` [PATCH 4/5] f2fs: clean up with f2fs_is_{atomic,volatile}_file() Chao Yu
  2018-07-17 12:41 ` [PATCH 5/5] f2fs: clean up ioctl interface naming Chao Yu
  3 siblings, 0 replies; 5+ messages in thread
From: Chao Yu @ 2018-07-17 12:41 UTC (permalink / raw)
  To: jaegeuk; +Cc: linux-f2fs-devel, linux-kernel, chao, Chao Yu

Signed-off-by: Chao Yu <yuchao0@huawei.com>
---
 fs/f2fs/file.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
index d55fa25fc2f1..3a31b4e6d2dc 100644
--- a/fs/f2fs/file.c
+++ b/fs/f2fs/file.c
@@ -1607,7 +1607,7 @@ static int f2fs_ioc_getflags(struct file *filp, unsigned long arg)
 	struct f2fs_inode_info *fi = F2FS_I(inode);
 	unsigned int flags = fi->i_flags;
 
-	if (file_is_encrypt(inode))
+	if (f2fs_encrypted_inode(inode))
 		flags |= F2FS_ENCRYPT_FL;
 	if (f2fs_has_inline_data(inode) || f2fs_has_inline_dentry(inode))
 		flags |= F2FS_INLINE_DATA_FL;
-- 
2.18.0.rc1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 4/5] f2fs: clean up with f2fs_is_{atomic,volatile}_file()
  2018-07-17 12:41 [PATCH 1/5] f2fs: kill EXT_TREE_VEC_SIZE Chao Yu
  2018-07-17 12:41 ` [PATCH 2/5] f2fs: clean up with get_current_nat_page Chao Yu
  2018-07-17 12:41 ` [PATCH 3/5] f2fs: clean up with f2fs_encrypted_inode() Chao Yu
@ 2018-07-17 12:41 ` Chao Yu
  2018-07-17 12:41 ` [PATCH 5/5] f2fs: clean up ioctl interface naming Chao Yu
  3 siblings, 0 replies; 5+ messages in thread
From: Chao Yu @ 2018-07-17 12:41 UTC (permalink / raw)
  To: jaegeuk; +Cc: linux-f2fs-devel, linux-kernel, chao, Chao Yu

Signed-off-by: Chao Yu <yuchao0@huawei.com>
---
 fs/f2fs/segment.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
index 0adab2ec5c5e..92b1bedfe85e 100644
--- a/fs/f2fs/segment.c
+++ b/fs/f2fs/segment.c
@@ -2766,8 +2766,8 @@ static int __get_segment_type_6(struct f2fs_io_info *fio)
 			return CURSEG_COLD_DATA;
 		if (file_is_hot(inode) ||
 				is_inode_flag_set(inode, FI_HOT_DATA) ||
-				is_inode_flag_set(inode, FI_ATOMIC_FILE) ||
-				is_inode_flag_set(inode, FI_VOLATILE_FILE))
+				f2fs_is_atomic_file(inode) ||
+				f2fs_is_volatile_file(inode))
 			return CURSEG_HOT_DATA;
 		return f2fs_rw_hint_to_seg_type(inode->i_write_hint);
 	} else {
-- 
2.18.0.rc1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 5/5] f2fs: clean up ioctl interface naming
  2018-07-17 12:41 [PATCH 1/5] f2fs: kill EXT_TREE_VEC_SIZE Chao Yu
                   ` (2 preceding siblings ...)
  2018-07-17 12:41 ` [PATCH 4/5] f2fs: clean up with f2fs_is_{atomic,volatile}_file() Chao Yu
@ 2018-07-17 12:41 ` Chao Yu
  3 siblings, 0 replies; 5+ messages in thread
From: Chao Yu @ 2018-07-17 12:41 UTC (permalink / raw)
  To: jaegeuk; +Cc: linux-f2fs-devel, linux-kernel, chao, Chao Yu

Romve redundant prefix 'f2fs_' in the middle of f2fs_ioc_f2fs_write_checkpoint().

Signed-off-by: Chao Yu <yuchao0@huawei.com>
---
 fs/f2fs/file.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
index 3a31b4e6d2dc..c6e3c0f751de 100644
--- a/fs/f2fs/file.c
+++ b/fs/f2fs/file.c
@@ -2125,7 +2125,7 @@ static int f2fs_ioc_gc_range(struct file *filp, unsigned long arg)
 	return ret;
 }
 
-static int f2fs_ioc_f2fs_write_checkpoint(struct file *filp, unsigned long arg)
+static int f2fs_ioc_write_checkpoint(struct file *filp, unsigned long arg)
 {
 	struct inode *inode = file_inode(filp);
 	struct f2fs_sb_info *sbi = F2FS_I_SB(inode);
@@ -2906,7 +2906,7 @@ long f2fs_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
 	case F2FS_IOC_GARBAGE_COLLECT_RANGE:
 		return f2fs_ioc_gc_range(filp, arg);
 	case F2FS_IOC_WRITE_CHECKPOINT:
-		return f2fs_ioc_f2fs_write_checkpoint(filp, arg);
+		return f2fs_ioc_write_checkpoint(filp, arg);
 	case F2FS_IOC_DEFRAGMENT:
 		return f2fs_ioc_defragment(filp, arg);
 	case F2FS_IOC_MOVE_RANGE:
-- 
2.18.0.rc1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-07-17 12:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-17 12:41 [PATCH 1/5] f2fs: kill EXT_TREE_VEC_SIZE Chao Yu
2018-07-17 12:41 ` [PATCH 2/5] f2fs: clean up with get_current_nat_page Chao Yu
2018-07-17 12:41 ` [PATCH 3/5] f2fs: clean up with f2fs_encrypted_inode() Chao Yu
2018-07-17 12:41 ` [PATCH 4/5] f2fs: clean up with f2fs_is_{atomic,volatile}_file() Chao Yu
2018-07-17 12:41 ` [PATCH 5/5] f2fs: clean up ioctl interface naming 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).