linux-f2fs-devel.lists.sourceforge.net archive mirror
 help / color / mirror / Atom feed
* [f2fs-dev]  [PATCH] Return valid segment type in 4 head logging
@ 2019-08-07 20:54 Surbhi Palande
  2019-08-08  1:33 ` Chao Yu
  0 siblings, 1 reply; 3+ messages in thread
From: Surbhi Palande @ 2019-08-07 20:54 UTC (permalink / raw)
  To: linux-f2fs-devel; +Cc: Surbhi Palande, Jaegeuk Kim

The valid type of current segments in a 4 head logging scheme are:

CURSEG_HOT_DATA, CURSEG_COLD_DATA
CURSEG_HOT_NODE, CURSEG_HOT_NODE.

When a direct node page is not explicitly marked cold,
return CURSEG_HOT_NODE as it's segment type. 
CURSEG_WARM_NODE is not a valid segment type in a
4 head logging scheme.

Signed-off-by: Surbhi Palande <csurbhi@gmail.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 a661ac32e829..b904b5d7b4df 100644
--- a/fs/f2fs/segment.c
+++ b/fs/f2fs/segment.c
@@ -3006,8 +3006,8 @@ static int __get_segment_type_4(struct f2fs_io_info *fio)
 		else
 			return CURSEG_COLD_DATA;
 	} else {
-		if (IS_DNODE(fio->page) && is_cold_node(fio->page))
-			return CURSEG_WARM_NODE;
+		if (IS_DNODE(fio->page) && !is_cold_node(fio->page))
+			return CURSEG_HOT_NODE;
 		else
 			return CURSEG_COLD_NODE;
 	}
-- 
2.20.1



_______________________________________________
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:[~2019-08-08  6:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-08-07 20:54 [f2fs-dev] [PATCH] Return valid segment type in 4 head logging Surbhi Palande
2019-08-08  1:33 ` Chao Yu
     [not found]   ` <CAMBkX3eyb9qNMeoRyNsVg5W=BkChe9Ac2YvW5a7cji8AWvrN=w@mail.gmail.com>
2019-08-08  6:20     ` 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).