[f2fs-dev] [PATCH] fibmap: include f2fs_fs.h before other header files

2018-02-27 Thread Sheng Yong
GCC 7.2.0 is unhappy with the usage of major/minor: fibmap.c: In function ‘print_stat’: fibmap.c:70:13: warning: In the GNU C Library, "major" is defined by . For historical compatibility, it is currently defined by as well, but we plan to remove this soon. To use "major", include directly.

Re: [f2fs-dev] [PATCH] f2fs: check blkaddr more accuratly before issue a bio

2018-02-27 Thread Chao Yu
On 2018/2/26 20:31, heyunlei wrote: > > >> -Original Message- >> From: heyunlei >> Sent: Monday, February 26, 2018 8:07 PM >> To: jaeg...@kernel.org; linux-f2fs-devel@lists.sourceforge.net; Yuchao (T) >> Cc: Jianing (Euler); Wangbintian; heyunlei >> Subject: [f2fs-dev][PATCH] f2fs: check

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

2018-02-27 Thread Chao Yu
Hi Jaegeuk, On 2018/2/27 1:47, Jaegeuk Kim wrote: > 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

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

2018-02-27 Thread Chao Yu
On 2018/2/27 1:47, Jaegeuk Kim wrote: > 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 Reviewed-by: Chao Yu Thanks, -

Re: [f2fs-dev] [PATCH v3] f2fs: in-memory inode checksum when checking consistency

2018-02-27 Thread Chao Yu
On 2018/2/27 3:28, Weichao Guo wrote: > Enable in-memory inode checksum to protect metadata blocks > from in-memory scribbles only when checking consistency with > no performance requirements. > > Signed-off-by: Weichao Guo Reviewed-by: Chao Yu Thanks, ---

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

2018-02-27 Thread Chao Yu
On 2018/2/27 1:47, Jaegeuk Kim wrote: > Let's do GC as much as possible, while gc_urgent is set. > > Signed-off-by: Jaegeuk Kim Reviewed-by: Chao Yu Thanks, -- Check out the vibrant tech community on one of the world

[f2fs-dev] [PATCH] f2fs: support hot file extension

2018-02-27 Thread Chao Yu
This patch supports to recognize hot file extension in f2fs, so that we can allocate proper hot segment location for its data, which can lead to better hot/cold seperation in filesystem. In addition, we changes a bit on query/add/del operation method for extension_list sysfs entry as below: - Que

Re: [f2fs-dev] [PATCH] f2fs: Reduce zoned block device memory usage

2018-02-27 Thread Damien Le Moal
Christoph, On 2/21/18 11:48, Damien Le Moal wrote: > Christoph, > > On 2/21/18 11:39, Christoph Hellwig wrote: >> On Tue, Feb 20, 2018 at 03:06:10PM +0900, Damien Le Moal wrote: >>> For a zoned block device mount, an array of zone types for the device is >>> allocated and initialized in order to

Re: [f2fs-dev] [PATCH] f2fs: Reduce zoned block device memory usage

2018-02-27 Thread Damien Le Moal
Christoph, On 2/21/18 11:39, Christoph Hellwig wrote: > On Tue, Feb 20, 2018 at 03:06:10PM +0900, Damien Le Moal wrote: >> For a zoned block device mount, an array of zone types for the device is >> allocated and initialized in order to determine if a section is stored >> on a sequential zone (zon

[f2fs-dev] [PATCH v3] f2fs: allocate buffer for decrypting filename to avoid panic

2018-02-27 Thread Yunlong Song
In some platforms (such as arm), high memory is used, then the decrypting filename will cause panic, the reason see commit 569cf1876a32e574ba8a7fb825cd91bafd003882 ("f2fs crypto: allocate buffer for decrypting filename"): We got dentry pages from high_mem, and its address space directly goes into

Re: [f2fs-dev] [PATCH v3] f2fs: allocate buffer for decrypting filename to avoid panic

2018-02-27 Thread Chao Yu
On 2018/2/28 10:19, Yunlong Song wrote: > In some platforms (such as arm), high memory is used, then the > decrypting filename will cause panic, the reason see commit > 569cf1876a32e574ba8a7fb825cd91bafd003882 ("f2fs crypto: allocate buffer > for decrypting filename"): > > We got dentry pages fro

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

2018-02-27 Thread Yunlong Song
This reverts commit e06f86e61d7a67fe6e826010f57aa39c674f4b1b. Conflicts: fs/f2fs/dir.c In some platforms (such as arm), high memory is used, then the decrypting filename will cause panic, the reason see commit 569cf1876a32e574ba8a7fb825cd91bafd003882 ("f2fs crypto: allocate buffer for dec

Re: [f2fs-dev] [PATCH v2] f2fs: introduce "strict_fsync" for posix standard fsync

2018-02-27 Thread Jaegeuk Kim
On 02/13, Chao Yu wrote: > Hi Jaegeuk, > > On 2018/2/12 8:07, Jaegeuk Kim wrote: > > On 02/11, Junling Zheng wrote: > >> Hi, Jaegeuk > >> > >> On 2018/2/10 8:44, Jaegeuk Kim wrote: > >>> On 02/02, Junling Zheng wrote: > Commit "0a007b97aad6"(f2fs: recover directory operations by fsync) >

Re: [f2fs-dev] [PATCH] f2fs: report cp block corrupted & add a backup of cp2

2018-02-27 Thread Jaegeuk Kim
On 02/26, Weichao Guo wrote: > There is a potential inconsistent metadata case due to a cp block > crc invalid in the latest checkpoint caused by hardware issues: > 1) write nodes into segment x; > 2) write checkpoint A; > 3) remove nodes in segment x; > 4) write checkpoint B; > 5) issue discard or

