Re: [f2fs-dev] f2fs: Possible use-after-free when umount filesystem

2014-07-25 Thread Jaegeuk Kim
Thank you guys. I merged two patches. :) -- Jaegeuk Kim 2014-07-24 22:49 GMT-07:00 Gu Zheng : > On 07/25/2014 11:22 AM, Chao Yu wrote: > >> Hi, >> >> To Andrey: >> Thanks for your test on this patch! >> >> To Gu: >> If you do not object, let me make and resend a patch base on the one which >> ski

[f2fs-dev] [PATCH 01/11] f2fs: add nobarrier mount option

2014-07-25 Thread Jaegeuk Kim
This patch adds a mount option, nobarrier, in f2fs. The assumption in here is that file system keeps the IO ordering, but doesn't care about cache flushes inside the storages. Signed-off-by: Jaegeuk Kim --- fs/f2fs/data.c| 5 - fs/f2fs/f2fs.h| 1 + fs/f2fs/segment.c | 3 +++ fs/f2fs/

[f2fs-dev] [PATCH 02/11] f2fs: punch the core function for inode management

2014-07-25 Thread Jaegeuk Kim
This patch punches out the core functions to manage the inode numbers. Signed-off-by: Jaegeuk Kim --- fs/f2fs/checkpoint.c | 81 1 file changed, 44 insertions(+), 37 deletions(-) diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c index

[f2fs-dev] [PATCH 04/11] f2fs: use radix_tree for ino management

2014-07-25 Thread Jaegeuk Kim
For better ino management, this patch replaces the data structure from list to radix tree. Signed-off-by: Jaegeuk Kim --- fs/f2fs/checkpoint.c | 48 ++-- fs/f2fs/f2fs.h | 1 + 2 files changed, 27 insertions(+), 22 deletions(-) diff --git a/fs/f

[f2fs-dev] [PATCH 03/11] f2fs: add infra for ino management

2014-07-25 Thread Jaegeuk Kim
This patch changes the naming of orphan-related data structures to use as inode numbers managed globally. Later, we can use this facility for managing any inode number lists. Signed-off-by: Jaegeuk Kim --- fs/f2fs/checkpoint.c | 72 +++- fs/f2fs/de

[f2fs-dev] [PATCH 05/11] f2fs: add info of appended or updated data writes

2014-07-25 Thread Jaegeuk Kim
This patch introduces a inode number list in which represents inodes having appended data writes or updated data writes after last checkpoint. This will be used at fsync to determine whether the recovery information should be written or not. Signed-off-by: Jaegeuk Kim --- fs/f2fs/checkpoint.c |

[f2fs-dev] [PATCH 06/11] f2fs: skip unnecessary data writes during fsync

2014-07-25 Thread Jaegeuk Kim
This patch intends to improve the fsync performance by skipping remaining the recovery information, only when there is no data that we should recover. Signed-off-by: Jaegeuk Kim --- fs/f2fs/file.c | 16 1 file changed, 16 insertions(+) diff --git a/fs/f2fs/file.c b/fs/f2fs/file

[f2fs-dev] [PATCH 07/11] f2fs: enable in-place-update for fdatasync

2014-07-25 Thread Jaegeuk Kim
This patch enforces in-place-updates only when fdatasync is requested. If we adopt this in-place-updates for the fdatasync, we can skip to write the recovery information. Signed-off-by: Jaegeuk Kim --- fs/f2fs/f2fs.h| 1 + fs/f2fs/file.c| 7 +++ fs/f2fs/segment.h | 4 3 files ch

[f2fs-dev] [PATCH 09/11] f2fs: test before set/clear bits

2014-07-25 Thread Jaegeuk Kim
If the bit is already set, we don't need to reset it, and vice versa. Because we don't need to make the caches dirty for that. Signed-off-by: Jaegeuk Kim --- fs/f2fs/f2fs.h | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index 8f8685e..47

[f2fs-dev] [PATCH 08/11] f2fs: fix wrong condition for unlikely

2014-07-25 Thread Jaegeuk Kim
This patch fixes the wrongly used unlikely condition. Signed-off-by: Jaegeuk Kim --- fs/f2fs/checkpoint.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c index 42a16c1..36b0d47 100644 --- a/fs/f2fs/checkpoint.c +++ b/fs/f2fs/checkpo

[f2fs-dev] [PATCH 11/11] f2fs: avoid retrying wrong recovery routine when error was occurred

2014-07-25 Thread Jaegeuk Kim
This patch eliminates the propagation of recovery errors to the next mount. Signed-off-by: Jaegeuk Kim --- fs/f2fs/checkpoint.c | 3 ++- fs/f2fs/f2fs.h | 2 +- fs/f2fs/recovery.c | 20 +++- fs/f2fs/segment.c| 5 + 4 files changed, 23 insertions(+), 7 deletions(

[f2fs-dev] [PATCH 10/11] f2fs: avoid checkpoint when error was occurred

2014-07-25 Thread Jaegeuk Kim
No need to do checkpoint, whenever any errors were detected. Signed-off-by: Jaegeuk Kim --- fs/f2fs/recovery.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/fs/f2fs/recovery.c b/fs/f2fs/recovery.c index a112368..90d7e80 100644 --- a/fs/f2fs/recovery.c +++ b/fs/f2fs/reco