linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 1/2] f2fs: fix to allow node segment for GC by ioctl path
@ 2018-11-26  8:01 Sahitya Tummala
  2018-11-26  8:01 ` [PATCH v3 2/2] f2fs: adjust trace print in f2fs_get_victim() to cover all paths Sahitya Tummala
  2018-11-26  9:59 ` [PATCH v3 1/2] f2fs: fix to allow node segment for GC by ioctl path Chao Yu
  0 siblings, 2 replies; 4+ messages in thread
From: Sahitya Tummala @ 2018-11-26  8:01 UTC (permalink / raw)
  To: Jaegeuk Kim, Chao Yu, linux-f2fs-devel; +Cc: linux-kernel, Sahitya Tummala

Allow node type segments also to be GC'd via f2fs ioctl
F2FS_IOC_GARBAGE_COLLECT_RANGE.

Signed-off-by: Sahitya Tummala <stummala@codeaurora.org>
---
v3:
seperate the trace print change from this patch

 fs/f2fs/gc.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c
index a07241f..d720551 100644
--- a/fs/f2fs/gc.c
+++ b/fs/f2fs/gc.c
@@ -323,8 +323,7 @@ static int get_victim_by_default(struct f2fs_sb_info *sbi,
 	p.min_cost = get_max_cost(sbi, &p);
 
 	if (*result != NULL_SEGNO) {
-		if (IS_DATASEG(get_seg_entry(sbi, *result)->type) &&
-			get_valid_blocks(sbi, *result, false) &&
+		if (get_valid_blocks(sbi, *result, false) &&
 			!sec_usage_check(sbi, GET_SEC_FROM_SEG(sbi, *result)))
 			p.min_segno = *result;
 		goto out;
-- 
Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project.


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

* [PATCH v3 2/2] f2fs: adjust trace print in f2fs_get_victim() to cover all paths
  2018-11-26  8:01 [PATCH v3 1/2] f2fs: fix to allow node segment for GC by ioctl path Sahitya Tummala
@ 2018-11-26  8:01 ` Sahitya Tummala
  2018-11-26 10:00   ` Chao Yu
  2018-11-26  9:59 ` [PATCH v3 1/2] f2fs: fix to allow node segment for GC by ioctl path Chao Yu
  1 sibling, 1 reply; 4+ messages in thread
From: Sahitya Tummala @ 2018-11-26  8:01 UTC (permalink / raw)
  To: Jaegeuk Kim, Chao Yu, linux-f2fs-devel; +Cc: linux-kernel, Sahitya Tummala

Adjust the trace print in f2fs_get_victim() to cover GC done by
F2FS_IOC_GARBAGE_COLLECT_RANGE.

Signed-off-by: Sahitya Tummala <stummala@codeaurora.org>
---
 fs/f2fs/gc.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c
index d720551..e4689c6 100644
--- a/fs/f2fs/gc.c
+++ b/fs/f2fs/gc.c
@@ -403,11 +403,12 @@ static int get_victim_by_default(struct f2fs_sb_info *sbi,
 		}
 		*result = (p.min_segno / p.ofs_unit) * p.ofs_unit;
 
+	}
+out:
+	if (p.min_segno != NULL_SEGNO)
 		trace_f2fs_get_victim(sbi->sb, type, gc_type, &p,
 				sbi->cur_victim_sec,
 				prefree_segments(sbi), free_segments(sbi));
-	}
-out:
 	mutex_unlock(&dirty_i->seglist_lock);
 
 	return (p.min_segno == NULL_SEGNO) ? 0 : 1;
-- 
Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project.


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

* Re: [PATCH v3 1/2] f2fs: fix to allow node segment for GC by ioctl path
  2018-11-26  8:01 [PATCH v3 1/2] f2fs: fix to allow node segment for GC by ioctl path Sahitya Tummala
  2018-11-26  8:01 ` [PATCH v3 2/2] f2fs: adjust trace print in f2fs_get_victim() to cover all paths Sahitya Tummala
@ 2018-11-26  9:59 ` Chao Yu
  1 sibling, 0 replies; 4+ messages in thread
From: Chao Yu @ 2018-11-26  9:59 UTC (permalink / raw)
  To: Sahitya Tummala, Jaegeuk Kim, linux-f2fs-devel; +Cc: linux-kernel

On 2018/11/26 16:01, Sahitya Tummala wrote:
> Allow node type segments also to be GC'd via f2fs ioctl
> F2FS_IOC_GARBAGE_COLLECT_RANGE.
> 
> Signed-off-by: Sahitya Tummala <stummala@codeaurora.org>

Reviewed-by: Chao Yu <yuchao0@huawei.com>

Thanks,


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

* Re: [PATCH v3 2/2] f2fs: adjust trace print in f2fs_get_victim() to cover all paths
  2018-11-26  8:01 ` [PATCH v3 2/2] f2fs: adjust trace print in f2fs_get_victim() to cover all paths Sahitya Tummala
@ 2018-11-26 10:00   ` Chao Yu
  0 siblings, 0 replies; 4+ messages in thread
From: Chao Yu @ 2018-11-26 10:00 UTC (permalink / raw)
  To: Sahitya Tummala, Jaegeuk Kim, linux-f2fs-devel; +Cc: linux-kernel

On 2018/11/26 16:01, Sahitya Tummala wrote:
> Adjust the trace print in f2fs_get_victim() to cover GC done by
> F2FS_IOC_GARBAGE_COLLECT_RANGE.
> 
> Signed-off-by: Sahitya Tummala <stummala@codeaurora.org>

Reviewed-by: Chao Yu <yuchao0@huawei.com>

Thanks,


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

end of thread, other threads:[~2018-11-26 10:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-26  8:01 [PATCH v3 1/2] f2fs: fix to allow node segment for GC by ioctl path Sahitya Tummala
2018-11-26  8:01 ` [PATCH v3 2/2] f2fs: adjust trace print in f2fs_get_victim() to cover all paths Sahitya Tummala
2018-11-26 10:00   ` Chao Yu
2018-11-26  9:59 ` [PATCH v3 1/2] f2fs: fix to allow node segment for GC by ioctl path 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).