Re: [f2fs-dev] [PATCH 1/1] fsck.f2fs: allow to fix inconsistency from online resize

2019-07-02 Thread Chao Yu
On 2019/7/2 15:42, sunqiuyang wrote: > From: Qiuyang Sun > > During F2FS online resize, if panic or poweroff happens when the new SB > has been committed but not the new CP, the FS may end up with an > inconsistent state, where user_block_count and free_segment_count in CP > can be larger than a

Re: [f2fs-dev] about patch <-f2fs-run-discard-jobs-when-put_super>

2019-07-02 Thread Chao Yu
Hi Xiao, There are several issues: - miss patch title - miss Signed-off - don't need to attach all commit message from old flawed patch Anyway, I've send one patch for you to fix all above issues. :) Thanks, On 2019/7/2 20:34, 肖衡 (Heng Xiao) wrote: > From 35f7e2f6b1b39e6b1704567c27c8cacdd836e8f

[PATCH] f2fs: fix to avoid long latency during umount

2019-07-02 Thread Chao Yu
From: Heng Xiao In umount, we give an constand time to handle pending discard, previously, in __issue_discard_cmd() we missed to check timeout condition in loop, result in delaying long time, fix it. Signed-off-by: Heng Xiao [Chao Yu: add commit message] Signed-off-by: Chao Yu --- fs/f2fs/seg

Re: [PATCH v2] f2fs: avoid out-of-range memory access

2019-07-02 Thread Chao Yu
Hi Ocean, If filesystem is corrupted, it should fail mount due to below check in f2fs_sanity_check_ckpt(), so we are safe in read_compacted_summaries() to access entries[0,blk_off], right? for (i = 0; i < NR_CURSEG_DATA_TYPE; i++) { if (le32_to_cpu(ckpt->cur_data_segno[i])

Re: [f2fs-dev] [PATCH 2/3] f2fs: use generic checking function for FS_IOC_FSSETXATTR

2019-07-02 Thread Chao Yu
On 2019/7/2 4:26, Eric Biggers wrote: > From: Eric Biggers > > Make the f2fs implementation of FS_IOC_FSSETXATTR use the new VFS helper > function vfs_ioc_fssetxattr_check(), and remove the project quota check > since it's now done by the helper function. > > This is based on a patch from Darric

Re: [f2fs-dev] [PATCH 3/3] f2fs: remove redundant check from f2fs_setflags_common()

2019-07-02 Thread Chao Yu
On 2019/7/2 4:26, Eric Biggers wrote: > From: Eric Biggers > > Now that f2fs_ioc_setflags() and f2fs_ioc_fssetxattr() call the VFS > helper functions which check for permission to change the immutable and > append-only flags, it's no longer needed to do this check in > f2fs_setflags_common() too.

Re: [f2fs-dev] [PATCH 1/3] f2fs: use generic checking and prep function for FS_IOC_SETFLAGS

2019-07-02 Thread Chao Yu
On 2019/7/2 4:26, Eric Biggers wrote: > From: Eric Biggers > > Make the f2fs implementation of FS_IOC_SETFLAGS use the new VFS helper > function vfs_ioc_setflags_prepare(). > > This is based on a patch from Darrick Wong, but reworked to apply after > commit 360985573b55 ("f2fs: separate f2fs i_f

Re: [f2fs-dev] [PATCH v6 17/17] f2fs: add fs-verity support

2019-07-02 Thread Chao Yu
On 2019/7/1 23:32, Eric Biggers wrote: > From: Eric Biggers > > Add fs-verity support to f2fs. fs-verity is a filesystem feature that > enables transparent integrity protection and authentication of read-only > files. It uses a dm-verity like mechanism at the file level: a Merkle > tree is used

Re: [f2fs-dev] [PATCH] f2fs: use multiplication instead of division in sanity_check_raw_super

2019-07-02 Thread fishland via Linux-f2fs-devel
Hi Chao, Thanks for your reply, I understand why there can't use multiplication, thanks a lot :D Best regards Liu Song >Hi Song, > >On 2019-7-1 21:38, Liu Song via Linux-f2fs-devel wrote: >> From: Liu Song >> >> Use multiplication instead of division and be more >> consistent with f2fs_msg ou

Re: [f2fs-dev] about patch <-f2fs-run-discard-jobs-when-put_super>

2019-07-02 Thread Heng Xiao
From 35f7e2f6b1b39e6b1704567c27c8cacdd836e8ff Mon Sep 17 00:00:00 2001 From: Jaegeuk Kim Date: Mon, 14 Jan 2019 10:42:11 -0800 Subject: [PATCH] f2fs: run discard jobs when put_super When we umount f2fs, we need to avoid long delay due to discard commands, which is actually taking tens of seconds,

Re: [f2fs-dev] [PATCH v2 4/4] vfs: don't allow most setxattr to immutable files

2019-07-02 Thread Amir Goldstein
On Mon, Jul 1, 2019 at 7:31 PM Darrick J. Wong wrote: > > From: Darrick J. Wong > > The chattr manpage has this to say about immutable files: > > "A file with the 'i' attribute cannot be modified: it cannot be deleted > or renamed, no link can be created to this file, most of the file's > metadat

[f2fs-dev] Is F2FS (Samsung's Flash-Friendly File System) faster than EXT4 for Android 9.0 (Pie) and Android 10.0 Smartphones?

2019-07-02 Thread Turritopsis Dohrnii Teo En Ming
Good afternoon from Singapore, Is F2FS (Samsung's Flash-Friendly File System) faster than EXT4 for Android 9.0 (Pie) and Android 10.0 Smartphones? Android 9.0 (Pie) has Linux kernel versions 4.4.107, 4.9.84, and 4.14.42, and was initially released on 6 August 2018. Android "Q" or Android 10.0

[f2fs-dev] [PATCH v2] f2fs: avoid out-of-range memory access

2019-07-02 Thread Ocean Chen via Linux-f2fs-devel
blk_off might over 512 due to fs corrupt. Use ENTRIES_IN_SUM to protect invalid memory access. v2: - fix typo Signed-off-by: Ocean Chen --- fs/f2fs/segment.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index 8dee063c833f..a5e8af0bd62e 100644 --- a/

[f2fs-dev] [PATCH 1/1] fsck.f2fs: allow to fix inconsistency from online resize

2019-07-02 Thread sunqiuyang
From: Qiuyang Sun During F2FS online resize, if panic or poweroff happens when the new SB has been committed but not the new CP, the FS may end up with an inconsistent state, where user_block_count and free_segment_count in CP can be larger than allowed by the new SB. This patch allows fsck.f2f

[PATCH] f2fs: avoid out-of-range memory access

2019-07-02 Thread Ocean Chen
blk_off might over 512 due to fs corrupt. Use ENTRIES_IN_SUM to protect invalid memory access. Signed-off-by: Ocean Chen --- fs/f2fs/segment.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index 8dee063c833f..b83c23ebae1f 100644 --- a/fs/f2fs/segment