Re: [f2fs-dev] [PATCH 2/6] f2fs: support goingdown for fs shutdown

2015-01-08 Thread Jaegeuk Kim
On Thu, Jan 08, 2015 at 01:54:20PM -0600, Eric Sandeen wrote: On 1/8/15 12:10 PM, Jaegeuk Kim wrote: This patch add an ioctl to shutdown f2fs, which stops all the further block writes after this point. would it make sense to just re-use the xfs ioctl nr, if the semantics are the same

Re: [f2fs-dev] [PATCH 2/6] f2fs: support goingdown for fs shutdown

2015-01-08 Thread Jaegeuk Kim
On Fri, Jan 09, 2015 at 07:54:16AM +1100, Dave Chinner wrote: On Thu, Jan 08, 2015 at 02:33:17PM -0600, Eric Sandeen wrote: On 1/8/15 2:18 PM, Jaegeuk Kim wrote: On Thu, Jan 08, 2015 at 01:54:20PM -0600, Eric Sandeen wrote: On 1/8/15 12:10 PM, Jaegeuk Kim wrote: This patch add an ioctl

Re: [f2fs-dev] [PATCH 1/2] src/godown: support f2fs triggering specific ioctl

2015-01-08 Thread Jaegeuk Kim
On Thu, Jan 08, 2015 at 12:44:56PM -0600, Eric Sandeen wrote: On 1/8/15 12:31 PM, Jaegeuk Kim wrote: This patch triggers the F2FS-related ioctl for godown. hohum, wouldn't it be a whole lot easier to just re-use the XFS ioctl number in f2fs? Then you wouldn't have to duplicate all

Re: [f2fs-dev] [PATCH 4/4] f2fs: avoid wrong f2fs_bug_on when truncating inline_data

2015-03-18 Thread Jaegeuk Kim
Hi, On Wed, Mar 18, 2015 at 09:12:00AM +0800, Chao Yu wrote: Hi Jaegeuk, -Original Message- From: Jaegeuk Kim [mailto:jaeg...@kernel.org] Sent: Wednesday, March 18, 2015 12:58 AM To: linux-ker...@vger.kernel.org; linux-fsde...@vger.kernel.org; linux-f2fs-devel

Re: [f2fs-dev] [PATCH 2/4 v2] f2fs: set buffer_new when new blocks are allocated

2015-03-18 Thread Jaegeuk Kim
Hi Chao, Thanks for the review. Change log from v1: o add clear_buffer_new() in f2fs_map_bh This patch modifies to call set_buffer_new, if new blocks are allocated. Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- fs/f2fs/data.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions

Re: [f2fs-dev] [PATCH 1/2] generic/067: add a testcase to check some inline truncation behaviors

2015-03-18 Thread Jaegeuk Kim
Hi Dave, Thank you for the review. I'll resend this series with precise description and fixes as you pointed. Thanks, On Wed, Mar 18, 2015 at 02:46:53PM +1100, Dave Chinner wrote: On Tue, Mar 17, 2015 at 10:32:51AM -0700, Jaegeuk Kim wrote: This patch introduces a new testcase, generic/067

Re: [f2fs-dev] [PATCH v3] f2fs: add fast symlink support

