Re: [PATCH v2 RESEND] Revert "f2fs: handle dirty segments inside refresh_sit_entry"

2017-10-30 Thread Jaegeuk Kim
On 10/30, Chao Yu wrote: > On 2017/10/30 9:33, Yunlong Song wrote: > > This reverts commit 5e443818fa0b2a2845561ee25bec181424fb2889 > > > > The commit should be reverted because call sequence of below two parts > > of code must be kept: > > a. update sit information, it needs to be updated before

[PATCH 1/2] f2fs: add quota_ino feature infra

2017-10-30 Thread Jaegeuk Kim
This patch adds quota_ino feature infra to be used for quota files. Signed-off-by: Jaegeuk Kim --- fs/f2fs/f2fs.h | 6 ++ fs/f2fs/sysfs.c | 7 +++ include/linux/f2fs_fs.h | 6 +- 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/fs/f2fs/f2fs.h b/fs/f2fs

[PATCH 2/2] f2fs: support quota sys files

2017-10-30 Thread Jaegeuk Kim
This patch supports hidden quota files in the system, which will be used for Android. It requires up-to-date f2fs-tools later than v1.9.0. Signed-off-by: Jaegeuk Kim --- fs/f2fs/checkpoint.c | 9 +++- fs/f2fs/f2fs.h | 9 +++- fs/f2fs/recovery.c | 8 ++- fs/f2fs/super.c | 145

[PATCH 3/3] f2fs: introduce a periodic checkpoint flow

2015-10-05 Thread Jaegeuk Kim
This patch introduces a periodic checkpoint feature. Note that, this is not enforcing to conduct checkpoints very strictly in terms of trigger timing, instead just hope to help user experiences. The default value is 60 seconds. Signed-off-by: Jaegeuk Kim --- Documentation/ABI/testing/sysfs-fs

[PATCH 1/3] f2fs: introduce background_gc=sync mount option

2015-10-05 Thread Jaegeuk Kim
This patch introduce background_gc=sync enabling synchronous cleaning in background. Signed-off-by: Jaegeuk Kim --- Documentation/filesystems/f2fs.txt | 3 ++- fs/f2fs/f2fs.h | 1 + fs/f2fs/gc.c | 2 +- fs/f2fs/segment.h | 4

[PATCH 2/3] f2fs: add a tracepoint for background gc

2015-10-05 Thread Jaegeuk Kim
This patch introduces a tracepoint to monitor background gc behaviors. Signed-off-by: Jaegeuk Kim --- fs/f2fs/gc.c| 3 +++ include/trace/events/f2fs.h | 28 2 files changed, 31 insertions(+) diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c index e627c19

Re: [f2fs-dev] [PATCH] f2fs: merge meta writes as many possible

2015-10-06 Thread Jaegeuk Kim
Hi Chao, On Tue, Oct 06, 2015 at 10:54:12PM +0800, Chao Yu wrote: > Hi Jaegeuk, > > > -Original Message- > > From: Jaegeuk Kim [mailto:jaeg...@kernel.org] > > Sent: Saturday, October 03, 2015 12:48 AM > > To: linux-kernel@vger.kernel.org; linux-fsde...@vger

Re: [f2fs-dev] [PATCH 3/3] f2fs: introduce a periodic checkpoint flow

2015-10-06 Thread Jaegeuk Kim
On Tue, Oct 06, 2015 at 10:54:47PM +0800, Chao Yu wrote: > Hi Jaegeuk, > > > -Original Message- > > From: Jaegeuk Kim [mailto:jaeg...@kernel.org] > > Sent: Tuesday, October 06, 2015 6:44 AM > > To: linux-kernel@vger.kernel.org; linux-fsde...@vger

Re: [f2fs-dev] [PATCH 1/2] f2fs: add F2FS_GOING_DOWN_METAFLUSH to test power-failure

2015-10-12 Thread Jaegeuk Kim
On Mon, Oct 12, 2015 at 05:01:29PM +0800, Chao Yu wrote: > > -Original Message- > > From: Jaegeuk Kim [mailto:jaeg...@kernel.org] > > Sent: Friday, October 09, 2015 8:29 AM > > To: linux-kernel@vger.kernel.org; linux-fsde...@vger.kernel.org; > > linux-f2

Re: [PATCH] f2fs crypto: fix racing of accessing encrypted page among different competitors

2015-10-12 Thread Jaegeuk Kim
On Thu, Oct 08, 2015 at 08:50:39PM +0800, Chao Yu wrote: > >From 0211c6ed82440891b3369851d079f6c69b432b6c Mon Sep 17 00:00:00 2001 > From: Chao Yu > Date: Thu, 8 Oct 2015 13:27:34 +0800 > Subject: [PATCH] f2fs crypto: fix racing of accessing encrypted page among > different competitors > > Since

Re: [PATCH] f2fs crypto: fix racing of accessing encrypted page among different competitors

2015-10-13 Thread Jaegeuk Kim
On Tue, Oct 13, 2015 at 02:01:10PM +0800, Chao Yu wrote: > > -Original Message- > > From: Jaegeuk Kim [mailto:jaeg...@kernel.org] > > Sent: Tuesday, October 13, 2015 5:00 AM > > To: Chao Yu > > Cc: linux-f2fs-de...@lists.sourceforge.net; linux-kernel@vger.kern

Re: [f2fs-dev] [PATCH 2/3] f2fs: add a tracepoint for background gc

2015-10-13 Thread Jaegeuk Kim
On Sat, Oct 10, 2015 at 03:08:26PM +0800, He YunLei wrote: > On 2015/10/6 6:43, Jaegeuk Kim wrote: > > This patch introduces a tracepoint to monitor background gc behaviors. > > > > Signed-off-by: Jaegeuk Kim > > --- > > fs/f2fs/gc.c| 3 +++

