linux-f2fs-devel.lists.sourceforge.net archive mirror
 help / color / mirror / Atom feed
* [PATCH] f2fs: Don't try to split extents shorter than F2FS_MIN_EXTENT_LEN
@ 2015-07-08  8:02 Fan Li
  2015-07-08 10:26 ` Chao Yu
  0 siblings, 1 reply; 2+ messages in thread
From: Fan Li @ 2015-07-08  8:02 UTC (permalink / raw)
  To: jaegeuk; +Cc: linux-f2fs-devel

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.


Signed-off-by: Fan Li <fanofcode.li@samsung.com>
---
 fs/f2fs/data.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
index 37a2632..e2996cb 100644
--- a/fs/f2fs/data.c
+++ b/fs/f2fs/data.c
@@ -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,
-- 
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/

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

* Re: [PATCH] f2fs: Don't try to split extents shorter than F2FS_MIN_EXTENT_LEN
  2015-07-08  8:02 [PATCH] f2fs: Don't try to split extents shorter than F2FS_MIN_EXTENT_LEN Fan Li
@ 2015-07-08 10:26 ` Chao Yu
  0 siblings, 0 replies; 2+ messages in thread
From: Chao Yu @ 2015-07-08 10:26 UTC (permalink / raw)
  To: 'Fan Li', jaegeuk; +Cc: linux-f2fs-devel

> -----Original Message-----
> From: Fan Li [mailto:fanofcode.li@samsung.com]
> Sent: Wednesday, July 08, 2015 4:03 PM
> To: jaegeuk@kernel.org
> Cc: linux-f2fs-devel@lists.sourceforge.net
> Subject: [f2fs-dev] [PATCH] 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.
> 
> 
> Signed-off-by: Fan Li <fanofcode.li@samsung.com>

Looks good to me.

Reviewed-by: Chao Yu <chao2.yu@samsung.com>


------------------------------------------------------------------------------
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/

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

end of thread, other threads:[~2015-07-08 10:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-08  8:02 [PATCH] f2fs: Don't try to split extents shorter than F2FS_MIN_EXTENT_LEN Fan Li
2015-07-08 10:26 ` 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).