Skip to contentSkip to conversation

f2fs: Don't try to split extents shorter than F2FS_MIN_EXTENT_LEN

PATCH In review Fan Li 2 participants 2 messages Jul 8, 2015 F2FS file system

lore
Share & tools
lore

Fan Li

author
#0 lore raw

PATCH 1/1 f2fs: Don't try to split extents shorter than F2FS_MIN_EXTENT_LEN

Since only parts of extents longer than F2FS_MIN_EXTENT_LEN will be kept in extent cache after split, extents already shorter than F2FS_MIN_EXTENT_LEN don't need to try split at all.

---
 fs/f2fs/data.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/f2fs/data.c +0 -0
index 37a2632..e2996cb 100644
@@ -585,7 +585,7 @@ static bool f2fs_update_extent_tree(struct inode *inode,

pgoff_t fofs,
__detach_extent_node(sbi, et, en);

/* 2. if extent can be split more, split and insert the left part */
- if (dei.len > 1) {
+ if (dei.len > F2FS_MIN_EXTENT_LEN) {
/* insert left part of split extent into cache */ if (fofs - dei.fofs >= F2FS_MIN_EXTENT_LEN) {
set_extent_info(&ei, dei.fofs, dei.blk,

Signature · 9 lines
1.7.9.5


------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
Reviewed-by on v1 1/1
#1 lore raw
Quoted 7 lines

-----Original Message-----
From: Fan Li [mailto:[email protected]]
Sent: Wednesday, July 08, 2015 4:03 PM
To: [email protected]
Cc: [email protected]
Subject: [f2fs-dev] [PATCH] f2fs: Don't try to split extents shorter than F2FS_MIN_EXTENT_LEN

Quoted 6 lines

Since only parts of extents longer than F2FS_MIN_EXTENT_LEN will be kept in extent cache after split, extents already shorter than F2FS_MIN_EXTENT_LEN don't need to try split at all.

Looks good to me.

------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business. Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/