2015-03-18 Thread Jaegeuk Kim
Hi, On Wed, Mar 18, 2015 at 04:58:52PM +0800, Wanpeng Li wrote: Hi Jaegeuk, On Tue, Mar 17, 2015 at 10:21:27AM -0700, Jaegeuk Kim wrote: - err = page_symlink(inode, symname, symlen); + + if (symlen MAX_FAST_SYMLINK_SIZE) { + /* slow symlink */ + inode-i_op

[f2fs-dev] [PATCH 1/2] f2fs: avoid punch_hole overhead when releasing volatile data

2015-03-18 Thread Jaegeuk Kim
This patch is to avoid some punch_hole overhead when releasing volatile data. If volatile data was not written yet, we just can make the first page as zero. Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- fs/f2fs/data.c | 2 ++ fs/f2fs/f2fs.h | 6 ++ fs/f2fs/file.c | 6 ++ fs

[f2fs-dev] [PATCH 2/2] f2fs: add some tracepoints to debug volatile and atomic writes

2015-03-18 Thread Jaegeuk Kim
Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- fs/f2fs/data.c | 2 ++ fs/f2fs/f2fs.h | 4 fs/f2fs/segment.c | 4 include/trace/events/f2fs.h | 27 ++- 4 files changed, 36 insertions(+), 1 deletion(-) diff --git a/fs/f2fs

Re: [f2fs-dev] [PATCH v3] f2fs: add fast symlink support

2015-03-17 Thread Jaegeuk Kim
Hi guys, Sorry for the delay due to travel. On Fri, Mar 13, 2015 at 02:33:39PM +0800, Wanpeng Li wrote: This patch introduces the improvement fast symlinks to allow storage of the target path within inode, thus symlinks with short target paths are more accessed quickly. It will fall back to

[f2fs-dev] [PATCH 1/2] generic/067: add a testcase to check some inline truncation behaviors

2015-03-17 Thread Jaegeuk Kim
This patch introduces a new testcase, generic/067, to test several truncation cases under the inline feature supported by filesystems. Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- tests/generic/067 | 114 ++ tests/generic/067.out | 41

[f2fs-dev] [PATCH 2/3] fsck.f2fs: show cp_state for fsck.f2fs

2015-03-21 Thread Jaegeuk Kim
This patch adds to show cp_state during fsck.f2fs. Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- fsck/f2fs.h | 1 - fsck/fsck.h | 1 + fsck/main.c | 21 + fsck/mount.c | 20 4 files changed, 26 insertions(+), 17 deletions(-) diff --git a/fsck

[f2fs-dev] [PATCH 3/3] fsck.f2fs: show total sectors consumed by filesystem

2015-03-21 Thread Jaegeuk Kim
This patch shows the information about the number of total sectors composing filesystem. Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- fsck/mount.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/fsck/mount.c b/fsck/mount.c index 879cadb..dfaa596 100644 --- a/fsck/mount.c +++ b

[f2fs-dev] [PATCH 1/3] mkfs.f2fs: show bytes for total_sectors

2015-03-21 Thread Jaegeuk Kim
This patch shows correct information about total_sectors. Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- lib/libf2fs.c | 4 ++-- mkfs/f2fs_format_main.c | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/libf2fs.c b/lib/libf2fs.c index 9e19e9b..7fd2550

Re: [f2fs-dev] [PATCH] f2fs: enable inline data by default

2015-03-20 Thread Jaegeuk Kim
Hi Wanpeng, Indeed. Please don't do this for backward compatibility. Thanks, On Thu, Mar 19, 2015 at 01:11:35PM +0800, Wanpeng Li wrote: Enable inline_data feature by default since it brings us better performance and space utilization and now has already stable. Signed-off-by: Wanpeng Li

Re: [f2fs-dev] [PATCH 1/1] f2fs: correctly check empty xattr key

2015-03-20 Thread Jaegeuk Kim
Hi Taesoo, On Fri, Mar 20, 2015 at 12:19:07AM -0400, Taesoo Kim wrote: When xattr name (key) is empty (), correctly return -EINVAL error. xattr_advise_set/get() seem to make the same mistake. The intention here is to disallow any xattr name, since this is used to get or set the i_advise value

Re: [f2fs-dev] [PATCH v3] f2fs: add fast symlink support

2015-03-20 Thread Jaegeuk Kim
- From: Wanpeng Li [mailto:wanpeng...@linux.intel.com] Sent: Thursday, March 19, 2015 7:02 AM To: Jaegeuk Kim Cc: Wanpeng Li; Changman Lee; Chao Yu; linux-f2fs-devel@lists.sourceforge.net; linux-fsde...@vger.kernel.org; linux-ker...@vger.kernel.org Subject: Re: [PATCH v3] f2fs: add fast

[f2fs-dev] [PATCH 4/4] f2fs: avoid wrong f2fs_bug_on when truncating inline_data

2015-03-17 Thread Jaegeuk Kim
on file #A. 4. write data at 8192 offset. -- f2fs_write_begin - -ENOSPC = f2fs_convert_inline_page - f2fs_write_failed - truncate_blocks - truncate_inline_inode BUG_ON, since i_size is 4096. Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- fs/f2fs/inline.c | 7

[f2fs-dev] [PATCH 1/4] f2fs: fix to cover sentry_lock for block allocation

2015-03-17 Thread Jaegeuk Kim
- mutex_lock(curseg-curseg_mutex); - s_ops-allocate_segment - new_curseg/change_curseg - reset_curseg - __set_sit_entry_type - __mark_sit_entry_dirty - set_bit(dirty_sentries_bitmap) - dirty_sentries++; Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- fs/f2fs

Re: [f2fs-dev] [PATCH] f2fs: fix to truncate inline data past EOF

2015-03-09 Thread Jaegeuk Kim
think of this? Thanks, Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- fs/f2fs/f2fs.h | 1 + fs/f2fs/file.c | 1 + fs/f2fs/inline.c | 16 +++- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index 511d6cd

Re: [f2fs-dev] [PATCH] f2fs: fix to truncate inline data past EOF

2015-03-05 Thread Jaegeuk Kim
Hi Chao, On Thu, Mar 05, 2015 at 05:41:32PM +0800, Chao Yu wrote: Previously if inode is with inline data, we will try to invalid partial inline data in page #0 when we truncate size of inode in truncate_partial_data_page(). And then we set page #0 to dirty, after this we can synchronize

Re: [f2fs-dev] [PATCH] f2fs: fix to truncate inline data past EOF

2015-03-08 Thread Jaegeuk Kim
Hi Chao, On Mon, Mar 09, 2015 at 10:24:35AM +0800, Chao Yu wrote: Hi Jaegeuk, -Original Message- From: Jaegeuk Kim [mailto:jaeg...@kernel.org] Sent: Friday, March 06, 2015 5:34 AM To: Chao Yu Cc: Changman Lee; linux-f2fs-devel@lists.sourceforge.net; linux-ker

Re: [f2fs-dev] [PATCH 2/3] f2fs: fix get stale meta pages when build free nids

2015-03-08 Thread Jaegeuk Kim
Hi Wanpeng, On Mon, Mar 09, 2015 at 11:00:54AM +0800, Wanpeng Li wrote: The blocks of nat pages to be scanned will be readahead when build free nids. The start blkno will be adjusted to 0 when the intended range over max_nids, then function ra_meta_pages readahead the right blkno, however,

Re: [f2fs-dev] [PATCH] F2FS support

2015-03-28 Thread Jaegeuk Kim
Hi Andrei, On Sat, Mar 28, 2015 at 10:31:55AM +0300, Andrei Borzenkov wrote: В Tue, 24 Mar 2015 01:19:00 -0700 Jaegeuk Kim jaeg...@kernel.org пишет: * Makefile.util.def: Add f2fs.c. * doc/grub.texi: Add f2fs description. * grub-core/Makefile.core.def: Add f2fs module. * grub-core

Re: [f2fs-dev] [PATCH 2/2] generic/066: add _require_metadata_replay

2015-02-27 Thread Jaegeuk Kim
Hi Lukas, On Fri, Feb 27, 2015 at 12:34:09PM +0100, Lukáš Czerner wrote: On Thu, 26 Feb 2015, Jaegeuk Kim wrote: Date: Thu, 26 Feb 2015 17:23:47 -0800 From: Jaegeuk Kim jaeg...@kernel.org To: Dave Chinner da...@fromorbit.com Cc: fste...@vger.kernel.org, linux-f2fs-devel

[f2fs-dev] [PATCH 1/2] f2fs: clear page's up-to-date if block was deallocated

2015-02-27 Thread Jaegeuk Kim
If page's on-disk block was deallocated, let's remove up-to-date flag to avoid further access with wrong contents. Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- fs/f2fs/data.c | 6 +- fs/f2fs/dir.c | 1 + fs/f2fs/node.c | 2 ++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git

[f2fs-dev] [PATCH 2/2] f2fs: check its block allocation to avoid producing wrong dirty pages

2015-02-27 Thread Jaegeuk Kim
If a page is cached but its block was deallocated, we don't need to make the page dirty again by gc and truncate_partial_data_page. In that case, it needs to check its block allocation all the time instead of giving up-to-date page. Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- fs/f2fs

[f2fs-dev] [PATCH 1/3] f2fs: avoid to trigger writepage during POR

2015-03-03 Thread Jaegeuk Kim
] bdi_writeback_workfn+0x148/0x980 [810a3782] process_one_work+0x1e2/0x840 [810a3f01] worker_thread+0x121/0x460 [810a9dc8] kthread+0xf8/0x110 [81863dbc] ret_from_fork+0x7c/0xb0 Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- fs/f2fs