[PATCH] f2fs: convert inline_data for f2fs_fiemap

2015-10-16 Thread Jaegeuk Kim
For fiemap, we should convert inline_data for user. Signed-off-by: Jaegeuk Kim --- fs/f2fs/data.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index 77dfc9e..174a299 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c @@ -771,6 +771,13 @@ int

[PATCH] f2fs: refactor __find_rev_next_{zero}_bit

2015-10-21 Thread Jaegeuk Kim
This patch refactors __find_rev_next_{zero}_bit which was disabled previously due to bugs. Signed-off-by: Jaegeuk Kim --- fs/f2fs/segment.c | 106 +- 1 file changed, 49 insertions(+), 57 deletions(-) diff --git a/fs/f2fs/segment.c b/fs/f2fs

Re: [PATCH] f2fs: refactor __find_rev_next_{zero}_bit

2015-10-21 Thread Jaegeuk Kim
On Wed, Oct 21, 2015 at 02:16:43PM -0700, Jaegeuk Kim wrote: > This patch refactors __find_rev_next_{zero}_bit which was disabled previously > due to bugs. > > Signed-off-by: Jaegeuk Kim > --- > fs/f2fs/segment.c | 106 > +--

[PATCH 2/2] f2fs: don't need to submit bio on error case

2015-10-21 Thread Jaegeuk Kim
If commit_atomic_write is failed, we don't need to submit any bio. Signed-off-by: Jaegeuk Kim --- fs/f2fs/segment.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index 7835e41..7efd96ad 100644 --- a/fs/f2fs/segment.c +++ b/fs

[PATCH 1/2] f2fs: fix leakage of inmemory atomic pages

2015-10-21 Thread Jaegeuk Kim
If we got failure during commit_atomic_write, abort_volatile_write will be called, but will not drop the inmemory pages due to no FI_ATOMIC_FILE. Actually, there is no reason to check the flag in abort_volatile_write. Signed-off-by: Jaegeuk Kim --- fs/f2fs/file.c | 10 +++--- 1 file changed

Re: next-20151021 - compile error in fs/f2fs/checkpoint.c

2015-10-21 Thread Jaegeuk Kim
On Thu, Oct 22, 2015 at 09:47:22AM +0800, Chao Yu wrote: > Hello, > > > -Original Message- > > From: Valdis Kletnieks [mailto:valdis.kletni...@vt.edu] > > Sent: Thursday, October 22, 2015 2:06 AM > > To: Chao Yu; Jaegeuk Kim; Changman Lee > > Cc: li

Re: [f2fs-dev] [PATCH] f2fs: refactor __find_rev_next_{zero}_bit

2015-10-22 Thread Jaegeuk Kim
Hi Chao, On Thu, Oct 22, 2015 at 07:24:01PM +0800, Chao Yu wrote: > Hi Jaegeuk, > > > -Original Message- > > From: Jaegeuk Kim [mailto:jaeg...@kernel.org] > > Sent: Thursday, October 22, 2015 6:30 AM > > To: linux-kernel@vger.kernel.org; linux-fsde...@vger

Re: [PATCH] f2fs: support file defragment

2015-10-22 Thread Jaegeuk Kim
Hi, On Thu, Oct 22, 2015 at 07:59:14PM +0800, Chao Yu wrote: > This patch introduces a new ioctl F2FS_IOC_DEFRAGMENT to support file > defragment in a specified range of regular file. > > This ioctl can be used in very limited workload: if user expects high > sequential read performance in random

[GIT PULL] f2fs updates for v4.3

2015-09-02 Thread Jaegeuk Kim
dd new interfaces for extent tree f2fs: change the timing of f2fs_wait_on_page_writeback f2fs: use extent cache to optimize f2fs_reserve_block f2fs: fix to update cached_en of extent tree properly Jaegeuk Kim (30): f2fs: avoid freed stat information f2fs: avoid to use fai

[PATCH 1/2] f2fs: flush dirty data for bmap

2015-10-19 Thread Jaegeuk Kim
Users expect bmap will give allocated block addresses. Let's play likewise ext4. Signed-off-by: Jaegeuk Kim --- fs/f2fs/data.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index 77dfc9e..b052e7c 100644 --- a/fs/f2fs/d

[PATCH 2/2] f2fs: support fiemap for inline_data

2015-10-19 Thread Jaegeuk Kim
There is a FIEMAP_EXTENT_INLINE_DATA, pointed out by Marc. Signed-off-by: Jaegeuk Kim --- fs/f2fs/data.c | 6 ++ fs/f2fs/f2fs.h | 2 ++ fs/f2fs/inline.c | 36 3 files changed, 44 insertions(+) diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index

Re: [PATCH] f2fs: support file defragment

2015-10-26 Thread Jaegeuk Kim
Hi, On Fri, Oct 23, 2015 at 02:57:03PM +0800, Chao Yu wrote: > Hi Jaegeuk, > > > -Original Message- > > From: Jaegeuk Kim [mailto:jaeg...@kernel.org] > > Sent: Friday, October 23, 2015 2:12 AM > > To: Chao Yu > > Cc: linux-f2fs-de...@lists.sourcefor

[PATCH] f2fs: merge meta writes as many possible

2015-10-02 Thread Jaegeuk Kim
f2fs_submit_write_bio: dev = (8,18), WRITE_SYNC(MP), META, sector = 107240, size = 270336 f2fs_submit_write_bio: dev = (8,18), WRITE_SYNC(MP), META, sector = 107768, size = 180224 ... Signed-off-by: Jaegeuk Kim --- fs/f2fs/checkpoint.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion

