Re: [f2fs-dev] [PATCH v5 3/8] libf2fs_zoned: Introduce f2fs_reset_zone() helper function

2019-10-22 Thread Chao Yu
On 2019/10/18 14:37, Shin'ichiro Kawasaki wrote: > To prepare for write pointer consistency fix by fsck, add > f2fs_reset_zone() helper function which calls RESET ZONE command. The > function is added to lib/libf2fs_zoned which gathers zoned block device > related functions. > > Signed-off-by:

Re: [f2fs-dev] [PATCH v5 6/8] fsck: Check fsync data always for zoned block devices

2019-10-22 Thread Chao Yu
On 2019/10/18 14:37, Shin'ichiro Kawasaki wrote: > Fsck checks fsync data when UMOUNT flag is not set. When the f2fs was not > cleanly unmouted, UMOUNT flag is not recorded in meta data and fsync data > can be left in the f2fs. The first fsck run checks fsync data to reflect > it on quota status

Re: [f2fs-dev] [PATCH v2 0/2] add a new fio cache for IPU.

2019-10-22 Thread Chao Yu
Hi Lihong, On 2019/10/16 18:11, Lihong Kou wrote: > Introdce a new fio cache for IPU. > After commit 8648de2c581(f2fs: add bio cache for IPU) > in the mainline, we still have the problem in SQLite. So I > reuse the fio data structs to cache the mergeale write IO in > wirtepages(). I have

Re: [f2fs-dev] [PATCH v5 4/8] fsck: Find free zones instead of blocks to assign to current segments

2019-10-22 Thread Chao Yu
On 2019/10/18 14:37, Shin'ichiro Kawasaki wrote: > When fsck needs to assign a new area to a curreng segment, it calls > find_next_free_block() function to find a new block to assign. For zoned > block devices, fsck checks write pointer consistency with current > segments' positions. In case a

Re: [PATCH v2] f2fs: fix to avoid memory leakage in f2fs_listxattr

2019-10-22 Thread Chao Yu
On 2019/10/18 14:56, Randall Huang wrote: > In f2fs_listxattr, there is no boundary check before > memcpy e_name to buffer. > If the e_name_len is corrupted, > unexpected memory contents may be returned to the buffer. > > Signed-off-by: Randall Huang Reviewed-by: Chao Yu Thanks,

Re: [f2fs-dev] [PATCH v5 3/8] libf2fs_zoned: Introduce f2fs_reset_zone() helper function

2019-10-22 Thread Chao Yu
On 2019/10/22 17:10, Damien Le Moal wrote: > On 2019/10/22 17:59, Chao Yu wrote: >> On 2019/10/18 14:37, Shin'ichiro Kawasaki wrote: >>> To prepare for write pointer consistency fix by fsck, add >>> f2fs_reset_zone() helper function which calls RESET ZONE command. The >>> function is added to

[PATCH] f2fs: fix wrong description in document

2019-10-22 Thread Chao Yu
As reported in bugzilla, default value of DEF_RAM_THRESHOLD was fixed by commit 29710bcf9426 ("f2fs: fix wrong percentage"), however leaving wrong description in document, fix it. https://bugzilla.kernel.org/show_bug.cgi?id=205203 Signed-off-by: Chao Yu --- Documentation/filesystems/f2fs.txt |

Re: [f2fs-dev] [PATCH 1/3] fscrypt: add support for inline-encryption-optimized policies

2019-10-22 Thread Eric Biggers
On Tue, Oct 22, 2019 at 04:27:12PM +1100, Dave Chinner wrote: > On Mon, Oct 21, 2019 at 04:03:53PM -0700, Eric Biggers wrote: > > From: Eric Biggers > > > > Some inline encryption hardware has only a small number of keyslots, > > which would make it inefficient to use the traditional fscrypt

Re: [f2fs-dev] [PATCH v5 1/8] libf2fs_zoned: Introduce f2fs_report_zones() helper function