[f2fs-dev] [PATCH 3/3] f2fs: report -ENOENT for unreached data indices

2015-03-03 Thread Jaegeuk Kim
If inode has inline_data, it should report -ENOENT when accessing out-of-bound region. This is used by f2fs_fiemap which treats -ENOENT with no error. Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- fs/f2fs/node.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/f2fs

[f2fs-dev] [PATCH 2/3] f2fs: clear append/update flags once fsync is done

2015-03-03 Thread Jaegeuk Kim
When fsync is done through checkpoint, previous f2fs missed to clear append and update flag. This patch fixes to clear them. This was originally catched by Changman Lee before. Signed-off-by: Changman Lee cm224@samsung.com Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- fs/f2fs/file.c | 2

[f2fs-dev] [PATCH] f2fs-tools: release 1.4.1

2015-03-04 Thread Jaegeuk Kim
This version includes mostly bug fixes. Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- VERSION | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index 4e11b43..0e58c09 100644 --- a/VERSION +++ b/VERSION @@ -1,2 +1,2 @@ -1.4.0 -2014-09-18 +1.4.1 +2015-03

[f2fs-dev] [PATCH] f2fs: relocate Kconfig from misc filesystems

2015-03-03 Thread Jaegeuk Kim
The f2fs has been shipped on many smartphone devices during a couple of years. So, it is worth to relocate Kconfig into main page from misc filesystems for developers to choose it more easily. Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- fs/Kconfig | 2 +- fs/f2fs/Kconfig | 2 +- 2

Re: [f2fs-dev] [PATCH] f2fs: fix recover orphan inodes

2015-02-25 Thread Jaegeuk Kim
Hi Wanpeng, On Wed, Feb 25, 2015 at 12:53:37PM +0800, Wanpeng Li wrote: recover_orphan_inodes is used to recover orphan inodes, the meta pages which readahead should be orphan_blkaddr - start_blk instead of orphan_blkaddr. This patch fix it. Signed-off-by: Wanpeng Li

[f2fs-dev] [PATCH] fsck.f2fs: remove corrupted data indices in direct node blocks

2015-02-25 Thread Jaegeuk Kim
Previously, only data blocks locating in its inode block could be fixed. This patch investigates direct node blocks to fix indices too. Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- fsck/fsck.c | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/fsck/fsck.c b

[f2fs-dev] [PATCH 2/2] f2fs: avoid wrong error during recovery

2015-02-25 Thread Jaegeuk Kim
From: Jaegeuk Kim jaeg...@motorola.com During the roll-forward recovery, -ENOENT for f2fs_iget can be skipped. So, this error value should not be propagated. Change-Id: I230ad2371e3fb4b9df42059c4a61f92c1f9838de Signed-off-by: Jaegeuk Kim jaeg...@motorola.com --- fs/f2fs/recovery.c | 4 +++- 1

[f2fs-dev] [PATCH 1/2] f2fs: remove obsolete code

2015-02-25 Thread Jaegeuk Kim
This patch removes obsolete code in which summary variable is not needed. Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- fs/f2fs/recovery.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/fs/f2fs/recovery.c b/fs/f2fs/recovery.c index 188a034..b2a92d4 100644 --- a/fs/f2fs/recovery.c +++ b

Re: [f2fs-dev] f2fs freezes the machine

2015-02-23 Thread Jaegeuk Kim
Hi Sebastian, Thank you for the report. On Fri, Feb 20, 2015 at 09:10:35PM +0100, Sebastian Andrzej Siewior wrote: Hi, I've been playing with f2fs on eMMC with v3.19. I simply cp/rm files on the partition for a while. The partition has a size of 510MiB and runs out of space now and then.

[f2fs-dev] [PATCH 2/2] generic/066: add _require_metadata_replay

