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

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] 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: [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: [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: [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: [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: [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

[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] 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:

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] f2fs: enlarge block plug coverage

2018-04-04 Thread Jaegeuk Kim
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 by previous discard I/O in IO aware discard mode. Hmm, then we need to wait for huge discard IO for over 10 secs, which

Re: [PATCH] f2fs: fix to show encrypt flag in FS_IOC_GETFLAGS

2018-04-04 Thread Jaegeuk Kim
On 04/03, Chao Yu wrote: > On 2018/4/3 4:21, Jaegeuk Kim wrote: > > On 04/02, Chao Yu wrote: > >> This patch fixes to show encrypt flag in FS_IOC_GETFLAGS like ext4 does. > > > > Actually, we have to show internal flags owned by f2fs, not generic ones. > &g

[GIT PULL] f2fs update for 4.17-rc1

2018-04-04 Thread Jaegeuk Kim
'whint_mode' mount option to f2fs documentation f2fs: add nowait aio support Jaegeuk Kim (11): f2fs: handle quota for orphan inodes f2fs: don't stop GC if GC is contended f2fs: add mount option for segment allocation policy f2fs: add auto tuning for small

Re: [PATCH v2] f2fs: remain written times to update inode during fsync

2018-04-03 Thread Jaegeuk Kim
On 04/03, Chao Yu wrote: > On 2018/4/3 13:23, Jaegeuk Kim wrote: > > On 04/03, Chao Yu wrote: > >> On 2018/3/31 0:30, Jaegeuk Kim wrote: > >>> Change log from v1: > >>> - add more description > >>> > >>> This fixes xfstests/

Re: [PATCH v2] f2fs: remain written times to update inode during fsync

2018-04-02 Thread Jaegeuk Kim
On 04/03, Chao Yu wrote: > On 2018/3/31 0:30, Jaegeuk Kim wrote: > > Change log from v1: > > - add more description > > > > This fixes xfstests/generic/392. > > > > The failure was caused by different times between 1) one marked in the last > >

Re: [f2fs-dev] [PATCH v3] f2fs: remain written times to update inode during fsync

2018-04-02 Thread Jaegeuk Kim
we skipped updating inode block at 1), since its i_size was recoverable along with 4KB-aligned data writes, which was fixed by: "f2fs: fix a wrong condition in f2fs_skip_inode_update" Signed-off-by: Jaegeuk Kim --- fs/f2fs/f2fs.h | 15 +++ fs/f2fs/inode.c | 8 +++

Re: [PATCH] f2fs: fix to show encrypt flag in FS_IOC_GETFLAGS

2018-04-02 Thread Jaegeuk Kim
On 04/02, Chao Yu wrote: > This patch fixes to show encrypt flag in FS_IOC_GETFLAGS like ext4 does. Actually, we have to show internal flags owned by f2fs, not generic ones. We may need to define all of them separately? > > Signed-off-by: Chao Yu > --- > fs/f2fs/file.c | 9 +++-- > 1 file

[PATCH] f2fs: truncate preallocated blocks in error case

2018-03-30 Thread Jaegeuk Kim
If write is failed, we must deallocate the blocks that we couldn't write. Cc: sta...@vger.kernel.org Signed-off-by: Jaegeuk Kim --- fs/f2fs/file.c | 9 + 1 file changed, 9 insertions(+) diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index 8068b015ece5..f18f62dd60a3 100644 --- a/fs

Re: [PATCH] f2fs: remain written times to update inode during fsync

2018-03-30 Thread Jaegeuk Kim
On 03/30, Chao Yu wrote: > Hi Jaegeuk, > > On 2018/3/30 13:51, Jaegeuk Kim wrote: > > This fixes xfstests/generic/392. > > Hmm... Could you please give more details about this issue and solution in > commit message, since I can catch up the solution only with the co

Re: [PATCH v2] f2fs: remain written times to update inode during fsync

2018-03-30 Thread Jaegeuk Kim
its i_size was recoverable along with 4KB-aligned data writes, which was fixed by: "f2fs: fix a wrong condition in f2fs_skip_inode_update" Signed-off-by: Jaegeuk Kim --- fs/f2fs/f2fs.h | 15 +++ fs/f2fs/inode.c | 4 2 files changed, 19 insertions(+) diff --git

[PATCH] f2fs: remain written times to update inode during fsync

2018-03-29 Thread Jaegeuk Kim
This fixes xfstests/generic/392. Signed-off-by: Jaegeuk Kim --- fs/f2fs/f2fs.h | 15 +++ fs/f2fs/inode.c | 4 2 files changed, 19 insertions(+) diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index 000f93f6767e..675c39d85111 100644 --- a/fs/f2fs/f2fs.h +++ b/fs/f2fs/f2fs.h

[PATCH] ext4: handle errors on ext4_commit_super

2018-03-29 Thread Jaegeuk Kim
From: Jaegeuk Kim When remounting ext4 from ro to rw, currently it allows its transition, even if ext4_commit_super() returns EIO. Even worse thing is, after that, fs/buffer complains buffer dirty bits like: Call trace: [] mark_buffer_dirty+0x184/0x1a4 [] __ext4_handle_dirty_super+0x4c/0xfc

Re: [PATCH] f2fs: don't put dentry page in pagecache into highmem

2018-03-18 Thread Jaegeuk Kim
On 03/19, Yunlong Song wrote: > Hi, Jaegeuk, > I find this patch is removed from current branch of dev-test > recently, why? Any bugs? Moved into the beginning of the tree for cherry-picking into f2fs-stable. Thanks, > > On 2018/2/28 20:31, Yunlong Song wrote: > > Previous dentry page uses

[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: 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: 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: [f2fs-dev] [PATCH 1/5 v2] f2fs: add mount option for segment allocation policy

2018-02-28 Thread Jaegeuk Kim
On 02/28, Chao Yu wrote: > On 2018/2/28 13:09, Jaegeuk Kim wrote: > > Change log from v1: > > - add doc :) > > > > This patch adds an mount option, "alloc_mode=%s" having two options, > > "default" > > and "reuse". > >

Re: [PATCH v4] Revert "f2fs crypto: avoid unneeded memory allocation in ->readdir"

2018-02-28 Thread Jaegeuk Kim
On 02/28, Chao Yu wrote: > Hi Jaegeuk, > > On 2018/2/28 13:48, Jaegeuk Kim wrote: > > Hi Yunlong, > > > > As Eric pointed out, how do you think using nohighmem for directory likewise > > I'd like to ask, at the beginning, why we choose to use highmem fo

Re: [PATCH] f2fs: fix to restore whint_mode in ->remount_fs

2018-02-28 Thread Jaegeuk Kim
On 02/28, Chao Yu wrote: > From: Chao Yu > > If we fail in ->remount_fs, it needs to restore old whint_mode as other > mount options. > > Fixes: e25afe01822f ("f2fs: support passing down write hints given by users > to block layer") Hi Chao, It was not merged, so please allow me to integrate

Re: [PATCH 4/5] f2fs: issue discard aggressively in the gc_urgent mode

2018-02-28 Thread Jaegeuk Kim
Change log from v1: - relax more to issue discard commands This patch avoids to skip discard commands when user sets gc_urgent mode. Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim --- fs/f2fs/segment.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/fs/f2fs

Re: [PATCH v4] Revert "f2fs crypto: avoid unneeded memory allocation in ->readdir"

2018-02-27 Thread Jaegeuk Kim
Hi Yunlong, As Eric pointed out, how do you think using nohighmem for directory likewise ext4, which looks like more efficient? Actually, we don't need to do this in most of recent kernels, right? Thanks, On 02/28, Yunlong Song wrote: > This reverts commit e06f86e61d7a67fe6e826010f57aa39c674f4b1

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

2018-02-27 Thread Jaegeuk Kim
On 02/27, Chao Yu wrote: > Ping, > > On 2018/2/13 15:34, Chao Yu wrote: > > Hi Jaegeuk, > > > > On 2018/2/10 10:52, Chao Yu wrote: > >> On 2018/2/10 9:41, Jaegeuk Kim wrote: > >>> On 02/01, Chao Yu wrote: > >>>> > >>>&g

Re: [f2fs-dev] [PATCH] f2fs: handle quota for orphan inodes

2018-02-27 Thread Jaegeuk Kim
On 02/27, Chao Yu wrote: > Ping, > > On 2018/2/13 22:33, Chao Yu wrote: > > On 2018/2/10 10:28, Jaegeuk Kim wrote: > >> This is to fix missing dquot_initialize for orphan inodes. > > > > IMO, we don't need to call dquot_initialize as we have call the func

Re: [PATCH 1/5 v2] f2fs: add mount option for segment allocation policy

2018-02-27 Thread Jaegeuk Kim
be useful for small-sized eMMC parts. Signed-off-by: Jaegeuk Kim --- Documentation/filesystems/f2fs.txt | 2 ++ fs/f2fs/f2fs.h | 8 fs/f2fs/segment.c | 5 + fs/f2fs/super.c| 24 4 files cha

[PATCH] f2fs: do gc in greedy mode for whole range if gc_urgent mode is set

2018-02-27 Thread Jaegeuk Kim
Otherwise, f2fs conducts GC on 8GB range only based on slow cost-benefit. Signed-off-by: Jaegeuk Kim --- fs/f2fs/gc.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c index bc9420ce2275..bfb7a4a3a929 100644 --- a/fs/f2fs/gc.c +++ b/fs

[PATCH 2/5] f2fs: add auto tuning for small devices

2018-02-26 Thread Jaegeuk Kim
If f2fs is running on top of very small devices, it's worth to avoid abusing free LBAs. In order to achieve that, this patch introduces some parameter tuning. Signed-off-by: Jaegeuk Kim --- fs/f2fs/segment.h | 2 ++ fs/f2fs/super.c | 14 ++ 2 files changed, 16 insertions(+)

[PATCH 1/5] f2fs: add mount option for segment allocation policy

2018-02-26 Thread Jaegeuk Kim
This patch adds an mount option, "alloc_mode=%s" having two options, "default" and "reuse". In "alloc_mode=reuse" case, f2fs starts to allocate segments from 0'th segment all the time to reassign segments. It'd be useful for small-sized eMMC parts

[PATCH 4/5] f2fs: issue discard aggressively in the gc_urgent mode

2018-02-26 Thread Jaegeuk Kim
This patch avoids to skip discard commands when user sets gc_urgent mode. 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 5e5e2936a26a..bda2ad048ea0 100644 --- a/fs/f2fs/segment.c

[PATCH 5/5] f2fs: don't stop GC if GC is contended

2018-02-26 Thread Jaegeuk Kim
Let's do GC as much as possible, while gc_urgent is set. Signed-off-by: Jaegeuk Kim --- fs/f2fs/gc.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c index b9d93fd532a9..bc9420ce2275 100644 --- a/fs/f2fs/gc.c +++ b/fs/f2fs/gc.c @@ -

[PATCH 3/5] f2fs: set readdir_ra by default

2018-02-26 Thread Jaegeuk Kim
It gives general readdir improvement. Signed-off-by: Jaegeuk Kim --- fs/f2fs/super.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index 9515c10eebad..425eb4f6654a 100644 --- a/fs/f2fs/super.c +++ b/fs/f2fs/super.c @@ -1297,6 +1297,7 @@ static void

Re: [PATCH 2/2] f2fs: expose extension_list sysfs entry

2018-02-25 Thread Jaegeuk Kim
On 02/11, Chao Yu wrote: > From: Chao Yu > > This patch adds a sysfs entry 'extension_list' to support lookup/ > add/delete item in extension list. Hi Chao, We need Doc change as well. Thanks, > > Lookup: > cat /sys/fs/f2fs//extentsion_list > > Add: > echo 'extension' > /sys/fs/f2fs//extent

Re: [PATCH v5 02/11] scsi: ufs: sysfs: device descriptor

2018-02-12 Thread Jaegeuk Kim
On 02/12, Stanislav Nijnikov wrote: > > > > -Original Message- > > From: Jaegeuk Kim [mailto:jaeg...@kernel.org] > > Sent: Monday, February 12, 2018 3:08 AM > > To: Stanislav Nijnikov > > Cc: linux-s...@vger.kernel.org; linux-kernel@vger.kernel.org;

Re: [PATCH v5 02/11] scsi: ufs: sysfs: device descriptor

2018-02-11 Thread Jaegeuk Kim
On 02/06, Stanislav Nijnikov wrote: > This patch introduces a sysfs group entry for the UFS device descriptor > parameters. The group adds "device_descriptor" folder under the UFS driver > sysfs entry (/sys/bus/platform/drivers/ufshcd/*). The parameters are shown > as hexadecimal numbers. The full

Re: [PATCH v5 01/11] scsi: ufs: sysfs: attribute group for existing sysfs entries.

2018-02-11 Thread Jaegeuk Kim
On 02/06, Stanislav Nijnikov wrote: > This patch introduces attribute group to show existing sysfs entries. > > Signed-off-by: Stanislav Nijnikov > --- > drivers/scsi/ufs/Makefile| 3 +- > drivers/scsi/ufs/ufs-sysfs.c | 156 > +++ > drivers/scsi/ufs

[PATCH] f2fs: handle quota for orphan inodes

2018-02-09 Thread Jaegeuk Kim
This is to fix missing dquot_initialize for orphan inodes. Signed-off-by: Jaegeuk Kim --- fs/f2fs/checkpoint.c | 28 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c index 8b0945ba284d..e3bf753a47be 100644

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

2018-02-09 Thread Jaegeuk Kim
On 02/01, Chao Yu wrote: > > > On 2018/2/1 6:15, Jaegeuk Kim wrote: > > 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 > >>>

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/

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] 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] 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-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 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: 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] 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: [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

[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: [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 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] 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/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/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-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 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 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 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] 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

[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

[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

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 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 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 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

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] 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 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 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/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 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

[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

[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

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

Re: [PATCH v4] f2fs: check segment type in __f2fs_replace_block

2018-01-03 Thread Jaegeuk Kim
On 01/04, Yunlong Song wrote: > In some case, the node blocks has wrong blkaddr whose segment type is > NODE, e.g., recover inode has missing xattr flag and the blkaddr is in > the xattr range. Since fsck.f2fs does not check the recovery nodes, this > will cause __f2fs_replace_block change the curs

Re: [PATCH v3] f2fs: check segment type in __f2fs_replace_block

2018-01-03 Thread Jaegeuk Kim
On 01/04, Yunlong Song wrote: > In some case, the node blocks has wrong blkaddr whose segment type is > NODE, e.g., recover inode has missing xattr flag and the blkaddr is in > the xattr range. Since fsck.f2fs does not check the recovery nodes, this > will cause __f2fs_replace_block change the curs

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

2018-01-03 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. Signed-off-by: Jaegeuk Kim --- Change log from v1: - handle remount case to limit reserve_root=%u fs/f2fs/f2fs.h | 20 fs/f2fs/su

Re: [PATCH 1/2 v2] f2fs: show precise # of blocks that user/root can use

2018-01-03 Thread Jaegeuk Kim
Let's show precise # of blocks that user/root can use through bavail and bfree respectively. Signed-off-by: Jaegeuk Kim --- Change log from v1: - clean up obsolete values fs/f2fs/super.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/fs/f2fs/super.c b/fs

Re: [PATCH 1/2] f2fs: use flexible array for f2fs_checkpoint::sit_nat_version_bitmap

2018-01-03 Thread Jaegeuk Kim
On 01/04, Chao Yu wrote: > On 2018/1/4 4:12, Jaegeuk Kim wrote: > > On 01/03, Chao Yu wrote: > >> If we need an array with variable size in the end of structure, we > >> can utilize flexible array feature which is supported in C99, so > >> let's change sit_

Re: [f2fs-dev] [PATCH v5] f2fs: add reserved blocks for root user

2018-01-03 Thread Jaegeuk Kim
On 01/04, Chao Yu wrote: > On 2018/1/4 3:06, Jaegeuk Kim wrote: > > On 01/03, Chao Yu wrote: > >> On 2018/1/3 10:21, Jaegeuk Kim wrote: > >>> This patch allows root to reserve some blocks via mount option. > >>> > >>> "-o reserve_root=N&qu

Re: [PATCH 1/2] f2fs: use flexible array for f2fs_checkpoint::sit_nat_version_bitmap

2018-01-03 Thread Jaegeuk Kim
On 01/03, Chao Yu wrote: > If we need an array with variable size in the end of structure, we > can utilize flexible array feature which is supported in C99, so > let's change sit_nat_version_bitmap[] to flexible array in struct > f2fs_checkpoint for readability. > > Signed-off-by: Chao Yu > ---

Re: [PATCH] f2fs: check segment type before recover data

2018-01-03 Thread Jaegeuk Kim
On 12/30, Yunlong Song wrote: > In some case, the node blocks has wrong blkaddr whose segment type is > NODE, e.g., recover inode has missing xattr flag and the blkaddr is in > the xattr range. Since fsck.f2fs does not check the recovery nodes, this > will cause __f2fs_replace_block change the curs

Re: [f2fs-dev] [PATCH v5] f2fs: add reserved blocks for root user

2018-01-03 Thread Jaegeuk Kim
On 01/03, Chao Yu wrote: > On 2018/1/3 10:21, Jaegeuk Kim wrote: > > This patch allows root to reserve some blocks via mount option. > > > > "-o reserve_root=N" means N x 4KB-sized blocks for root only. > > > > Signed-off-by: Jaegeuk Kim > > --

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

2018-01-03 Thread Jaegeuk Kim
On 01/03, Chao Yu wrote: > On 2018/1/3 11:21, Jaegeuk Kim wrote: > > 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. &g

[PATCH 1/2] f2fs: show precise # of blocks that user/root can use

2018-01-03 Thread Jaegeuk Kim
Let's show precise # of blocks that user/root can use through bavail and bfree respectively. Signed-off-by: Jaegeuk Kim --- fs/f2fs/super.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index 0a820ba55b10..4c1c99cf54ef 100644 ---

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

2018-01-03 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. Signed-off-by: Jaegeuk Kim --- fs/f2fs/f2fs.h | 26 ++ fs/f2fs/super.c | 29 ++--- fs/f2fs/sysfs.c | 3 ++

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

2018-01-02 Thread Jaegeuk Kim
On 01/02, Chao Yu wrote: > On 2018/1/1 9:07, Jaegeuk Kim wrote: > > On 12/29, Chao Yu wrote: > >> On 2017/12/28 11:40, Jaegeuk Kim wrote: > >>> This patch gives a flag to disable GC on given file, which would be > >>> useful, when > >>> user

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

2018-01-02 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. Signed-off-by: Jaegeuk Kim --- Change log from v2: - modify ioctl to allow users unpin the file fs/f2fs/data.c | 2

Re: [PATCH v5] f2fs: add reserved blocks for root user

2018-01-02 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. Signed-off-by: Jaegeuk Kim --- Change log from v4: - fix f_bfree in statfs fs/f2fs/f2fs.h | 26 ++ fs/f2fs/su

[PATCH] f2fs: enable quota at remount from r to w

2018-01-02 Thread Jaegeuk Kim
We have to enable quota only when remounting from read to write. Otherwise, we'll get remount failure. (e.g., write to write case) Signed-off-by: Jaegeuk Kim --- fs/f2fs/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c

Re: [PATCH v3 1/9] ufs: sysfs: device descriptor

2018-01-02 Thread Jaegeuk Kim
On 01/02, Stanislav Nijnikov wrote: > > > > -Original Message- > > From: Jaegeuk Kim [mailto:jaeg...@kernel.org] > > Sent: Thursday, December 28, 2017 9:37 PM > > To: Stanislav Nijnikov > > Cc: linux-s...@vger.kernel.org; linux-kernel@vger.kernel

Re: [PATCH v4] f2fs: add reserved blocks for root user

2018-01-02 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. Signed-off-by: Jaegeuk Kim --- Change log from v3: - fix 0.2% calculation - preserve reserve_root=%u from remount_fs fs/f2fs/f2

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