Re: [PATCH 2/2] f2fs: tune discard speed with storage usage rate

2018-08-13 Thread Jaegeuk Kim
On 08/10, Chao Yu wrote: > Previously, discard speed was fixed mostly, and in high usage rate > device, we will speed up issuing discard, but it doesn't make sense > that in a non-full filesystem, we still issue discard with slow speed. Could you please elaborate the problem in more detail? The sp

[PATCH] f2fs: avoid f2fs_bug_on() in cp_error case

2018-08-01 Thread Jaegeuk Kim
There is a subtle race condition to invoke f2fs_bug_on() in shutdown tests. I've confirmed that the last checkpoint is preserved in consistent state, so it'd be fine to just return error at this moment. Signed-off-by: Jaegeuk Kim --- fs/f2fs/node.c | 4 1 file changed, 4

Re: [PATCH] f2fs: fix invalid memory access

2018-08-01 Thread Jaegeuk Kim
On 08/01, Chao Yu wrote: > From: Chao Yu > > syzbot found the following crash on: > > HEAD commit:d9bd94c0bcaa Add linux-next specific files for 20180801 > git tree: linux-next > console output: https://syzkaller.appspot.com/x/log.txt?x=1001189c40 > kernel config: https://syzkalle

Re: [PATCH v6 1/2] f2fs: fix to avoid broken of dnode block list

2018-08-01 Thread Jaegeuk Kim
On 07/29, Chao Yu wrote: > From: Chao Yu > > f2fs recovery flow is relying on dnode block link list, it means fsynced > file recovery depends on previous dnode's persistence in the list, so > during fsync() we should wait on all regular inode's dnode writebacked > before issuing flush. > > By th

Re: [PATCH v2] f2fs: split discard command in prior to block layer

2018-07-23 Thread Jaegeuk Kim
On 07/15, Chao Yu wrote: > On 2018/7/15 11:13, Jaegeuk Kim wrote: > > On 07/15, Chao Yu wrote: > >> Hi Jaegeuk, > >> > >> On 2018/7/15 9:27, Jaegeuk Kim wrote: > >>> On 07/08, Chao Yu wrote: > >>>> From: Chao Yu > >&

[PATCH] f2fs: avoid fi->i_gc_rwsem[WRITE] lock in f2fs_gc

2018-07-24 Thread Jaegeuk Kim
The f2fs_gc() called by f2fs_balance_fs() requires to be called outside of fi->i_gc_rwsem[WRITE], since f2fs_gc() can try to grab it in a loop. Signed-off-by: Jaegeuk Kim --- fs/f2fs/file.c| 2 ++ fs/f2fs/segment.c | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/f

Re: [PATCH 1/1] f2fs: checkpoint disabling

2018-07-14 Thread Jaegeuk Kim
On 07/11, Daniel Rosenberg wrote: > This adds a lightweight non-persistent snapshotting scheme to f2fs. > > To use, mount with the option checkpoint=disable, and to return to > normal operation, remount with checkpoint=enable. If the filesystem > is shut down before remounting with checkpoint=enab

Re: [PATCH v2] mkfs.f2fs: expand scalability of nat bitmap

2018-01-23 Thread Jaegeuk Kim
On 01/23, Chao Yu wrote: > On 2018/1/23 7:00, Jaegeuk Kim wrote: > > On 01/17, Chao Yu wrote: > >> Hi Jaegeuk, > >> > >> On 2018/1/17 8:47, Jaegeuk Kim wrote: > >>> Hi Chao, > >>> > >>> On 01/15, Chao Yu wrote: >

Re: [PATCH v2] mkfs.f2fs: expand scalability of nat bitmap

2018-01-23 Thread Jaegeuk Kim
On 01/23, Jaegeuk Kim wrote: > On 01/23, Chao Yu wrote: > > On 2018/1/23 7:00, Jaegeuk Kim wrote: > > > On 01/17, Chao Yu wrote: > > >> Hi Jaegeuk, > > >> > > >> On 2018/1/17 8:47, Jaegeuk Kim wrote: > > >>> Hi Chao, > &g

Re: [PATCH v2] mkfs.f2fs: expand scalability of nat bitmap

2018-01-23 Thread Jaegeuk Kim
On 01/24, Chao Yu wrote: > On 2018/1/24 6:19, Jaegeuk Kim wrote: > > On 01/23, Jaegeuk Kim wrote: > >> On 01/23, Chao Yu wrote: > >>> On 2018/1/23 7:00, Jaegeuk Kim wrote: > >>>> On 01/17, Chao Yu wrote: > >>>>> Hi Jaegeuk, > &g

Re: [PATCH v2] mkfs.f2fs: expand scalability of nat bitmap

2018-01-23 Thread Jaegeuk Kim
On 01/24, Chao Yu wrote: > On 2018/1/24 10:22, Jaegeuk Kim wrote: > > On 01/24, Chao Yu wrote: > >> On 2018/1/24 6:19, Jaegeuk Kim wrote: > >>> On 01/23, Jaegeuk Kim wrote: > >>>> On 01/23, Chao Yu wrote: > >>>>> On 2018/1/23 7:00, Ja

Re: [PATCH v2] f2fs: support inode creation time

2018-01-23 Thread Jaegeuk Kim
On 01/22, Chao Yu wrote: > From: Chao Yu > > This patch adds creation time field in inode layout to support showing > kstat.btime in ->statx. Hi Chao, Could you please check this patch again? I reverted this due to kernel panic. Thanks, > > Signed-off-by: Chao Yu > --- > v2: > - add missing

Re: [PATCH 1/3] f2fs: split wio_mutex

