f2fs系列之冷热数据分离

Windows Windows 2个月前 (08-15) 9次浏览 未收录 0个评论 扫描二维码

f2fs针对SSD介质,根据数据读写的频繁程度,实现了冷热数据的分离。

多路日志的原理

多路日志的相关数据结构

/*

* For SIT manager

*

* By default, there are 6 active log areas across the whole main area.

* When considering hot and cold data separation to reduce cleaning overhead,

* we split 3 for data logs and 3 for node logs as hot, warm, and cold types,

* respectively.

* In the current design, you should not change the numbers intentionally.

* Instead, as a mount option such as active_logs=x, you can use 2, 4, and 6

* logs individually according to the underlying devices. (default: 6)

* Just in case, on-disk layout covers maximum 16 logs that consist of 8 for

* data and 8 for node logs.

*/

#define NR_CURSEG_DATA_TYPE (3)

#define NR_CURSEG_NODE_TYPE (3)

#define NR_CURSEG_TYPE (NR_CURSEG_DATA_TYPE + NR_CURSEG_NODE_TYPE)

enum {

CURSEG_HOT_DATA = 0, /* directory entry blocks */

CURSEG_WARM_DATA, /* data blocks */

CURSEG_COLD_DATA, /* multimedia or GCed data blocks */

CURSEG_HOT_NODE, /* direct node blocks of directory files */

CURSEG_WARM_NODE, /* direct node blocks of normal files */

CURSEG_COLD_NODE, /* indirect node blocks */

NO_CHECK_TYPE,

};

多路日志的

喜欢 (0)
[]
分享 (0)
关于作者:
发表我的评论
取消评论
表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址