* [PATCH] f2fs: don't need to collect dirty sit entries and flush journal when there's no dirty sit entries
@ 2015-02-27 8:49 Wanpeng Li
2015-02-27 8:54 ` Wanpeng Li
0 siblings, 1 reply; 3+ messages in thread
From: Wanpeng Li @ 2015-02-27 8:49 UTC (permalink / raw)
To: Jaegeuk Kim
Cc: Changman Lee, linux-f2fs-devel, linux-fsdevel, linux-kernel,
Wanpeng Li
Signed-off-by: Wanpeng Li <wanpeng.li@linux.intel.com>
---
fs/f2fs/segment.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
index daee4ab..e7b83b6 100644
--- a/fs/f2fs/segment.c
+++ b/fs/f2fs/segment.c
@@ -1730,6 +1730,9 @@ void flush_sit_entries(struct f2fs_sb_info *sbi, struct cp_control *cpc)
mutex_lock(&curseg->curseg_mutex);
mutex_lock(&sit_i->sentry_lock);
+ if (!sit_i->dirty_sentries)
+ goto out;
+
/*
* add and account sit entries of dirty bitmap in sit entry
* set temporarily
@@ -1744,9 +1747,6 @@ void flush_sit_entries(struct f2fs_sb_info *sbi, struct cp_control *cpc)
if (!__has_cursum_space(sum, sit_i->dirty_sentries, SIT_JOURNAL))
remove_sits_in_journal(sbi);
- if (!sit_i->dirty_sentries)
- goto out;
-
/*
* there are two steps to flush sit entries:
* #1, flush sit entries to journal in current cold data summary block.
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH] f2fs: don't need to collect dirty sit entries and flush journal when there's no dirty sit entries
@ 2015-02-27 8:52 Wanpeng Li
0 siblings, 0 replies; 3+ messages in thread
From: Wanpeng Li @ 2015-02-27 8:52 UTC (permalink / raw)
To: Jaegeuk Kim
Cc: Changman Lee, linux-f2fs-devel, linux-fsdevel, linux-kernel,
Wanpeng Li
Don't need to collect dirty sit entries and flush sit journal to sit
entries when there's no dirty sit entries. This patch check dirty_sentries
earlier just like flush_nat_entries.
Signed-off-by: Wanpeng Li <wanpeng.li@linux.intel.com>
---
fs/f2fs/segment.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
index daee4ab..e7b83b6 100644
--- a/fs/f2fs/segment.c
+++ b/fs/f2fs/segment.c
@@ -1730,6 +1730,9 @@ void flush_sit_entries(struct f2fs_sb_info *sbi, struct cp_control *cpc)
mutex_lock(&curseg->curseg_mutex);
mutex_lock(&sit_i->sentry_lock);
+ if (!sit_i->dirty_sentries)
+ goto out;
+
/*
* add and account sit entries of dirty bitmap in sit entry
* set temporarily
@@ -1744,9 +1747,6 @@ void flush_sit_entries(struct f2fs_sb_info *sbi, struct cp_control *cpc)
if (!__has_cursum_space(sum, sit_i->dirty_sentries, SIT_JOURNAL))
remove_sits_in_journal(sbi);
- if (!sit_i->dirty_sentries)
- goto out;
-
/*
* there are two steps to flush sit entries:
* #1, flush sit entries to journal in current cold data summary block.
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] f2fs: don't need to collect dirty sit entries and flush journal when there's no dirty sit entries
2015-02-27 8:49 [PATCH] f2fs: don't need to collect dirty sit entries and flush journal when there's no dirty sit entries Wanpeng Li
@ 2015-02-27 8:54 ` Wanpeng Li
0 siblings, 0 replies; 3+ messages in thread
From: Wanpeng Li @ 2015-02-27 8:54 UTC (permalink / raw)
To: Jaegeuk Kim
Cc: Changman Lee, linux-f2fs-devel, linux-fsdevel, linux-kernel,
Wanpeng Li
Please ignore this one which w/o patch description.
On Fri, Feb 27, 2015 at 04:49:37PM +0800, Wanpeng Li wrote:
>Signed-off-by: Wanpeng Li <wanpeng.li@linux.intel.com>
>---
> fs/f2fs/segment.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
>diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
>index daee4ab..e7b83b6 100644
>--- a/fs/f2fs/segment.c
>+++ b/fs/f2fs/segment.c
>@@ -1730,6 +1730,9 @@ void flush_sit_entries(struct f2fs_sb_info *sbi, struct cp_control *cpc)
> mutex_lock(&curseg->curseg_mutex);
> mutex_lock(&sit_i->sentry_lock);
>
>+ if (!sit_i->dirty_sentries)
>+ goto out;
>+
> /*
> * add and account sit entries of dirty bitmap in sit entry
> * set temporarily
>@@ -1744,9 +1747,6 @@ void flush_sit_entries(struct f2fs_sb_info *sbi, struct cp_control *cpc)
> if (!__has_cursum_space(sum, sit_i->dirty_sentries, SIT_JOURNAL))
> remove_sits_in_journal(sbi);
>
>- if (!sit_i->dirty_sentries)
>- goto out;
>-
> /*
> * there are two steps to flush sit entries:
> * #1, flush sit entries to journal in current cold data summary block.
>--
>1.9.1
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-02-27 9:13 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-27 8:49 [PATCH] f2fs: don't need to collect dirty sit entries and flush journal when there's no dirty sit entries Wanpeng Li
2015-02-27 8:54 ` Wanpeng Li
-- strict thread matches above, loose matches on Subject: below --
2015-02-27 8:52 Wanpeng Li
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox