Hi Jaegeuk,
On 12/05/2014 08:49 AM, Jaegeuk Kim wrote:
> This patch fixes missing kmem_cache_free when handling errors.
>
> Signed-off-by: Jaegeuk Kim
> ---
> fs/f2fs/node.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c
> index b1466c
Rename f2fs_set/clear_bit to f2fs_test_and_set/clear_bit, which mean
set/clear bit and return the old value, for better readability.
Signed-off-by: Gu Zheng
---
fs/f2fs/f2fs.h|4 ++--
fs/f2fs/segment.c |4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/fs/f2fs
Introduce f2fs_change_bit to simplify the change bit logic in
function set_to_next_nat{sit}.
Signed-off-by: Gu Zheng
---
fs/f2fs/f2fs.h|9 +
fs/f2fs/node.h|5 +
fs/f2fs/segment.h |5 +
3 files changed, 11 insertions(+), 8 deletions(-)
diff --git a/fs/f2fs
Remove the unneeded argument 'type' from __get_victim, use
NO_CHECK_TYPE directly when calling v_ops->get_victim().
Signed-off-by: Gu Zheng
---
fs/f2fs/gc.c |8 +---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c
index 2a8f4ac..7
Signed-off-by: Gu Zheng
---
fs/f2fs/segment.c | 12 +---
1 files changed, 1 insertions(+), 11 deletions(-)
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
index 923cb76..6fb7446 100644
--- a/fs/f2fs/segment.c
+++ b/fs/f2fs/segment.c
@@ -1524,17 +1524,7 @@ int
Set raw_super default to NULL to avoid the possibly used
uninitialized warning, though we may never hit it in fact.
Signed-off-by: Gu Zheng
---
fs/f2fs/super.c |2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index 41d6f70..ed59c8e
Use clear_inode_flag to replace the redundant cond_clear_inode_flag.
Signed-off-by: Gu Zheng
---
fs/f2fs/acl.c |4 ++--
fs/f2fs/f2fs.h |9 -
2 files changed, 2 insertions(+), 11 deletions(-)
diff --git a/fs/f2fs/acl.c b/fs/f2fs/acl.c
index 83b9b5a..e8d78fb 100644
--- a/fs/f2fs
On 09/16/2014 11:05 AM, Chao Yu wrote:
> Hi Gu,
>
>> -Original Message-----
>> From: Gu Zheng [mailto:guz.f...@cn.fujitsu.com]
>> Sent: Tuesday, September 16, 2014 9:51 AM
>> To: Chao Yu
>> Cc: Jaegeuk Kim; Changman Lee; linux-f2fs-devel@lists.sourceforge.
Hi Yu,
On 09/15/2014 06:04 PM, Chao Yu wrote:
> In manual of mount, we descript remount as below:
>
> "mount -o remount,rw /dev/foo /dir
> After this call all old mount options are replaced and arbitrary stuff from
> fstab is ignored, except the loop= option which is internally generated and
> m
.
---
v2:
-use llist_for_each_entry_safe to fix possible use-after-free issue.
-remove the unused field from struct flush_cmd.
Thanks for Yu's suggestion.
---
Signed-off-by: Gu Zheng
---
fs/f2fs/f2fs.h|8 +++-
fs/f2fs/segment.c | 29 +
2 files ch
Hi Yu,
On 09/05/2014 03:07 PM, Chao Yu wrote:
> Hi Gu,
>
>> -Original Message-----
>> From: Gu Zheng [mailto:guz.f...@cn.fujitsu.com]
>> Sent: Wednesday, September 03, 2014 5:16 PM
>> To: jaeg...@kernel.org
>> Cc: Gu Zheng; linux-ker...@v
.
Signed-off-by: Gu Zheng
---
fs/f2fs/f2fs.h|7 +++
fs/f2fs/segment.c | 31 +--
2 files changed, 12 insertions(+), 26 deletions(-)
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h
index e921242..1dd861c 100644
--- a/fs/f2fs/f2fs.h
+++ b/fs/f2fs/f2fs.h
On 07/25/2014 12:55 PM, Chao Yu wrote:
> We should put root inode correctly in error path of fill_super, otherwise we
> may encounter a leak case of inode resource.
Good catch, and it also fixed the incorrect 'goto'.
>
> Signed-off-by: Chao Yu
Reviewed-by: Gu Zheng
&g
t; Yu
>
>> -Original Message-
>> From: Andrey Tsyvarev [mailto:tsyva...@ispras.ru]
>> Sent: Thursday, July 24, 2014 6:15 PM
>> To: Gu Zheng; Chao Yu
>> Cc: 'Jaegeuk Kim'; 'linux-kernel'; 'Alexey Khoroshilov';
>> linux
Hi,
On 07/23/2014 10:12 AM, Chao Yu wrote:
> Hi Andrey Gu,
>
>> -Original Message-
>> From: Andrey Tsyvarev [mailto:tsyva...@ispras.ru]
>> Sent: Tuesday, July 22, 2014 6:04 PM
>> To: Gu Zheng
>> Cc: Jaegeuk Kim; linux-kernel; Alexey Khoroshilov;
>&
Hi Andrey,
On 07/21/2014 06:56 PM, Andrey Tsyvarev wrote:
> Hello,
>
> Using memory error detector reveals the following use-after-free error in
> 3.15.0:
>
> AddressSanitizer: heap-use-after-free in f2fs_evict_inode
> Read of size 8 by thread T22279:
> [] f2fs_evict_inode+0x102/0x2e0 [f2fs]
Signed-off-by: Gu Zheng
---
fs/f2fs/debug.c | 17 +
1 files changed, 5 insertions(+), 12 deletions(-)
diff --git a/fs/f2fs/debug.c b/fs/f2fs/debug.c
index b52c12c..3f99266 100644
--- a/fs/f2fs/debug.c
+++ b/fs/f2fs/debug.c
@@ -345,21 +345,14 @@ void __init
Signed-off-by: Gu Zheng
---
fs/f2fs/f2fs.h |1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h
index ae3b4ac..8f507d4 100644
--- a/fs/f2fs/f2fs.h
+++ b/fs/f2fs/f2fs.h
@@ -1298,7 +1298,6 @@ bool space_for_roll_forward(struct f2fs_sb_info
Hi Changman,
On 07/07/2014 09:45 AM, Changman Lee wrote:
> Hello,
>
> On Fri, Jul 04, 2014 at 11:25:35PM -0700, Jaegeuk Kim wrote:
>> To Changman,
>>
>> Just for sure, can you reproduce this issue in the x86 machine with proper
>> benchmarks? (i.e., test_bit_le vs. find_next_bit_le)
>
> It shows
This patch assign cmd_control_info in sm_info before issue_flush_thread is
> being
> created, so this make sure that issue flush thread will have no chance to
> access
> invalid info in fcc.
>
> Signed-off-by: Chao Yu
Reviewed-by: Gu Zheng
> ---
> fs/f2fs/segment.c | 3 ++-
> 1 f
Hi Yu,
Thanks.
On 07/04/2014 02:21 PM, Chao Yu wrote:
> Hi Jaegeuk, Gu, Changman
>
>> -Original Message-
>> From: Jaegeuk Kim [mailto:jaeg...@kernel.org]
>> Sent: Friday, July 04, 2014 1:36 PM
>> To: Gu Zheng
>> Cc: f2fs; fsdevel; 이창만; 俞
&
e numbers wrt this?
>
> On Tue, Jun 24, 2014 at 06:20:41PM +0800, Gu Zheng wrote:
>> Use find_next_bit_le rather than test_bit_le to improve search speed
>> lightly.
>>
>> Signed-off-by: Gu Zheng
>> ---
>> fs/f2fs/dir.c | 43 +---
_le if the bit stream looks
> like 01.
Agree.
>
> Well, IMO the former case would be a little bit more common.
>
> Gu,
> Can you provide some performance numbers wrt this?
OK. I'll do it.:)
Thanks,
Gu
>
> On Tue, Jun 24, 2014 at 06:20:41PM +0800, G
ore effective data about this,
maybe it it can dispel our qualm.
> Sorry, I should have reported this quickly.
It's not late.:)
Thanks,
Gu
>
> On Tue, Jun 24, 2014 at 06:20:41PM +0800, Gu Zheng wrote:
>> Use find_next_bit_le rather than test_bit_le to improve search speed
>&
Use find_next_bit_le rather than test_bit_le to improve search speed
lightly.
Signed-off-by: Gu Zheng
---
v2: cleanup the needless code suggested by Yu Chao
---
---
fs/f2fs/dir.c | 43 ---
1 files changed, 20 insertions(+), 23 deletions(-)
diff --git
Signed-off-by: Gu Zheng
---
v2: fix the same issue in f2fs_delete_entry suggested by Yu Chao.
---
---
fs/f2fs/dir.c | 19 ---
1 files changed, 8 insertions(+), 11 deletions(-)
diff --git a/fs/f2fs/dir.c b/fs/f2fs/dir.c
index 087b03d..bcbfbc4 100644
--- a/fs/f2fs/dir.c
+++ b/fs
Hi Yu,
On 06/25/2014 10:30 AM, Chao Yu wrote:
> Hi Gu,
>
> Just one nitpick.
>
>> -Original Message-
>> From: Gu Zheng [mailto:guz.f...@cn.fujitsu.com]
>> Sent: Tuesday, June 24, 2014 6:21 PM
>> To: Jaegeuk Kim
>> Cc: fsdevel; f2fs
&g
Hi Yu,
On 06/25/2014 09:55 AM, Chao Yu wrote:
> Hi Gu,
>
> I found kaddr in f2fs_delete_entry is unneeded, maybe this trivial problem
> could be fixed in this patch together. :)
Yeah, I'll add this fix together.;)
Regards,
Gu
>
> Thanks.
>
>> -Origina
Signed-off-by: Gu Zheng
---
fs/f2fs/dir.c | 28 +---
fs/f2fs/f2fs.h |2 +-
fs/f2fs/hash.c |4 +++-
3 files changed, 17 insertions(+), 17 deletions(-)
diff --git a/fs/f2fs/dir.c b/fs/f2fs/dir.c
index ba510fb..06f4833 100644
--- a/fs/f2fs/dir.c
+++ b/fs/f2fs
Use find_next_bit_le rather than test_bit_le to improve search speed
lightly.
Signed-off-by: Gu Zheng
---
fs/f2fs/dir.c | 43 +--
1 files changed, 21 insertions(+), 22 deletions(-)
diff --git a/fs/f2fs/dir.c b/fs/f2fs/dir.c
index 3edd561..ba510fb
Signed-off-by: Gu Zheng
---
fs/f2fs/dir.c | 14 ++
1 files changed, 6 insertions(+), 8 deletions(-)
diff --git a/fs/f2fs/dir.c b/fs/f2fs/dir.c
index 087b03d..3edd561 100644
--- a/fs/f2fs/dir.c
+++ b/fs/f2fs/dir.c
@@ -298,14 +298,13 @@ static int make_empty_dir(struct inode *inode
>From the userspace side, VFS layer does the check; and from the
kernel side(xx_init_acl), the acl is get/cloned from the parent dir's,
which is credible. So remove the redundant validation check of acl
here.
Signed-off-by: Gu Zheng
---
fs/f2fs/acl.c |6 --
1 files changed, 0 in
Split the flush_merge fields from sm_i, and use the new struct flush_cmd_control
to wrap it, so that we can igonre these fileds if flush_merge is disable, and
it alse can the structs more neat.
Signed-off-by: Gu Zheng
---
fs/f2fs/f2fs.h| 17
fs/f2fs/segment.c | 69
Introduce help function {create,destroy}_flush_cmd_control to clean up
the create/destory flush merge operation.
Signed-off-by: Gu Zheng
---
fs/f2fs/f2fs.h|3 +-
fs/f2fs/segment.c | 60 +---
fs/f2fs/super.c | 27
Hi Alexey, Kim,
On 04/18/2014 02:04 PM, Alexey Khoroshilov wrote:
> On 17.04.2014 00:45, Jaegeuk Kim wrote:
>> Hi,
>>
>> 2014-04-16 (수), 18:11 -0700, Alexey Khoroshilov:
>>> Hi,
>>>
>>> But would not ability to trigger BUG_ON by mounting a crafted image
>>> considered as an issue having security i
pay some attention to the flush cmds merging operation when doing
tests, it seems that some of the outstanding flush cmds(in the issue_list) will
be ignored when new cmd added.
I'll review and test it more.
> Anyway, thank you for your work. :)
Regards,
Gu
>
> 2014-04-14 (월), 09:18 +08
Hi All,
There seems to be a mistake in "[PATCH 2/7]f2fs: remove the unuseful
"issue_tail" list",
and the whole patchset needs to be reworked. So please ignore this one.
Sorry for the noise.
Regards,
Gu
On 04/11/2014 05:49 PM, Gu Zheng wrote:
> Gu Zheng (7):
>
Hi All,
There seems to be a mistake in this patch, please ignore it.
I'll send a reworked one later.
Regards,
Gu
On 04/11/2014 05:49 PM, Gu Zheng wrote:
> With the issue_list and dispatch_list, we can handle flush_merge
> already, so remove the useless "issue_tail" list.
&
0x93/0x18c
[] issue_flush_thread+0x8d/0x145 [f2fs]
[] kthread+0xba/0xc2
[] ret_from_fork+0x7c/0xb0
[] 0x
Signed-off-by: Gu Zheng
---
fs/f2fs/segment.c |1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
index 085f54
Gu Zheng (7):
f2fs: put the bio when issue_flush completed
f2fs: remove the unuseful "issue_tail" list
f2fs: use __GFP_ZERO to avoid appending set-NULL
f2fs: enable flush_merge only in f2fs is not read-only
f2fs: add the flush_merge handle in the remount flow
f2fs: introd
With the issue_list and dispatch_list, we can handle flush_merge
already, so remove the useless "issue_tail" list.
Signed-off-by: Gu Zheng
---
fs/f2fs/f2fs.h|1 -
fs/f2fs/segment.c |5 ++---
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/fs/f2fs/f2fs.h
Add the *remount* handle of flush_merge option, so that the users
can enable flush_merge in the runtime, such as the underlying device
handles the cache_flush command relatively slowly.
Signed-off-by: Gu Zheng
---
fs/f2fs/f2fs.h|1 +
fs/f2fs/segment.c |2 +-
fs/f2fs/super.c | 45
Enable flush_merge only in f2fs is not read-only, so does the mount
option show.
Signed-off-by: Gu Zheng
---
fs/f2fs/segment.c |3 +--
fs/f2fs/super.c |4 ++--
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
index ff8f987..6672570
Split the flush_merge fields from sm_i, and use the new struct flush_cmd_control
to wrap it, so that we can igonre these fileds if flush_merge is disable, and
it alse can the structs more neat.
Signed-off-by: Gu Zheng
---
fs/f2fs/f2fs.h| 14 +++
fs/f2fs/segment.c | 68
Introduce help function {create,destroy}_flush_cmd_control to clean up
the create/destory flush merge operation.
Signed-off-by: Gu Zheng
---
fs/f2fs/f2fs.h|3 +-
fs/f2fs/segment.c | 55
fs/f2fs/super.c | 29
Signed-off-by: Gu Zheng
---
fs/f2fs/segment.c |4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
index 8a6fe2a..ff8f987 100644
--- a/fs/f2fs/segment.c
+++ b/fs/f2fs/segment.c
@@ -243,9 +243,7 @@ int f2fs_issue_flush(struct
Hi Yu,
On 04/01/2014 09:45 AM, Chao Yu wrote:
> Hi Gu,
>
>> -Original Message-----
>> From: Gu Zheng [mailto:guz.f...@cn.fujitsu.com]
>> Sent: Monday, March 31, 2014 6:07 PM
>> To: Chao Yu
>> Cc: ???; linux-f2fs-devel@lists.sourceforge.net;
>> l
Hi Yu,
On 03/29/2014 11:33 AM, Chao Yu wrote:
> This patch use list_for_each_entry{_safe} instead of list_for_each{_safe} for
> simplfying code.
>
> Signed-off-by: Chao Yu
> ---
> fs/f2fs/checkpoint.c | 37 ++---
> fs/f2fs/node.c | 16 ++--
>
Hi,
On 03/13/2014 05:13 PM, Chao Yu wrote:
> Hi Gu,
>
>> -Original Message-----
>> From: Gu Zheng [mailto:guz.f...@cn.fujitsu.com]
>> Sent: Friday, March 07, 2014 6:44 PM
>> To: Kim
>> Cc: linux-kernel; f2fs
>> Subject: [f2fs-dev] [PATCH 3/5] f
Hi Kim,
On 03/10/2014 12:45 PM, Jaegeuk Kim wrote:
> Hi Gu,
>
> 2014-03-07 (금), 18:43 +0800, Gu Zheng:
>> Previously, we ra_sum_pages to pre-read contiguous pages as more
>> as possible, and if we fail to alloc more pages, an ENOMEM error
>> will be reported upstream,
Hi Kim,
On 03/10/2014 12:50 PM, Jaegeuk Kim wrote:
> Hi Gu,
>
> 2014-03-07 (금), 18:43 +0800, Gu Zheng:
>> Previously, when we try to alloc free nid while the build free nid
>> is going, the allocer will be run into the flow that waiting for
>> "nm_i->build_
Hi Changman,
On 03/10/2014 12:09 PM, Changman Lee wrote:
> On 금, 2014-03-07 at 18:43 +0800, Gu Zheng wrote:
>> Previously, when we try to alloc free nid while the build free nid
>> is going, the allocer will be run into the flow that waiting for
>> "nm_i->build_lock&q
On 03/08/2014 07:46 PM, Chao Yu wrote:
> Hi Gu,
>
>> -Original Message-----
>> From: Gu Zheng [mailto:guz.f...@cn.fujitsu.com]
>> Sent: Friday, March 07, 2014 6:43 PM
>> To: Kim
>> Cc: linux-kernel; f2fs
>> Subject: [f2fs-dev] [PATCH 1/5] f2
# cat /proc/fs/f2fs/loop0/segment_info
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
..
0 0 0 0 0 0 0 0 0 0
0 0 1 0 0 1
[root@guz Demoes]#
Signed-off-by: Gu Zheng
---
fs/f2fs/super.c |7 ---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/fs/f2fs/super.c
ssary building free nid if the current
building free nid job is done.
So here we introduce a wait_queue to avoid this issue.
Signed-off-by: Gu Zheng
---
fs/f2fs/f2fs.h |1 +
fs/f2fs/node.c | 10 +-
2 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/fs/f2fs/f2fs.h b/fs/f
following circle. Only reporting ENOMEM
upstream if we really can not alloc any available page.
And another fix is ignoring dealing with the following pages if an
EIO occurs when reading page from page_list.
Signed-off-by: Gu Zheng
---
fs/f2fs/node.c| 44
Gu Zheng (5):
f2fs: update start nid once each circle
f2fs: remove the unused ctor argument of f2fs_kmem_cache_create()
f2fs: format segment_info's show for better legibility
f2fs: optimize restore_node_summary slightly
f2fs: add a wait queue to avoid unnecessary build_free_nid
Signed-off-by: Gu Zheng
---
fs/f2fs/node.c |6 +-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c
index 8c14110..9653096 100644
--- a/fs/f2fs/node.c
+++ b/fs/f2fs/node.c
@@ -1875,11 +1875,15 @@ void destroy_node_manager(struct f2fs_sb_info
Signed-off-by: Gu Zheng
---
fs/f2fs/checkpoint.c |4 ++--
fs/f2fs/f2fs.h |4 ++--
fs/f2fs/gc.c |2 +-
fs/f2fs/node.c |4 ++--
fs/f2fs/recovery.c |2 +-
fs/f2fs/segment.c|2 +-
fs/f2fs/super.c |2 +-
7 files changed, 10 insertions(+), 10
Introduce help macro on_build_free_nids() which just uses build_lock
to judge whether the building free nid is going, so that we can remove
the on_build_free_nids field from f2fs_sb_info.
Signed-off-by: Gu Zheng
---
fs/f2fs/f2fs.h |2 --
fs/f2fs/node.c |6 +++---
2 files changed, 3
also rename the function name for better descriptive.
alloc_nid-->get_free_nid
alloc_nid_failed-->put_back_free_nid
Signed-off-by: Gu Zheng
---
fs/f2fs/f2fs.h |5 +--
fs/f2fs/namei.c | 18 +--
fs/f2fs/node.c | 62 +++---
f
Hi,
On 02/13/2014 05:40 PM, Andrey Tsyvarev wrote:
> Hi,
>
>> BTW, have you tested the case that added remove_dirty_dir_inode() into the
>> fail path
>> of init_inode_metadata?
>> diff --git a/fs/f2fs/dir.c b/fs/f2fs/dir.c
>> index e095a4f..d5a2c9e 100644
>> --- a/fs/f2fs/dir.c
>> +++ b/fs/f2fs/
Hi Andrey,
On 02/11/2014 04:29 PM, Andrey Tsyvarev wrote:
> Hi,
>
>> It turns out that make_bad_inode prior to iput sets i_mode to a regular
>> file, so that f2fs_evict_inode -> truncate_inode_pages ->
>> f2fs_invalidate_data_page doesn't decrement dirty_dents.
>>
> It seems that remove_dirty_dir
remove the page array directly.
Reported-by: Dan Carpenter
Signed-off-by: Gu Zheng
---
fs/f2fs/checkpoint.c |7 ---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c
index f9d4f7d..ed82de6 100644
--- a/fs/f2fs/checkpoint.c
+++ b/fs
Introduce help function META_MAPPING() to get the cache meta blocks'
address space.
Signed-off-by: Gu Zheng
---
fs/f2fs/checkpoint.c |8
fs/f2fs/debug.c |4 ++--
fs/f2fs/f2fs.h |5 +
fs/f2fs/node.c |2 +-
fs/f2fs/segment.c|2 +-
5
Move grabbing orphan block page out of protection region, and grab all
the orphan block pages ahead.
v2:
Remove the redundant code as Chao Yu suggested.
Reviewed-by: Chao Yu
Signed-off-by: Gu Zheng
---
fs/f2fs/checkpoint.c | 16 +---
1 files changed, 9 insertions(+), 7
Hi Yu,
On 01/11/2014 09:27 AM, Chao Yu wrote:
> Hi Gu,
>
>> -Original Message-----
>> From: Gu Zheng [mailto:guz.f...@cn.fujitsu.com]
>> Sent: Friday, January 10, 2014 6:09 PM
>> To: Kim
>> Cc: fsdevel; linux-kernel; f2fs
>> Subject: [f2fs-dev] [PATC
With the 2 previous changes, all the long time operations are moved out
of the protection region, so here we can use spinlock rather than mutex
(orphan_inode_mutex) for lower overhead.
Signed-off-by: Gu Zheng
---
fs/f2fs/checkpoint.c | 24
fs/f2fs/f2fs.h |2
Move alloc new orphan node out of lock protection region.
Signed-off-by: Gu Zheng
---
fs/f2fs/checkpoint.c | 15 +--
1 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c
index af92c74..007f64c 100644
--- a/fs/f2fs/checkpoint.c
Move grabing orphan block page out of protection region, and grab all
the orphan block pages ahead.
Signed-off-by: Gu Zheng
---
fs/f2fs/checkpoint.c | 15 +--
1 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c
index 0d78bbe
Previously, we need to calculate the max orphan num when we try to acquire an
orphan inode, but it's a stable value since the super block was inited. So
converting it to a field of f2fs_sb_info and use it directly when needed seems
a better choose.
Signed-off-by: Gu Zheng
---
fs
When using the f2fs_io_info in the low level, we still need to merge the
rw and rw_flag, so use the rw to hold all the io flags directly,
and remove the rw_flag field.
ps.It is based on the previous patch:
f2fs: move all the bio initialization into __bio_alloc
Signed-off-by: Gu Zheng
---
fs
Move all the bio initialization into __bio_alloc, and some minor cleanups are
also added.
v3:
Use 'bool' rather than 'int' as Kim suggested.
v2:
Use 'is_read' rather than 'rw' as Yu Chao suggested.
Remove the needless initialization of bio->bi
Move all the bio initialization into __bio_alloc, and some minor cleanups are
also added.
v2:
Use 'is_read' rather than 'rw' as Yu Chao suggested.
Remove the needless initialization of bio->bi_private.
Signed-off-by: Gu Zheng
---
2013-12-19 (목), 09:23 +0800, Chao Yu:
>> Hi Gu,
>>
>>> -Original Message-
>>> From: Gu Zheng [mailto:guz.f...@cn.fujitsu.com]
>>> Sent: Wednesday, December 18, 2013 6:29 PM
>>> To: Kim
>>> Cc: fsdevel; linux-kernel; f2fs
>>>
Move all the bio initialization into __bio_alloc, and some minor cleanups are
also added.
Signed-off-by: Gu Zheng
---
fs/f2fs/data.c | 93 ++--
1 files changed, 43 insertions(+), 50 deletions(-)
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
> 3. Introduce __submit_merged_bio to submit the merged bio.
> 4. Change f2fs_readpage to f2fs_submit_page_bio.
> 5. Introduce f2fs_submit_page_mbio to integrate previous submit_read_page and
>submit_write_page.
>
> Signed-off-by: Jaegeuk Kim
Reviewed-by: Gu Zheng
> ---
> fs/
oint, f2fs submits a META_FLUSH bio to wait its
> bio
> completion.
> - Since we have no dependancies to remove bi_private now, let's just use
> bi_private pointer as the completion pointer.
Cool, looks good to me.:)
>
> Signed-off-by:
Fix a potential out of range issue introduced by commit:
22fb72225a
f2fs: simplify write_orphan_inodes for better readable
Signed-off-by: Gu Zheng
---
fs/f2fs/checkpoint.c |4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c
On 11/21/2013 01:46 PM, Chao Yu wrote:
> Hi Gu,
>
>> -Original Message-----
>> From: Gu Zheng [mailto:guz.f...@cn.fujitsu.com]
>> Sent: Wednesday, November 20, 2013 5:38 PM
>> To: Chao Yu
>> Cc: '???'; linux-fsde...@vger.kernel.org; linu
ck protection region, so
that we can ignore the list change during the gap(initialization<-->use).
And on the other side, it can keep the code style uniform for better
maintenance.
Regards,
Gu
>
> Thanks,
>
> 2013-11-19 (화), 18:03 +0800, Gu Zheng:
>> Signed-off-by: Gu Z
Hi Yu,
On 11/20/2013 01:37 PM, Chao Yu wrote:
> Hi Gu,
>
>> -Original Message-----
>> From: Gu Zheng [mailto:guz.f...@cn.fujitsu.com]
>> Sent: Monday, November 18, 2013 7:16 PM
>> To: Chao Yu
>> Cc: '???'; linux-fsde...@vger.kernel.org; linu
Signed-off-by: Gu Zheng
---
fs/f2fs/checkpoint.c | 15 ++-
1 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c
index f884589..1de70cc 100644
--- a/fs/f2fs/checkpoint.c
+++ b/fs/f2fs/checkpoint.c
@@ -511,8 +511,8 @@ void
Simplify write_orphan_inodes for better readable. Because we hold the
orphan_inode_mutex, so it's safe to use list_for_each_entry instead of
list_for_each_safe.
Signed-off-by: Gu Zheng
---
fs/f2fs/checkpoint.c | 38 ++
1 files changed, 18 insertions(+
Signed-off-by: Gu Zheng
---
fs/f2fs/f2fs.h |3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h
index 94fbec3..d0c6738 100644
--- a/fs/f2fs/f2fs.h
+++ b/fs/f2fs/f2fs.h
@@ -585,7 +585,7 @@ static inline bool inc_valid_block_count(struct
Signed-off-by: Gu Zheng
---
fs/f2fs/f2fs.h |2 +-
fs/f2fs/node.c | 12
2 files changed, 5 insertions(+), 9 deletions(-)
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h
index 89dc750..94fbec3 100644
--- a/fs/f2fs/f2fs.h
+++ b/fs/f2fs/f2fs.h
@@ -1027,7 +1027,7 @@ int
Gu Zheng (5):
f2fs: convert remove_inode_page to void
f2fs: convert dev_valid_block_count to void
f2fs: convert inc/dec_valid_node_count to inc/dec one count
f2fs: simplify write_orphan_inodes for better readable
f2fs: move the list_head initialization into the lock protection
Signed-off-by: Gu Zheng
---
fs/f2fs/f2fs.h | 32 +++-
fs/f2fs/node.c |6 +++---
2 files changed, 18 insertions(+), 20 deletions(-)
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h
index d0c6738..125bef0 100644
--- a/fs/f2fs/f2fs.h
+++ b/fs/f2fs/f2fs.h
@@ -685,50
;
> v1-->v2:
> o merge judgements/use 'Continue' or 'Break' instead of 'Goto' as Gu Zheng
> suggested.
> o add mark_page_accessed () before release page to delay VM reclaiming them.
>
> Signed-off-by: Chao Yu
> ---
> fs/f2fs/segment.c | 10
.
>>> I cannot fix this at every time though. :(
>>
>> Got it, sorry about my carelessness in previous patch.
>>
>>>
>>>>
>>>> v1-->v2:
>>>> o add declarations here as Gu Zheng suggested.
>>>>
>>>>
Hi Kim,
On 11/18/2013 05:12 PM, Jaegeuk Kim wrote:
> This patch removes an unnecessary semaphore (i.e., sbi->bio_sem).
> There is no reason to use the semaphore when f2fs submits read and write IOs.
> Instead, let's use a write mutex and cover the sbi->bio[] by the lock.
My god, I just sent out a
Use mutex rather than the rw_sem to protect bio related fields,
because it's needless to take the read_sem in the read path.
Signed-off-by: Gu Zheng
---
fs/f2fs/data.c|4
fs/f2fs/f2fs.h|2 +-
fs/f2fs/segment.c |8
fs/f2fs/super.c |2 +-
4 files ch
Hi Yu,
On 11/13/2013 04:10 PM, Chao Yu wrote:
> Hi Gu,
>
>> -Original Message-----
>> From: Gu Zheng [mailto:guz.f...@cn.fujitsu.com]
>> Sent: Wednesday, November 13, 2013 11:39 AM
>> To: Chao Yu
>> Cc: ???; linux-fsde...@vger.kernel.org; linux-ker...@v
On 11/12/2013 01:15 PM, Chao Yu wrote:
> For better read performance, we add a new function to support for merging
> contiguous read as the one for write.
Nice shot!
>
> Signed-off-by: Chao Yu
Acked-by: Gu Zheng
> ---
> fs/
Hi Yu,
On 11/12/2013 01:18 PM, Chao Yu wrote:
> Previously we read sit entries page one by one, this method lost the chance
> of reading contiguous page together.
> So we read pages as contiguous as possible for better mount performance.
>
> Signed-off-by: Chao Yu
> ---
> fs/f2fs/f2fs.h|
On 11/06/2013 01:10 PM, Chao Yu wrote:
> Hi Gu,
>
>> -Original Message-----
>> From: Gu Zheng [mailto:guz.f...@cn.fujitsu.com]
>> Sent: Wednesday, November 06, 2013 11:41 AM
>> To: Chao Yu
>> Cc: ???; linux-fsde...@vger.kernel.org; linux-ker...@v
On 11/06/2013 09:12 AM, Chao Yu wrote:
> A NULL point should avoid to be used in destroy_segment_manager after
> allocating memory fail for f2fs_sm_info.
Though without this patch it still can work well, because if it failed
to allocate f2fs_sm_info, the sit_info, free_info... all were NULL, and
On 10/28/2013 10:19 AM, 이창만 wrote:
> To check whether bitmap are all zeros or all ones, I think memcmp is more
> neat.
> But I don't know exactly performance gap between memcmp and find_next_bit.
According to my understanding,
memcmp: one by one search,
find_next_bit: binary search.
Regards,
Gu
Hi Yu,
On 10/24/2013 04:21 PM, Chao Yu wrote:
> Previously, check_block_count check valid_map with bit data type in common
> scenario that sit has all ones or zeros bitmap, it makes low mount
> performance.
> So let's check the special bitmap with integer data type instead of the bit
> one.
>
On 10/23/2013 05:46 PM, Jaegeuk Kim wrote:
> This patch cleans up improper definitions that update some status information.
Nice, it makes the code more neat.
>
> Signed-off-by: Jaegeuk Kim
Reviewed-by: Gu Zheng
> ---
> fs/f2fs/checkpoint.c | 8 ++--
> fs/f2fs
1 - 100 of 162 matches
Mail list logo