2019-10-22 Thread Chao Yu
On 2019/10/18 14:37, Shin'ichiro Kawasaki wrote: > To prepare for write pointer consistency check by fsck, add > f2fs_report_zones() helper function which calls REPORT ZONE command to > get write pointer status. The function is added to lib/libf2fs_zoned > which gathers zoned block device related

[f2fs-dev] [Bug 205203] ram_thresh default (DEF_RAM_THRESHOLD) is wrong (outdated) in f2fs document

2019-10-22 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=205203 Chao Yu (c...@kernel.org) changed: What|Removed |Added Status|NEW |ASSIGNED CC|

Re: [f2fs-dev] [PATCH v5 5/8] fsck: Introduce move_one_curseg_info() function

2019-10-22 Thread Chao Yu
On 2019/10/18 14:37, Shin'ichiro Kawasaki wrote: > When fsck updates one of the current segments, update_curseg_info() is > called specifying a single current segment as its argument. However, > update_curseg_info() calls move_curseg_info() function which updates all > six current segments. Then

Re: [f2fs-dev] [PATCH v5 2/8] libf2fs_zoned: Introduce f2fs_report_zone() helper function

2019-10-22 Thread Chao Yu
On 2019/10/18 14:37, Shin'ichiro Kawasaki wrote: > To prepare for write pointer consistency check by fsck, add > f2fs_report_zone() helper function which calls REPORT ZONE command to > get write pointer status of a single zone. The function is added to > lib/libf2fs_zoned which gathers zoned block

Re: [f2fs-dev] [PATCH v5 3/8] libf2fs_zoned: Introduce f2fs_reset_zone() helper function

2019-10-22 Thread Damien Le Moal
On 2019/10/22 17:59, Chao Yu wrote: > On 2019/10/18 14:37, Shin'ichiro Kawasaki wrote: >> To prepare for write pointer consistency fix by fsck, add >> f2fs_reset_zone() helper function which calls RESET ZONE command. The >> function is added to lib/libf2fs_zoned which gathers zoned block device >>

Re: [f2fs-dev] [PATCH 1/3] fscrypt: add support for inline-encryption-optimized policies

2019-10-22 Thread Theodore Y. Ts'o
On Mon, Oct 21, 2019 at 11:00:04PM -0700, Eric Biggers wrote: > That won't work because we need consecutive file blocks to have consecutive > IVs > as often as possible. The crypto support in the UFS and EMMC standards takes > only a single 64-bit "data unit number" (DUN) per request, which the

Re: [f2fs-dev] [PATCH 2/3] ext4: add support for INLINE_CRYPT_OPTIMIZED encryption policies

2019-10-22 Thread Theodore Y. Ts'o
On Mon, Oct 21, 2019 at 04:03:54PM -0700, Eric Biggers wrote: > From: Eric Biggers > > INLINE_CRYPT_OPTIMIZED encryption policies have special requirements > from the filesystem: > > - Inode numbers must never change, even if the filesystem is resized > - Inode numbers must be <= 32 bits > -

[f2fs-dev] [PATCH v14 1/5] Add flags option to get xattr method paired to __vfs_getxattr