[f2fs-dev] [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/f2

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

2018-02-27 Thread Jaegeuk Kim
Change log from v1: - add doc :) 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. Signed-off-by

Re: [f2fs-dev] [RFC PATCH v2 7/7] fsck.f2fs: reconnect unreachable files to lost+found

2018-02-27 Thread Jaegeuk Kim
On 02/26, Sheng Yong wrote: > Hi, Chao > > On 2018/2/26 16:23, Chao Yu wrote: > > On 2018/2/23 11:18, Sheng Yong wrote: > > > This patch introduces lost_found feature to fsck. If a file is found > > > unreachable by fsck. Fsck tries to reconnect the file to lost+found > > > directory: > > >1.

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 function > > in evict(), right? I think we'd

Re: [f2fs-dev] [RFC PATCH v2 5/7] mkfs.f2fs: create lost+found directory

2018-02-27 Thread Jaegeuk Kim
On 02/23, Sheng Yong wrote: > This patch introduces a new feature F2FS_FEATURE_LOST_FOUND. It can be > switched on by indicating `-O lost_found'. If LOST_FOUND feature is > enabled, an empty directory lost+found is created by mkfs. > > This is a preparation for fsck. During fsck, the directory is

Re: [f2fs-dev] [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: > > > On 2018/2/1 6:15, Jaegeuk Kim wrote: > > On 01/31, Chao Yu wrote: >

Re: [f2fs-dev] [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: [f2fs-dev] [PATCH v3] f2fs: in-memory inode checksum when checking consistency

2018-02-27 Thread Jaegeuk Kim
On 02/27, Chao Yu wrote: > On 2018/2/27 3:28, Weichao Guo wrote: > > Enable in-memory inode checksum to protect metadata blocks > > from in-memory scribbles only when checking consistency with > > no performance requirements. > > > > Signed-off-by: Weichao Guo > > Reviewed-by: Chao Yu This giv

Re: [f2fs-dev] [PATCH] f2fs: Reduce zoned block device memory usage

2018-02-27 Thread Christoph Hellwig
On Tue, Feb 20, 2018 at 03:06:10PM +0900, Damien Le Moal wrote: > For a zoned block device mount, an array of zone types for the device is > allocated and initialized in order to determine if a section is stored > on a sequential zone (zone reset needed) or a conventional zone (no zone > reset need

Re: [f2fs-dev] [PATCH v2] f2fs: introduce "strict_fsync" for posix standard fsync

2018-02-27 Thread Chao Yu
On 2018/2/28 12:49, Jaegeuk Kim wrote: > On 02/13, Chao Yu wrote: >> Hi Jaegeuk, >> >> On 2018/2/12 8:07, Jaegeuk Kim wrote: >>> On 02/11, Junling Zheng wrote: Hi, Jaegeuk On 2018/2/10 8:44, Jaegeuk Kim wrote: > On 02/02, Junling Zheng wrote: >> Commit "0a007b97aad6"(f2fs: re

Re: [f2fs-dev] [PATCH] f2fs: report cp block corrupted & add a backup of cp2

2018-02-27 Thread Chao Yu
Hi Jaegeuk, On 2018/2/28 12:57, Jaegeuk Kim wrote: > On 02/26, Weichao Guo wrote: >> There is a potential inconsistent metadata case due to a cp block >> crc invalid in the latest checkpoint caused by hardware issues: >> 1) write nodes into segment x; >> 2) write checkpoint A; >> 3) remove nodes i