2015-02-26 Thread Jaegeuk Kim
, file A's data written by #4 should be recovered. Otherwise, file A is recovered to #3. Cc: Filipe Manana fdman...@suse.com Cc: Eric Sandeen sand...@redhat.com Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- common/rc | 18 ++ tests/generic/066 | 2 +- 2 files changed, 19

[f2fs-dev] [PATCH 1/2] generic/065: f2fs serves 64KB size with zero data

2015-02-26 Thread Jaegeuk Kim
The f2fs provides 64KB size with 0 data after fsync was done to directory file. Cc: Filipe Manana fdman...@suse.com Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- tests/generic/065 | 4 1 file changed, 4 insertions(+) diff --git a/tests/generic/065 b/tests/generic/065 index b5a296d

Re: [f2fs-dev] fsck handling of inode incorrectly used as DIR and REG_FILE?

2015-03-26 Thread Jaegeuk Kim
Hi JP, I found that fsck.f2fs has some missing cases. And it seems that one of them is very similar with your issue. Could you test the patches that I submitted seconds ago? Thanks, On Thu, Mar 26, 2015 at 04:45:46PM -0700, JP Abgrall wrote: I have an image where an inode shows up once as an

[f2fs-dev] [PATCH 5/6] fsck.f2fs: skip block count fix when i_links is fixed

2015-03-26 Thread Jaegeuk Kim
If i_links is wrong, we should not check block count, since it doesn't count correctly which results in changing the block count to 1. This patch fixes that. Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- fsck/fsck.c | 25 + 1 file changed, 13 insertions(+), 12

[f2fs-dev] [PATCH 2/6] fsck.f2fs: remove inconsistent named directories

2015-03-26 Thread Jaegeuk Kim
Each inode has its filename inside inode block. For directory, the name should be matched all the time. In other cases, it shouldn't, since there is able to be linked to other file names. Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- fsck/fsck.c | 27 ++- fsck/fsck.h

[f2fs-dev] [PATCH 4/6] fsck.f2fs: fix inodes having wrong i_links

2015-03-26 Thread Jaegeuk Kim
This patch fixes inodes which have wrong i_links. Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- fsck/fsck.c | 41 + fsck/fsck.h | 1 + 2 files changed, 42 insertions(+) diff --git a/fsck/fsck.c b/fsck/fsck.c index 8db8f27..8cfea56 100644 --- a/fsck

[f2fs-dev] [PATCH 6/6] fsck.f2fs: preserve orphan blocks

2015-03-26 Thread Jaegeuk Kim
If fsck.f2fs found some orphan blocks, previously fsck.f2fs drops them and fixes checkpoint, resulting in false alarm on corruption. This patch preserves orphan blocks to avoid such the alarms. Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- fsck/fsck.c | 48

[f2fs-dev] [PATCH 1/6] fsck.f2fs: reduce redundant message

2015-03-26 Thread Jaegeuk Kim
This assert message is unnecessary to be shown, since caller shows the reason already. Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- fsck/f2fs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fsck/f2fs.h b/fsck/f2fs.h index 709fbf3..e59bb0b 100644 --- a/fsck/f2fs.h +++ b

[f2fs-dev] [PATCH 3/6] fsck.f2fs: check file types

2015-03-26 Thread Jaegeuk Kim
If the file type is mismatched, we should drop that inode. Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- fsck/fsck.c | 28 1 file changed, 28 insertions(+) diff --git a/fsck/fsck.c b/fsck/fsck.c index e803fa0..8db8f27 100644 --- a/fsck/fsck.c +++ b/fsck/fsck.c

[f2fs-dev] [PATCH 2/2] mkfs.f2fs: 512 UTF-16 characters for label

2015-03-24 Thread Jaegeuk Kim
We can use 512 UTF-16 characters for label. Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- mkfs/f2fs_format_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mkfs/f2fs_format_main.c b/mkfs/f2fs_format_main.c index 9a96798..43e5c03 100644 --- a/mkfs

[f2fs-dev] [PATCH] F2FS support

2015-03-24 Thread Jaegeuk Kim
* Makefile.util.def: Add f2fs.c. * doc/grub.texi: Add f2fs description. * grub-core/Makefile.core.def: Add f2fs module. * grub-core/fs/f2fs.c: New file. * tests/f2fs_test.in: New file. * tests/util/grub-fs-tester.in: Add f2fs requirements. Signed-off-by: Jaegeuk Kim jaeg...@kernel.org

Re: [f2fs-dev] [PATCH 2/2] f2fs: enable recover_xattr_data to avoid cp when fsync after operating xattr

2015-01-13 Thread Jaegeuk Kim
On Mon, Jan 12, 2015 at 05:40:28PM +0800, Chao Yu wrote: Hi Jaegeuk, -Original Message- From: Jaegeuk Kim [mailto:jaeg...@kernel.org] Sent: Sunday, January 11, 2015 1:32 PM To: Chao Yu Cc: 'Changman Lee'; linux-f2fs-devel@lists.sourceforge.net; linux-ker...@vger.kernel.org

Re: [f2fs-dev] [PATCH 4/5] f2fs: should fail mount when trying to recover data on read-only dev

2015-01-29 Thread Jaegeuk Kim
Hi Chao, This is another patch to fix that. From d241924043778d0fe01e9020d5771cc42cf246e6 Mon Sep 17 00:00:00 2001 From: Jaegeuk Kim jaeg...@kernel.org Date: Thu, 29 Jan 2015 11:45:33 -0800 Subject: [PATCH] f2fs: split UMOUNT and FASTBOOT flags This patch adds FASTBOOT flag into checkpoint