2017-05-11 Thread Jaegeuk Kim
On 05/09, Chao Yu wrote: > From: Chao Yu > > Split wio_mutex to adjust different temperature bio cache. This can be rephrased like: Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim --- fs/f2fs/f2fs.h| 3 ++- fs/f2fs/segment.c | 4 ++-- fs/f2fs/super.c | 7 --- 3 files c

Re: [PATCH 3/3] f2fs: introduce io_list for serialize data/node IOs

2017-05-11 Thread Jaegeuk Kim
Hi Chao, On 05/09, Chao Yu wrote: > From: Chao Yu > > Serialize data/node IOs by using fifo list instead of mutex lock, > it will help to enhance concurrency of f2fs, meanwhile keeping LFS > IO semantics. I'm not against to give it a try, but not sure how much we can get a benefit from this app

Re: [f2fs-dev] [PATCH] f2fs: split bio cache

2017-05-12 Thread Jaegeuk Kim
On 05/12, Chao Yu wrote: > On 2017/5/11 10:35, Jaegeuk Kim wrote: > > On 05/11, Chao Yu wrote: > >> On 2017/5/11 7:50, Jaegeuk Kim wrote: > >>> On 05/09, Chao Yu wrote: > >>>> Hi Jaegeuk, > >>>> > >>>> On 2017/5/9 5:2

Re: [PATCH 3/3] f2fs: introduce io_list for serialize data/node IOs

2017-05-12 Thread Jaegeuk Kim
On 05/12, Chao Yu wrote: > Hi Jaegeuk, > > On 2017/5/12 2:36, Jaegeuk Kim wrote: > > Hi Chao, > > > > On 05/09, Chao Yu wrote: > >> From: Chao Yu > >> > >> Serialize data/node IOs by using fifo list instead of mutex lock, > >> it

Re: [PATCH] f2fs: fix to cover f2fs_fiemap with inode_lock

2018-01-10 Thread Jaegeuk Kim
On 01/10, Chao Yu wrote: > This patch fix to cover f2fs_fiemap with inode_lock in order to make > the whole interface avoiding race with mapping change. > > Signed-off-by: Chao Yu > --- > fs/f2fs/data.c | 8 > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/fs/f2fs/dat

Re: [PATCH v2 1/4] f2fs: support F2FS_IOC_PRECACHE_EXTENTS