2019-10-22 Thread Mark Salyzyn via Linux-f2fs-devel
Replace arguments for get and set xattr methods, and __vfs_getxattr and __vfs_setaxtr functions with a reference to the following now common argument structure: struct xattr_gs_args { struct dentry *dentry; struct inode *inode; const char *name; union {

Re: [f2fs-dev] [PATCH 1/3] fscrypt: add support for inline-encryption-optimized policies

2019-10-22 Thread Eric Biggers
On Tue, Oct 22, 2019 at 09:30:01AM -0400, Theodore Y. Ts'o wrote: > > An alternative which would work nicely on ext4 and xfs (if xfs supported > > fscrypt) would be to pass the physical block number as the DUN. However, > > that > > wouldn't work at all on f2fs because f2fs moves data blocks

Re: [f2fs-dev] [PATCH 3/3] f2fs: add support for INLINE_CRYPT_OPTIMIZED encryption policies

2019-10-22 Thread Jaegeuk Kim
On 10/21, Eric Biggers wrote: > From: Eric Biggers > > f2fs inode numbers are stable across filesystem resizing, and f2fs inode > and file logical block numbers are always 32-bit. So f2fs can always > support INLINE_CRYPT_OPTIMIZED encryption policies. Wire up the needed > fscrypt_operations

Re: [f2fs-dev] [PATCH v5 6/8] fsck: Check fsync data always for zoned block devices

2019-10-22 Thread Jaegeuk Kim
On 10/22, Chao Yu wrote: > On 2019/10/18 14:37, Shin'ichiro Kawasaki wrote: > > Fsck checks fsync data when UMOUNT flag is not set. When the f2fs was not > > cleanly unmouted, UMOUNT flag is not recorded in meta data and fsync data > > can be left in the f2fs. The first fsck run checks fsync data

Re: [f2fs-dev] [PATCH 2/3] ext4: add support for INLINE_CRYPT_OPTIMIZED encryption policies

2019-10-22 Thread Eric Biggers
On Tue, Oct 22, 2019 at 09:37:16AM -0400, Theodore Y. Ts'o wrote: > On Mon, Oct 21, 2019 at 04:03:54PM -0700, Eric Biggers wrote: > > From: Eric Biggers > > > > INLINE_CRYPT_OPTIMIZED encryption policies have special requirements > > from the filesystem: > > > > - Inode numbers must never

[f2fs-dev] [PATCH 2/2] f2fs: support data compression

2019-10-22 Thread Jaegeuk Kim
From: Chao Yu This patch tries to support compression in f2fs. - New term named cluster is defined as basic unit of compression, file can be divided into multiple clusters logically. One cluster includes 4 << n (n >= 0) logical pages, compression size is also cluster size, each of cluster can

[f2fs-dev] [PATCH 1/2] f2fs: support aligned pinned file

2019-10-22 Thread Jaegeuk Kim
This patch supports 2MB-aligned pinned file, which can guarantee no GC at all by allocating fully valid 2MB segment. Signed-off-by: Jaegeuk Kim --- fs/f2fs/f2fs.h | 4 +++- fs/f2fs/file.c | 39 ++- fs/f2fs/recovery.c | 2 +- fs/f2fs/segment.c | 21

Re: [f2fs-dev] [PATCH 2/2] f2fs: support data compression

2019-10-22 Thread Ju Hyung Park
Hi Jaegeuk and Chao, Nice to see this finally getting into shape :) Great work I'm excited to see possible use-cases for this in the future. Would f2fs compress files automatically like how btrfs' "compress" option works? Or is it per-extension basis for now? On Wed, Oct 23, 2019 at 2:16 AM

Re: [f2fs-dev] [PATCH v5 3/8] libf2fs_zoned: Introduce f2fs_reset_zone() helper function

2019-10-22 Thread Shinichiro Kawasaki
On Oct 22, 2019 / 17:24, Chao Yu wrote: > On 2019/10/22 17:10, Damien Le Moal wrote: > > On 2019/10/22 17:59, Chao Yu wrote: > >> On 2019/10/18 14:37, Shin'ichiro Kawasaki wrote: > >>> To prepare for write pointer consistency fix by fsck, add > >>> f2fs_reset_zone() helper function which calls

Re: [PATCH 2/2] f2fs: support data compression

2019-10-22 Thread Eric Biggers
On Tue, Oct 22, 2019 at 10:16:02AM -0700, Jaegeuk Kim wrote: > From: Chao Yu > > This patch tries to support compression in f2fs. > > - New term named cluster is defined as basic unit of compression, file can > be divided into multiple clusters logically. One cluster includes 4 << n > (n >= 0)