Re: [f2fs-dev] [PATCH 2/3 v2] dump.f2fs: show checkpoint flag

2015-01-29 Thread Jaegeuk Kim
Change log from v1: o add FASTBOOT_FLAG From b57708aecf07a7caa8fcce02f65735a11e987154 Mon Sep 17 00:00:00 2001 From: Jaegeuk Kim jaeg...@kernel.org Date: Wed, 14 Jan 2015 16:18:15 -0800 Subject: [PATCH] dump.f2fs: show checkpoint flag This patch is to show the checkpoint flag. With this flag

Re: [f2fs-dev] [PATCH 5/5] f2fs: introduce a batched trim

2015-01-29 Thread Jaegeuk Kim
Hi Chao, On Thu, Jan 29, 2015 at 08:38:30PM +0800, Chao Yu wrote: Hi Jaegeuk, -Original Message- From: linux-fsdevel-ow...@vger.kernel.org [mailto:linux-fsdevel-ow...@vger.kernel.org] On Behalf Of Jaegeuk Kim Sent: Wednesday, January 28, 2015 7:32 AM To: linux-ker

Re: [f2fs-dev] f2fs: avoid abnormal behavior on broken symlink

2015-04-22 Thread Jaegeuk Kim
Hi Chao, On Wed, Apr 22, 2015 at 05:31:30PM +0800, Chao Yu wrote: Hi Jaegeuk, -Original Message- From: Jaegeuk Kim [mailto:jaeg...@kernel.org] Sent: Wednesday, April 22, 2015 3:49 PM To: Chao Yu Cc: 'Dan Carpenter'; linux-f2fs-devel@lists.sourceforge.net Subject: Re: [f2fs

Re: [f2fs-dev] f2fs: avoid abnormal behavior on broken symlink

2015-04-22 Thread Jaegeuk Kim
On Wed, Apr 22, 2015 at 01:27:22PM +0300, Dan Carpenter wrote: On Wed, Apr 22, 2015 at 02:28:22PM +0800, Chao Yu wrote: fs/f2fs/namei.c 299 static void *f2fs_follow_link(struct dentry *dentry, struct nameidata *nd) 300 { 301 struct page *page; 302

[f2fs-dev] [PATCH] f2fs: fix wrong error hanlder in f2fs_follow_link

2015-04-22 Thread Jaegeuk Kim
The page_follow_link_light returns NULL and its error pointer was remained in nd-path. Reported-by: Dan Carpenter dan.carpen...@oracle.com Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- fs/f2fs/namei.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/fs/f2fs/namei.c

[f2fs-dev] [PATCH] f2fs: export more enums for tracepoint

2015-04-22 Thread Jaegeuk Kim
This patch exports newly added enums to userspace. Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- include/trace/events/f2fs.h | 5 + 1 file changed, 5 insertions(+) diff --git a/include/trace/events/f2fs.h b/include/trace/events/f2fs.h index f18c83a..04856a2 100644 --- a/include/trace

Re: [f2fs-dev] f2fs: avoid abnormal behavior on broken symlink

2015-04-22 Thread Jaegeuk Kim
Hi Chao, On Wed, Apr 22, 2015 at 02:28:22PM +0800, Chao Yu wrote: Hi all, -Original Message- From: Jaegeuk Kim [mailto:jaeg...@kernel.org] Sent: Wednesday, April 22, 2015 2:21 AM To: Dan Carpenter Cc: linux-f2fs-devel@lists.sourceforge.net Subject: Re: [f2fs-dev] f2fs

Re: [f2fs-dev] [PATCH 1/2] f2fs: support FALLOC_FL_COLLAPSE_RANGE

2015-04-29 Thread Jaegeuk Kim
Hi Chao, On Sat, Apr 18, 2015 at 06:00:36PM +0800, Chao Yu wrote: Now, FALLOC_FL_COLLAPSE_RANGE flag in -fallocate is supported in ext4/xfs. In commit, the semantics of this flag is descripted as following: 1) It collapses the range lying between offset and length by removing any data

Re: [f2fs-dev] [PATCH v2 1/3] f2fs: introduce replace_block() for reuse

2015-04-30 Thread Jaegeuk Kim
Hi Chao, On Thu, Apr 30, 2015 at 06:11:35PM +0800, Chao Yu wrote: Introduce a generic function replace_block base on recover_data_page, and export it. So wit it we can operate file's meta data which is in CP/SSA area when we invoke fallocate with FALLOC_FL_COLLAPSE_RANGE flag.

[f2fs-dev] [PATCH 05/19] f2fs: add f2fs_map_blocks

2015-05-01 Thread Jaegeuk Kim
This patch introduces f2fs_map_blocks structure likewise ext4_map_blocks. Now, f2fs uses f2fs_map_blocks when handling get_block. Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- fs/f2fs/data.c | 72 ++--- fs/f2fs/f2fs.h | 16

[f2fs-dev] [PATCH 02/19] f2fs: add missing version info in superblock

2015-05-01 Thread Jaegeuk Kim
The mkfs.f2fs remains kernel version in superblock, but f2fs module has not added that so far. Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- include/linux/f2fs_fs.h | 5 + 1 file changed, 5 insertions(+) diff --git a/include/linux/f2fs_fs.h b/include/linux/f2fs_fs.h index 591f8c3

[f2fs-dev] [PATCH 01/19] f2fs: fix not to check IS_ERR for null pointer

2015-05-01 Thread Jaegeuk Kim
The acl can have null, error pointer, or valid pointer. So, we should check its pointer existence too. Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- fs/f2fs/acl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/f2fs/acl.c b/fs/f2fs/acl.c index c8f25f7..851ff98 100644

[f2fs-dev] [PATCH 08/19] f2fs: clean up f2fs_lookup

2015-05-01 Thread Jaegeuk Kim
This patch cleans up to avoid deep indentation. Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- fs/f2fs/namei.c | 31 --- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/fs/f2fs/namei.c b/fs/f2fs/namei.c index 658e807..a311c3c 100644 --- a/fs/f2fs

[f2fs-dev] [PATCH 09/19] f2fs: add f2fs_may_inline_{data, dentry}

2015-05-01 Thread Jaegeuk Kim
This patch adds f2fs_may_inline_data and f2fs_may_inline_dentry. Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- fs/f2fs/f2fs.h | 3 ++- fs/f2fs/file.c | 2 +- fs/f2fs/inline.c | 13 - fs/f2fs/namei.c | 4 ++-- 4 files changed, 17 insertions(+), 5 deletions(-) diff --git

[f2fs-dev] [PATCH 10/19] f2fs: add sbi and page pointer in f2fs_io_info

2015-05-01 Thread Jaegeuk Kim
This patch adds f2fs_sb_info and page pointers in f2fs_io_info structure. With this change, we can reduce a lot of parameters for IO functions. Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- fs/f2fs/checkpoint.c | 9 +++-- fs/f2fs/data.c | 47

[f2fs-dev] [PATCH 18/19] f2fs: introduce discard_map for f2fs_trim_fs

2015-05-01 Thread Jaegeuk Kim
This patch adds a bitmap for discard issues from f2fs_trim_fs. There-in rule is to issue discard commands only for invalidated blocks after mount. Once mount is done, f2fs_trim_fs trims out whole invalid area. After ehn, it will not issue and discrads redundantly. Signed-off-by: Jaegeuk Kim jaeg

[f2fs-dev] [PATCH 19/19] f2fs: issue discard with finally produced len and minlen

2015-05-01 Thread Jaegeuk Kim
This patch determines to issue discard commands by comparing given minlen and the length of produced final candidates. Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- fs/f2fs/checkpoint.c | 2 +- fs/f2fs/f2fs.h | 2 +- fs/f2fs/segment.c| 10 ++ 3 files changed, 8 insertions

[f2fs-dev] [PATCH 15/19] f2fs: fix counting the number of inline_data inodes

2015-05-01 Thread Jaegeuk Kim
This patch fixes to count the missing symlink case. Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- fs/f2fs/namei.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/f2fs/namei.c b/fs/f2fs/namei.c index c0ba8e3..90a9640 100644 --- a/fs/f2fs/namei.c +++ b/fs/f2fs

[f2fs-dev] [PATCH 11/19] f2fs: move get_page for gc victims

2015-05-01 Thread Jaegeuk Kim
This patch moves getting victim page into move_data_page. Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- fs/f2fs/gc.c | 28 +++- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c index 72667a5..1bd11f0 100644 --- a/fs/f2fs/gc.c

[f2fs-dev] [PATCH 06/19] f2fs: introduce f2fs_commit_super

2015-05-01 Thread Jaegeuk Kim
This patch introduces f2fs_commit_super to write updated superblock. Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- fs/f2fs/f2fs.h | 1 + fs/f2fs/super.c | 24 2 files changed, 25 insertions(+) diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index c98454d..7ff3ac7

[f2fs-dev] [PATCH 16/19] f2fs: split find_data_page according to specific purposes

2015-05-01 Thread Jaegeuk Kim
to truncate Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- fs/f2fs/data.c | 127 ++--- fs/f2fs/dir.c | 2 +- fs/f2fs/f2fs.h | 3 +- fs/f2fs/file.c | 26 +++- fs/f2fs/gc.c | 5 +-- 5 files changed, 68 insertions(+), 95 deletions

[f2fs-dev] [PATCH 14/19] f2fs: add need_dentry_mark

2015-05-01 Thread Jaegeuk Kim
This patch introduces need_dentry_mark() to clean up and avoid redundant node locks. Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- fs/f2fs/f2fs.h | 1 + fs/f2fs/node.c | 35 +-- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/fs/f2fs/f2fs.h b

[f2fs-dev] [PATCH 13/19] f2fs: fix race on allocating and deallocating a dentry block

2015-05-01 Thread Jaegeuk Kim
is NULL. The reason for this was due to the wrong lock order. In this case, we should do f2fs_reserve_block() after locking its dentry block. Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- fs/f2fs/data.c | 27 --- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git

[f2fs-dev] [GIT PULL] f2fs fix for v4.1-rc3

2015-05-07 Thread Jaegeuk Kim
Jaegeuk Kim (2): Revert f2fs: enhance multi-threads performance f2fs: fix wrong error hanlder in f2fs_follow_link fs/f2fs/data.c | 7 +++ fs/f2fs/f2fs.h | 1 + fs/f2fs/namei.c | 8 +++- fs/f2fs/super.c | 1 + 4 files changed, 12

Re: [f2fs-dev] [PATCH 16/18] f2fs crypto: add symlink encryption

2015-05-10 Thread Jaegeuk Kim
On Sat, May 09, 2015 at 05:25:54AM +0100, Al Viro wrote: On Fri, May 08, 2015 at 09:20:51PM -0700, Jaegeuk Kim wrote: This patch implements encryption support for symlink. The codes refered the ext4 symlink path. ext4 symlink patches are seriously misguided - don't mix encrypted

Re: [f2fs-dev] [PATCH 14/18] f2fs crypto: add filename encryption for f2fs_lookup

2015-05-10 Thread Jaegeuk Kim
for ‘name’) I think it's related to this patch. If there is anything wrong in my configuration, please let me know. Thanks, Hu On 2015/5/9 12:20, Jaegeuk Kim wrote: This patch implements filename encryption support for f2fs_lookup. Note that, f2fs_find_entry should be outside