2018-01-10 Thread Jaegeuk Kim
On 01/10, Chao Yu wrote: > This patch introduces a new ioctl F2FS_IOC_PRECACHE_EXTENTS to precache > extent info like ext4, in order to gain better performance during > triggering AIO by eliminating synchronous waiting of mapping info. > > Referred commit: 7869a4a6c5ca ("ext4: add support for exte

Re: [PATCH v2 1/4] f2fs: support F2FS_IOC_PRECACHE_EXTENTS

2018-01-10 Thread Jaegeuk Kim
On 01/11, Chao Yu wrote: > On 2018/1/11 3:24, Jaegeuk Kim wrote: > > On 01/10, Chao Yu wrote: > >> This patch introduces a new ioctl F2FS_IOC_PRECACHE_EXTENTS to precache > >> extent info like ext4, in order to gain better performance during > >> triggering AI

[GIT PULL] f2fs update for 4.16-rc1

2018-01-30 Thread Jaegeuk Kim
_file_open() f2fs: switch to fscrypt_prepare_link() f2fs: switch to fscrypt_prepare_rename() f2fs: switch to fscrypt_prepare_lookup() f2fs: switch to fscrypt_prepare_setattr() Hyunchul Lee (1): f2fs: apply write hints to select the type of segment for direct write Jaegeuk Kim (12

Re: [GIT PULL] f2fs update for 4.16-rc1

2018-01-30 Thread Jaegeuk Kim
On 01/31, Stephen Rothwell wrote: > Hi all, > > On Tue, 30 Jan 2018 14:32:20 -0800 Jaegeuk Kim wrote: > > > > Could you please consider the below pull request? > > > > Thanks, > > > > The following changes since commit ace52288edf0cb5e7a52b681f057

Re: [PATCH] f2fs: add sanity check for quota sysfile ino

2018-01-30 Thread Jaegeuk Kim
On 01/29, Chao Yu wrote: > Add missing sanity check for quota sysfile ino. We don't need to limit the specific inode numbers for quota files, since we may be able to set any inode numbers later. How about checkint the numbers are allocated as quota? > > Signed-off-by: Chao Yu > --- > fs/f2fs/s

Re: [PATCH] f2fs: fix heap mode to reset it back

2018-01-30 Thread Jaegeuk Kim
On 01/29, Chao Yu wrote: > On 2018/1/29 16:31, Yunlong Song wrote: > > The old commit allocates hot data & nodes in the beginning of partition > > both for heap and > > noheap mode. But from the commit message, the heap mode should be like > > before, i.e., > > allocate hot data & nodes from curs

Re: [PATCH 2/2] f2fs: support {d,id,did,x}node checksum

2018-01-30 Thread Jaegeuk Kim
On 01/27, Chao Yu wrote: > This patch adds to support {d,id,did,x}node checksum in kernel side. > > Signed-off-by: Chao Yu > --- > fs/f2fs/f2fs.h | 15 +++- > fs/f2fs/inode.c | 98 > +++-- > fs/f2fs/node.c | 2 +- > fs/f

Re: [PATCH] f2fs: add sanity check for quota sysfile ino

2018-01-30 Thread Jaegeuk Kim
On 01/31, Chao Yu wrote: > On 2018/1/31 9:35, Jaegeuk Kim wrote: > > On 01/29, Chao Yu wrote: > >> Add missing sanity check for quota sysfile ino. > > > > We don't need to limit the specific inode numbers for quota files, since > > we may be able to set an

Re: [PATCH] f2fs: add sanity check for quota sysfile ino

2018-01-30 Thread Jaegeuk Kim
On 01/31, Chao Yu wrote: > On 2018/1/31 10:36, Jaegeuk Kim wrote: > > On 01/31, Chao Yu wrote: > >> On 2018/1/31 9:35, Jaegeuk Kim wrote: > >>> On 01/29, Chao Yu wrote: > >>>> Add missing sanity check for quota sysfile ino. > >>> > >

Re: [PATCH] f2fs: add sanity check for quota sysfile ino

2018-01-31 Thread Jaegeuk Kim
On 01/31, Chao Yu wrote: > On 2018/1/31 11:49, Jaegeuk Kim wrote: > > On 01/31, Chao Yu wrote: > >> On 2018/1/31 10:36, Jaegeuk Kim wrote: > >>> On 01/31, Chao Yu wrote: > >>>> On 2018/1/31 9:35, Jaegeuk Kim wrote: > >>>>> On 01

Re: [PATCH 2/2] f2fs: support {d,id,did,x}node checksum

2018-01-31 Thread Jaegeuk Kim
On 01/31, Chao Yu wrote: > On 2018/1/31 10:02, Jaegeuk Kim wrote: > > What if we want to add more entries in addition to node_checksum? Do we have > > to add a new feature flag at every time? How about adding a layout value > > instead > > Hmm.. for previous implement

Re: [PATCH v2 3/3] f2fs: Add the 'whint_mode' mount option to f2fs documentation

2018-01-31 Thread Jaegeuk Kim
Hi Hyunchul, I've added the policy in the Doc as wel. Thanks, On 01/31, Hyunchul Lee wrote: > From: Hyunchul Lee > > Signed-off-by: Hyunchul Lee > --- > Documentation/filesystems/f2fs.txt | 6 ++ > 1 file changed, 6 insertions(+) > > diff --git a/Documentation/filesystems/f2fs.txt > b/

[PATCH 1/2] f2fs: allow to recover node blocks given updated checkpoint

2018-01-19 Thread Jaegeuk Kim
If fsck.f2fs changes crc, we have no way to recover some inode blocks by roll- forward recovery. Let's relax the condition to recover them. Signed-off-by: Jaegeuk Kim --- fs/f2fs/node.h | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/fs/f2fs/node.h b/fs/f2fs/n

[PATCH 2/2] f2fs: recover some i_inline flags

2018-01-19 Thread Jaegeuk Kim
This fixes lost i_inline flags during roll-forward. Signed-off-by: Jaegeuk Kim --- fs/f2fs/recovery.c | 9 + 1 file changed, 9 insertions(+) diff --git a/fs/f2fs/recovery.c b/fs/f2fs/recovery.c index cbeef73bc4dd..2354f1e05e19 100644 --- a/fs/f2fs/recovery.c +++ b/fs/f2fs/recovery.c

Re: [PATCH] f2fs: correct removexattr behavior for null valued extended attribute

2018-01-20 Thread Jaegeuk Kim
Thanks, On 01/20, Chao Yu wrote: > From: Daeho Jeong > > __vfs_removexattr() transfers "NULL" value to the setxattr handler of > the f2fs filesystem in order to remove the extended attribute. But, > __f2fs_setxattr() just ignores the removal request when the value of > the extended attribute is

Re: [PATCH 1/2 v2] f2fs: allow to recover node blocks given updated checkpoint

2018-01-20 Thread Jaegeuk Kim
If fsck.f2fs changes crc, we have no way to recover some inode blocks by roll- forward recovery. Let's relax the condition to recover them. Signed-off-by: Jaegeuk Kim --- Change log from v1: - add a new checkpoint flag to handle this fs/f2fs/checkpoint.c| 1 + fs/f2fs/node.h

Re: [PATCH 2/2 v2] f2fs: recover some i_inline flags

2018-01-20 Thread Jaegeuk Kim
This fixes lost i_inline flags during roll-forward. Signed-off-by: Jaegeuk Kim --- Change log from v1: - add a new function to recover the flag - fix missing pin_file unset fs/f2fs/recovery.c | 21 +++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/fs/f2fs

Re: [PATCH v5] f2fs: add an ioctl to disable GC for specific file

2018-01-22 Thread Jaegeuk Kim
This patch gives a flag to disable GC on given file, which would be useful, when user wants to keep its block map. It also conducts in-place-update for dontmove file. Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim --- Change log from v1: - unset pin_file, if # of trials exceeds a threshold

Re: [PATCH v2] mkfs.f2fs: expand scalability of nat bitmap

2018-01-22 Thread Jaegeuk Kim
On 01/17, Chao Yu wrote: > Hi Jaegeuk, > > On 2018/1/17 8:47, Jaegeuk Kim wrote: > > Hi Chao, > > > > On 01/15, Chao Yu wrote: > >> Previously, our total node number (nat_bitmap) and total nat segment count > >> will not monotonously increase along w

Re: [PATCH 2/2 v3] f2fs: add reserved blocks for root user

2018-01-04 Thread Jaegeuk Kim
This patch allows root to reserve some blocks via mount option. "-o reserve_root=N" means N x 4KB-sized blocks for root only. Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim --- Change log from v2: - fix overflow in statfs fs/f2fs/f2fs.h | 20 fs/f2fs/su

[PATCH] f2fs: add resgid and resuid to reserve root blocks

2018-01-04 Thread Jaegeuk Kim
This patch adds mount options to reserve some blocks via resgid=%u,resuid=%u. It only activates with reserve_root=%u. Signed-off-by: Jaegeuk Kim --- fs/f2fs/f2fs.h | 26 -- fs/f2fs/super.c | 46 -- 2 files changed, 68

[PATCH] f2fs: allow quota to use reserved blocks

2018-01-05 Thread Jaegeuk Kim
This patch allows quota to use reserved blocks all the time. Signed-off-by: Jaegeuk Kim --- fs/f2fs/f2fs.h | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index e5554b851fd8..827549077b81 100644 --- a/fs/f2fs/f2fs.h +++ b/fs/f2fs

Re: [PATCH v4] f2fs: add an ioctl to disable GC for specific file

2018-01-16 Thread Jaegeuk Kim
This patch gives a flag to disable GC on given file, which would be useful, when user wants to keep its block map. It also conducts in-place-update for dontmove file. Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim --- Change log from v3: - add F2FS_IOC_GET_PIN_FILE - fix to reset

Re: [PATCH v3 RESEND] f2fs: support F2FS_IOC_PRECACHE_EXTENTS

2018-01-16 Thread Jaegeuk Kim
Hi Chao, On 01/11, Chao Yu wrote: > This patch introduces a new ioctl F2FS_IOC_PRECACHE_EXTENTS to precache > extent info like ext4, in order to gain better performance during > triggering AIO by eliminating synchronous waiting of mapping info. > > Referred commit: 7869a4a6c5ca ("ext4: add suppor

Re: [PATCH v2] mkfs.f2fs: expand scalability of nat bitmap

2018-01-16 Thread Jaegeuk Kim
Hi Chao, On 01/15, Chao Yu wrote: > Previously, our total node number (nat_bitmap) and total nat segment count > will not monotonously increase along with image size, and max nat_bitmap size > is limited by "CHECKSUM_OFFSET - sizeof(struct f2fs_checkpoint) + 1", it is > with bad scalability when u

Re: [PATCH v2] f2fs: support FIEMAP_FLAG_XATTR

2018-01-09 Thread Jaegeuk Kim
On 01/08, Chao Yu wrote: > This patch enables ->fiemap to handle FIEMAP_FLAG_XATTR flag for xattr > mapping info lookup purpose. > > It makes f2fs passing generic/425 test in fstest. > > Signed-off-by: Chao Yu > --- > v2: adjust f2fs_xattr_fiemap flow to handle the case that inline xattr and > x

Re: [PATCH 1/4] f2fs: support F2FS_IOC_PRECACHE_EXTENTS

2018-01-09 Thread Jaegeuk Kim
On 01/08, Chao Yu wrote: > This patch introduces a new ioctl F2FS_IOC_PRECACHE_EXTENTS to precache > extent info, in order to gain better performance during data/meta > accessing. > > Signed-off-by: Chao Yu > --- > fs/f2fs/data.c | 27 +++ > fs/f2fs/f2fs.h | 2 ++ > fs/f

Re: [PATCH 2/4] f2fs: support FIEMAP_FLAG_CACHE

2018-01-09 Thread Jaegeuk Kim
On 01/08, Chao Yu wrote: > This patch factors out f2fs_precache_extents from > f2fs_ioc_precache_extents, with the new function we can support > FIEMAP_FLAG_CACHE in ->fiemap. > > Signed-off-by: Chao Yu > --- > fs/f2fs/data.c | 12 +--- > fs/f2fs/f2fs.h | 1 + > fs/f2fs/file.c | 10

Re: [PATCH 1/4] f2fs: support F2FS_IOC_PRECACHE_EXTENTS

2018-01-09 Thread Jaegeuk Kim
On 01/09, Jaegeuk Kim wrote: > On 01/08, Chao Yu wrote: > > This patch introduces a new ioctl F2FS_IOC_PRECACHE_EXTENTS to precache > > extent info, in order to gain better performance during data/meta > > accessing. > > > > Signed-off-by: Chao Yu

Re: [PATCH] f2fs: avoid selinux denial on CAP_SYS_RESOURCE

2018-03-09 Thread Jaegeuk Kim
On 03/09, Chao Yu wrote: > On 2018/3/9 12:49, Jaegeuk Kim wrote: > > This fixes CAP_SYS_RESOURCE denial of selinux when using resgid. > > A little confusion, if capable(CAP_SYS_RESOURCE) is false, we still have > chance > to return true for below resuid & resgid cases

[PATCH] f2fs: align memory boundary for bitops

2018-03-09 Thread Jaegeuk Kim
For example, in arm64, free_nid_bitmap should be aligned to word size in order to use bit operations. Signed-off-by: Jaegeuk Kim --- fs/f2fs/f2fs.h | 2 +- fs/f2fs/node.c | 20 +--- include/linux/f2fs_fs.h | 4 3 files changed, 22 insertions(+), 4

Re: [PATCH] f2fs: set deadline to drop expired inmem pages

2018-04-12 Thread Jaegeuk Kim
On 04/10, Chao Yu wrote: > Hi Jaegeuk, > > On 2018/4/8 16:13, Chao Yu wrote: > > f2fs doesn't allow abuse on atomic write class interface, so except > > limiting in-mem pages' total memory usage capacity, we need to limit > > start-commit time as well, otherwise we may run into infinite loop > > d

Re: [PATCH] f2fs: enlarge block plug coverage

2018-04-12 Thread Jaegeuk Kim
On 04/10, Chao Yu wrote: > On 2018/4/10 12:10, Jaegeuk Kim wrote: > > On 04/10, Chao Yu wrote: > >> On 2018/4/10 2:02, Jaegeuk Kim wrote: > >>> On 04/08, Chao Yu wrote: > >>>> On 2018/4/5 11:51, Jaegeuk Kim wrote: > >>>>> On 04/04, Cha

[PATCH] f2fs: clear PageError on writepage

2018-04-12 Thread Jaegeuk Kim
This patch clears PageError in some pages tagged by read path, but when we write the pages with valid contents, writepage should clear the bit likewise ext4. Signed-off-by: Jaegeuk Kim --- fs/f2fs/data.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index

Re: [PATCH] f2fs: set deadline to drop expired inmem pages

2018-04-12 Thread Jaegeuk Kim
On 04/13, Chao Yu wrote: > On 2018/4/13 9:04, Jaegeuk Kim wrote: > > On 04/10, Chao Yu wrote: > >> Hi Jaegeuk, > >> > >> On 2018/4/8 16:13, Chao Yu wrote: > >>> f2fs doesn't allow abuse on atomic write class interface, so except > >>&g

Re: [PATCH] f2fs: enlarge block plug coverage

2018-04-12 Thread Jaegeuk Kim
On 04/13, Chao Yu wrote: > On 2018/4/13 9:06, Jaegeuk Kim wrote: > > On 04/10, Chao Yu wrote: > >> On 2018/4/10 12:10, Jaegeuk Kim wrote: > >>> On 04/10, Chao Yu wrote: > >>>> On 2018/4/10 2:02, Jaegeuk Kim wrote: > >>>>> On 04/0

Re: [PATCH] f2fs: enlarge block plug coverage

2018-04-09 Thread Jaegeuk Kim
On 04/08, Chao Yu wrote: > On 2018/4/5 11:51, Jaegeuk Kim wrote: > > On 04/04, Chao Yu wrote: > >> This patch enlarges block plug coverage in __issue_discard_cmd, in > >> order to collect more pending bios before issuing them, to avoid > >> being disturbed

Re: [PATCH] mm: workingset: fix NULL ptr dereference

2018-04-09 Thread Jaegeuk Kim
On 04/09, Minchan Kim wrote: > On Mon, Apr 09, 2018 at 04:14:03AM -0700, Matthew Wilcox wrote: > > On Mon, Apr 09, 2018 at 12:09:30PM +0900, Minchan Kim wrote: > > > On Sun, Apr 08, 2018 at 07:49:25PM -0700, Matthew Wilcox wrote: > > > > On Mon, Apr 09, 2018 at 10:58:15AM +0900, Minchan Kim wrote:

[PATCH] f2fs: don't use GFP_ZERO for page caches

2018-04-09 Thread Jaegeuk Kim
s are initial status. There are two inner inodes (meta inode and node inode) setting __GFP_ZERO, I have just checked them, for both of them, we can avoid using __GFP_ZERO, and do initialization by ourselves to avoid unneeded/redundant zeroing from mm. Cc: Signed-off-by: Chao Yu Signed-off-by: Ja

Re: [PATCH] f2fs: don't use GFP_ZERO for page caches

2018-04-09 Thread Jaegeuk Kim
Chao, I have to test this for a while. Meanwhile, could you take a look at this? On 04/09, Jaegeuk Kim wrote: > From: Chao Yu > > Related to https://lkml.org/lkml/2018/4/8/661 > > Sometimes, we need to write meta data to new allocated block address, > then we will allocat

Re: [PATCH v2] f2fs: don't use GFP_ZERO for page caches

2018-04-09 Thread Jaegeuk Kim
c: Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim --- fs/f2fs/inode.c | 4 ++-- fs/f2fs/node.c | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/fs/f2fs/inode.c b/fs/f2fs/inode.c index 417c9dcd0269..87535bf63421 100644 --- a/fs/f2fs/inode.c +++ b/fs/f2fs/inode.c @@ -320,

Re: [f2fs-dev] [PATCH v2] f2fs: don't use GFP_ZERO for page caches

2018-04-09 Thread Jaegeuk Kim
On 04/09, Jaegeuk Kim wrote: > Change log from v1: > - don't memset for recovered page > > Related to https://lkml.org/lkml/2018/4/8/661 > > Sometimes, we need to write meta data to new allocated block address, > then we will allocate a zeroed page in inner inode&#

Re: [f2fs-dev] [PATCH v3] f2fs: don't use GFP_ZERO for page caches

2018-04-09 Thread Jaegeuk Kim
void using __GFP_ZERO, and do initialization by ourselves to avoid unneeded/redundant zeroing from mm. Cc: Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim --- fs/f2fs/checkpoint.c | 4 +++- fs/f2fs/inode.c | 4 ++-- fs/f2fs/segment.c| 3 +++ fs/f2fs/segment.h| 1 + 4 files

Re: [PATCH] f2fs: don't use GFP_ZERO for page caches

2018-04-09 Thread Jaegeuk Kim
On 04/10, Chao Yu wrote: > On 2018/4/10 3:00, Jaegeuk Kim wrote: > > From: Chao Yu > > > > Related to https://lkml.org/lkml/2018/4/8/661 > > > > Sometimes, we need to write meta data to new allocated block address, > > then we will allocate a zeroed p

Re: [PATCH] f2fs: enlarge block plug coverage

2018-04-09 Thread Jaegeuk Kim
On 04/10, Chao Yu wrote: > On 2018/4/10 2:02, Jaegeuk Kim wrote: > > On 04/08, Chao Yu wrote: > >> On 2018/4/5 11:51, Jaegeuk Kim wrote: > >>> On 04/04, Chao Yu wrote: > >>>> This patch enlarges block plug coverage in __issue_discard_cmd, in > >&g

Re: [f2fs-dev] [PATCH v3] f2fs: don't use GFP_ZERO for page caches

2018-04-09 Thread Jaegeuk Kim
On 04/10, Chao Yu wrote: > On 2018/4/10 11:29, Jaegeuk Kim wrote: > > Change log from v2: > > - consider IO error case when dealing with metapage > > - memset by fill_node_footer > > > > Change log from v1: > > - don't memset for recovered page >

Re: [PATCH 2/2] page cache: Mask off unwanted GFP flags

2018-04-10 Thread Jaegeuk Kim
On 04/10, Matthew Wilcox wrote: > On Tue, Apr 10, 2018 at 10:45:45PM +0900, Minchan Kim wrote: > > On Tue, Apr 10, 2018 at 05:53:51AM -0700, Matthew Wilcox wrote: > > > From: Matthew Wilcox > > > > > > The page cache has used the mapping's GFP flags for allocating > > > radix tree nodes for a lon

[PATCH] f2fs: avoid selinux denial on CAP_SYS_RESOURCE

2018-03-08 Thread Jaegeuk Kim
This fixes CAP_SYS_RESOURCE denial of selinux when using resgid. Signed-off-by: Jaegeuk Kim --- fs/f2fs/f2fs.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index f6dc70666ebb..3d12277fbe9e 100644 --- a/fs/f2fs/f2fs.h +++ b/fs/f2fs

Re: linux-next: build warning after merge of the f2fs tree

2018-11-26 Thread Jaegeuk Kim
Hi Stephen, On 11/26, Stephen Rothwell wrote: > Hi Jaegeuk, > > After merging the f2fs tree, today's linux-next build > (x86_64_allmodconfig) produced this warning: > > In file included from fs/f2fs/dir.c:11: > fs/f2fs/f2fs.h: In function '__mark_inode_dirty_flag': > fs/f2fs/f2fs.h:2388:6: warni

Re: linux-next: build warning after merge of the f2fs tree

2018-11-26 Thread Jaegeuk Kim
On 11/27, Stephen Rothwell wrote: > Hi Jaegeuk, > > On Mon, 26 Nov 2018 13:59:24 -0800 Jaegeuk Kim wrote: > > > > On 11/26, Stephen Rothwell wrote: > > > > > > After merging the f2fs tree, today's linux-next build > > > (x86_64_allmodconfig)

Re: [f2fs-dev] [PATCH] f2fs: check memory boundary by insane namelen

2018-11-26 Thread Jaegeuk Kim
On 11/23, Sheng Yong wrote: > Hi, Jaegeuk and Chao, > > On 2018/11/15 15:50, Jaegeuk Kim wrote: > > If namelen is corrupted to have very long value, fill_dentries can copy > > wrong memory area. > > > Is there any scenario that could hit this corruption? Or

Re: [f2fs-dev] [PATCH] f2fs: avoid frequent costly fsck triggers

2018-11-30 Thread Jaegeuk Kim
On 11/30, Chao Yu wrote: > On 2018/11/30 10:35, Sheng Yong wrote: > > Hi, Jaegeuk and Chao, > > > > On 2018/11/29 1:48, Jaegeuk Kim wrote: > >> On 11/28, Chao Yu wrote: > >>> On 2018/11/28 16:10, Jaegeuk Kim wrote: > >>>> On 11/28, Chao Yu

[PATCH] f2fs: let fstrim issue discard commands in lower priority

2018-05-24 Thread Jaegeuk Kim
ximum size to 2MB per candidate, and check IO congestion when issuing them to disk. Signed-off-by: Jaegeuk Kim --- fs/f2fs/f2fs.h| 4 +- fs/f2fs/segment.c | 123 +++--- 2 files changed, 64 insertions(+), 63 deletions(-) diff --git a/fs/f2fs/f2fs.h b/fs

Re: [PATCH] f2fs: let fstrim issue discard commands in lower priority

2018-05-24 Thread Jaegeuk Kim
On 05/25, Chao Yu wrote: > Hi Jaegeuk, > > On 2018/5/25 13:10, Jaegeuk Kim wrote: > > The fstrim gathers huge number of large discard commands, and tries to issue > > without IO awareness, which results in long user-perceive IO latencies on > > READ, WRITE, and FLUSH

Re: [PATCH v2] f2fs: let fstrim issue discard commands in lower priority

2018-05-25 Thread Jaegeuk Kim
ximum size to 2MB per candidate, and check IO congestion when issuing them to disk. Signed-off-by: Jaegeuk Kim --- Change log from v1: - wait all discard bios in put_super & congested case in trimfs fs/f2fs/f2fs.h| 4 +- fs/f2fs/segment.c | 139 +---

[RFC PATCH] f2fs: add fsync_mode=nobarrier for non-atomic files

2018-05-25 Thread Jaegeuk Kim
For non-atomic files, this patch adds an option to give nobarrier which doesn't issue flush commands to the device. Signed-off-by: Jaegeuk Kim --- Documentation/filesystems/f2fs.txt | 16 +--- fs/f2fs/f2fs.h | 1 + fs/f2fs/file.c | 2 +

Re: [PATCH 3/3] f2fs: clean up symbol namespace

2018-05-29 Thread Jaegeuk Kim
Hi Chao, Thank you for the work. I resolved some conflicts and modified some function names. Please take a look at this. https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs.git/commit/?h=dev-test --- fs/f2fs/checkpoint.c | 8 fs/f2fs/dir.c| 6 +++--- fs/f2fs/f2fs.h

[PATCH 2/4] f2fs: allow wrong configure dio to buffered write

2018-07-06 Thread Jaegeuk Kim
This fixes to support unaligned dio as buffered writes. Signed-off-by: Jaegeuk Kim --- fs/f2fs/data.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index e66379961804..6e8e78bb64a7 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c @@ -2425,7

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