[f2fs-dev] [PATCH] f2fs crypto: use inode number for xts_tweak

2015-05-11 Thread Jaegeuk Kim
Previoulsy when making xts_tweak, page-index was used. But, when it supports fcollapse, the block address was moved, so that we can lose the original page-index, which causes decrytion failure. In order to avoid that, let's use the inode-i_ino for xfs_tweak hint. Signed-off-by: Jaegeuk Kim jaeg

[f2fs-dev] [PATCH 2/5] fsck.f2fs: show superblock features and encryption info

2015-05-08 Thread Jaegeuk Kim
Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- fsck/mount.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/fsck/mount.c b/fsck/mount.c index 1c55f40..11ab197 100644 --- a/fsck/mount.c +++ b/fsck/mount.c @@ -224,6 +224,23 @@ void print_cp_state(u32 flag) MSG(0

[f2fs-dev] [PATCH 3/5] dump.f2fs: show i_advise field in inode

2015-05-08 Thread Jaegeuk Kim
Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- fsck/mount.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fsck/mount.c b/fsck/mount.c index 11ab197..13b73e9 100644 --- a/fsck/mount.c +++ b/fsck/mount.c @@ -26,6 +26,7 @@ void print_inode_info(struct f2fs_inode *inode, int name

[f2fs-dev] [PATCH 1/5] mkfs.f2fs: set encryption feature

2015-05-08 Thread Jaegeuk Kim
This patch add to support encryption feature. Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- include/f2fs_fs.h | 7 +++ mkfs/f2fs_format.c | 2 ++ mkfs/f2fs_format_main.c | 16 +++- 3 files changed, 24 insertions(+), 1 deletion(-) diff --git a/include/f2fs_fs.h b

[f2fs-dev] [PATCH 4/5] fsck.f2fs: avoid build warning

2015-05-08 Thread Jaegeuk Kim
Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- fsck/mount.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fsck/mount.c b/fsck/mount.c index 13b73e9..649940d 100644 --- a/fsck/mount.c +++ b/fsck/mount.c @@ -462,7 +462,7 @@ int get_valid_checkpoint(struct f2fs_sb_info *sbi

[f2fs-dev] [PATCH 07/18] f2fs crypto: add f2fs encryption facilities

2015-05-08 Thread Jaegeuk Kim
Signed-off-by: Theodore Ts'o ty...@mit.edu Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- fs/f2fs/Makefile | 2 +- fs/f2fs/crypto.c | 561 +++ fs/f2fs/f2fs.h | 25 +++ fs/f2fs/super.c | 19 +- 4 files changed, 603 insertions(+), 4

[f2fs-dev] [PATCH 13/18] f2fs crypto: add filename encryption for f2fs_readdir

2015-05-08 Thread Jaegeuk Kim
This patch implements filename encryption support for f2fs_readdir. Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- fs/f2fs/dir.c| 57 fs/f2fs/f2fs.h | 12 fs/f2fs/inline.c | 13 +++-- 3 files changed, 60

[f2fs-dev] [PATCH 11/18] f2fs crypto: add encryption support in read/write paths

2015-05-08 Thread Jaegeuk Kim
This patch adds encryption support in read and write paths. Note that, in f2fs, we need to consider cleaning operation. In cleaning procedure, we must avoid encrypting and decrypting written blocks. So, this patch implements move_encrypted_block(). Signed-off-by: Jaegeuk Kim jaeg...@kernel.org

[f2fs-dev] [PATCH 16/18] f2fs crypto: add symlink encryption

2015-05-08 Thread Jaegeuk Kim
This patch implements encryption support for symlink. The codes refered the ext4 symlink path. Signed-off-by: Uday Savagaonkar savag...@google.com Signed-off-by: Theodore Ts'o ty...@mit.edu Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- fs/f2fs/f2fs_crypto.h | 2 - fs/f2fs/namei.c

[f2fs-dev] [PATCH 09/18] f2fs crypto: filename encryption facilities

2015-05-08 Thread Jaegeuk Kim
-by: Theodore Ts'o ty...@mit.edu Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- fs/f2fs/Makefile | 3 +- fs/f2fs/crypto_fname.c | 490 + fs/f2fs/f2fs.h | 52 ++ 3 files changed, 544 insertions(+), 1 deletion(-) create mode 100644

[f2fs-dev] [PATCH 18/18] f2fs crypto: remove checking key context during lookup

2015-05-08 Thread Jaegeuk Kim
No matter what the key is valid or not, readdir shows the dir entries correctly. So, lookup should not failed. But, we expect further accesses should be denied from open, rename, link, and so on. Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- fs/f2fs/namei.c | 10 -- 1 file changed

[f2fs-dev] [PATCH 12/18] f2fs crypto: add filename encryption for f2fs_add_link

2015-05-08 Thread Jaegeuk Kim
This patch adds filename encryption support for f2fs_add_link. Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- fs/f2fs/dir.c | 39 +++ 1 file changed, 27 insertions(+), 12 deletions(-) diff --git a/fs/f2fs/dir.c b/fs/f2fs/dir.c index f7293a2..750a688 100644

[f2fs-dev] [PATCH 17/18] f2fs crypto: fix missing key when reading a page

2015-05-08 Thread Jaegeuk Kim
1. mount $mnt 2. cp data $mnt/ 3. umount $mnt 4. log out 5. log in 6. cat $mnt/data - panic, due to no i_crypt_info. Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- fs/f2fs/crypto.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fs/f2fs/crypto.c b/fs/f2fs/crypto.c

[f2fs-dev] [PATCH 02/18] f2fs: report unwritten area in f2fs_fiemap

2015-05-08 Thread Jaegeuk Kim
This patch slightly changes f2fs_fiemap function to report unwritten area. Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- fs/f2fs/data.c | 117 +++-- fs/f2fs/f2fs.h | 4 +- 2 files changed, 117 insertions(+), 4 deletions(-) diff --git

[f2fs-dev] [PATCH 06/18] f2fs crypto: add encryption policy and password salt support

2015-05-08 Thread Jaegeuk Kim
crypto support. For f2fs, xattr operations and on-disk flags for superblock and inode were changed. Signed-off-by: Michael Halcrow mhalc...@google.com Signed-off-by: Theodore Ts'o ty...@mit.edu Signed-off-by: Ildar Muslukhov muslukh...@gmail.com Signed-off-by: Jaegeuk Kim jaeg...@kernel.org

[f2fs-dev] [PATCH 03/18] f2fs crypto: declare some definitions for f2fs encryption feature

2015-05-08 Thread Jaegeuk Kim
This definitions will be used by inode and superblock for encyption. Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- fs/f2fs/f2fs.h | 54 ++ fs/f2fs/f2fs_crypto.h | 149 include/linux/f2fs_fs.h | 4 +- 3 files

[f2fs-dev] [PATCH 14/18] f2fs crypto: add filename encryption for f2fs_lookup

2015-05-08 Thread Jaegeuk Kim
This patch implements filename encryption support for f2fs_lookup. Note that, f2fs_find_entry should be outside of f2fs_(un)lock_op(). Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- fs/f2fs/dir.c| 79 fs/f2fs/f2fs.h | 9

Re: [f2fs-dev] f2fs crypto: filename encryption facilities

2015-05-12 Thread Jaegeuk Kim
Hi Dan, On Tue, May 12, 2015 at 02:38:57PM +0300, Dan Carpenter wrote: Hello Jaegeuk Kim, The patch c54316510133: f2fs crypto: filename encryption facilities from Apr 26, 2015, leads to the following static checker warning: fs/f2fs/crypto_fname.c:189 f2fs_fname_decrypt() warn

Re: [f2fs-dev] f2fs crypto: add symlink encryption

2015-05-12 Thread Jaegeuk Kim
Hi Dan, Thank you for pointing this out. :) On Tue, May 12, 2015 at 03:09:17PM +0300, Dan Carpenter wrote: Hello Jaegeuk Kim, The patch 24d584edddca: f2fs crypto: add symlink encryption from Apr 29, 2015, leads to the following static checker warning: fs/f2fs/namei.c:487

Re: [f2fs-dev] f2fs crypto: add symlink encryption

2015-05-12 Thread Jaegeuk Kim
On Tue, May 12, 2015 at 09:36:21PM +0300, Dan Carpenter wrote: On Tue, May 12, 2015 at 11:17:16AM -0700, Jaegeuk Kim wrote: For example, shouldn't we release f2fs_lock_op(sbi) when f2fs_add_link() fails earlier? The pair of f2fs_lock_op and f2fs_unlock_op here is used to keep FS

[f2fs-dev] [PATCH 2/6] f2fs crypto: not support fcollapse for encrypted inode

2015-05-12 Thread Jaegeuk Kim
The fcollapse replaces block addresses without IOs, but this violates encryption rule in which each block is encrypted with its block offset. Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- fs/f2fs/file.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c

[f2fs-dev] [PATCH 5/6] f2fs crypto: shrink size of the f2fs_crypto_ctx structure

2015-05-12 Thread Jaegeuk Kim
memory use by using a union. Signed-off-by: Theodore Ts'o ty...@mit.edu Signed-off-by: Jaegeuk Kim jaeg...@kernel.org --- fs/f2fs/crypto.c | 40 ++-- fs/f2fs/f2fs_crypto.h | 21 ++--- fs/f2fs/segment.c | 2 +- 3 files changed, 33 insertions

[f2fs-dev] [PATCH 4/6] f2fs crypto: get rid of ci_mode from struct f2fs_crypt_info

2015-05-12 Thread Jaegeuk Kim
This patch integrates the below patch into f2fs. ext4 crypto: get rid of ci_mode from struct ext4_crypt_info The ci_mode field was superfluous, and getting rid of it gets rid of an unused hole in the structure. Signed-off-by: Theodore Ts'o ty...@mit.edu Signed-off-by: Jaegeuk Kim jaeg

[f2fs-dev] [PATCH 6/6] f2fs crypto: require CONFIG_CRYPTO_CTR if f2fs encryption is enabled

2015-05-12 Thread Jaegeuk Kim
-by: Jaegeuk Kim jaeg...@kernel.org --- fs/f2fs/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/f2fs/Kconfig b/fs/f2fs/Kconfig index 28f21fe..c629762 100644 --- a/fs/f2fs/Kconfig +++ b/fs/f2fs/Kconfig @@ -81,6 +81,7 @@ config F2FS_FS_ENCRYPTION select CRYPTO_ECB select

<    1   2   3   4   5   6   7   8   9   10   >