Re: [f2fs-dev] [PATCH V6 0/4] Fix zone revalidation memory allocation failures

2019-07-11 Thread Jens Axboe
On 7/7/19 8:02 PM, Damien Le Moal wrote: > On 2019/07/01 14:09, Damien Le Moal wrote: >> This series addresses a recuring problem with zone revalidation >> failures observed during extensive testing with memory constrained >> system and device hot-plugging. > > Jens, Martin, > > Any comment regar

Re: [f2fs-dev] [PATCH V6 3/4] sd_zbc: Fix report zones buffer allocation

2019-07-11 Thread Damien Le Moal
Martin, On 2019/07/12 9:28, Martin K. Petersen wrote: > > Damien, > >> During disk scan and revalidation done with sd_revalidate(), the zones >> of a zoned disk are checked using the helper function >> blk_revalidate_disk_zones() if a configuration change is detected >> (change in the number of

Re: [f2fs-dev] [PATCH V6 4/4] block: Limit zone array allocation size

2019-07-11 Thread Martin K. Petersen
Damien, > Limit the size of the struct blk_zone array used in > blk_revalidate_disk_zones() to avoid memory allocation failures > leading to disk revalidation failure. Also further reduce the > likelyhood of such failures by using kvcalloc() (that is vmalloc()) > instead of allocating contiguous

Re: [f2fs-dev] [PATCH V6 3/4] sd_zbc: Fix report zones buffer allocation

2019-07-11 Thread Martin K. Petersen
Damien, > During disk scan and revalidation done with sd_revalidate(), the zones > of a zoned disk are checked using the helper function > blk_revalidate_disk_zones() if a configuration change is detected > (change in the number of zones or zone size). The function > blk_revalidate_disk_zones()

Re: [f2fs-dev] [PATCH V6 2/4] block: Kill gfp_t argument of blkdev_report_zones()

2019-07-11 Thread Martin K. Petersen
Damien, > Only GFP_KERNEL and GFP_NOIO are used with blkdev_report_zones(). In > preparation of using vmalloc() for large report buffer and zone array > allocations used by this function, remove its "gfp_t gfp_mask" argument > and rely on the caller context to use memalloc_noio_save/restore() wh

Re: [f2fs-dev] [PATCH V6 1/4] block: Allow mapping of vmalloc-ed buffers

2019-07-11 Thread Martin K. Petersen
Damien, > To allow the SCSI subsystem scsi_execute_req() function to issue > requests using large buffers that are better allocated with vmalloc() > rather than kmalloc(), modify bio_map_kern() to allow passing a buffer > allocated with vmalloc(). Looks good to me. Reviewed-by: Martin K. Peter

[f2fs-dev] [PATCH 2/2] f2fs: Support case-insensitive file name lookups

2019-07-11 Thread Daniel Rosenberg via Linux-f2fs-devel
Modeled after commit b886ee3e778e ("ext4: Support case-insensitive file name lookups") """ This patch implements the actual support for case-insensitive file name lookups in f2fs, based on the feature bit and the encoding stored in the superblock. A filesystem that has the casefold feature set is

[f2fs-dev] [PATCH 1/2] f2fs: include charset encoding information in the superblock

2019-07-11 Thread Daniel Rosenberg via Linux-f2fs-devel
Add charset encoding to f2fs to support casefolding. It is modeled after the same feature introduced in commit c83ad55eaa91 ("ext4: include charset encoding information in the superblock") Currently this is not compatible with encryption, similar to the current ext4 imlpementation. This will chang

[f2fs-dev] [GIT PULL] f2fs for 5.3

2019-07-11 Thread Jaegeuk Kim
Hi Linus, Could you please consider this pull request? Thanks, The following changes since commit e0654264c4806dc436b291294a0fbf9be7571ab6: Merge tag 'backlight-next-5.2' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight (2019-05-14 10:45:03 -0700) are available in the Git rep

Re: [f2fs-dev] [PATCH] f2fs: use kmem_cache pool during xattr lookups

2019-07-11 Thread Jaegeuk Kim
On 07/12, Ju Hyung Park wrote: > Hi everyone. > > This is a RFC patch. > > This patch introduces an even bigger problem, which is forcing all > xattr lookup memory allocations to be made in 4076B, when in reality, > 4076B allocations are only made during initial mounts and the rests > are made in

Re: [f2fs-dev] [PATCH] f2fs: use kmem_cache pool during xattr lookups

2019-07-11 Thread Ju Hyung Park
Hi everyone. This is a RFC patch. This patch introduces an even bigger problem, which is forcing all xattr lookup memory allocations to be made in 4076B, when in reality, 4076B allocations are only made during initial mounts and the rests are made in 204B, unnecessarily wasting memory. In my tes

[f2fs-dev] [PATCH] f2fs: use kmem_cache pool during xattr lookups

2019-07-11 Thread Park Ju Hyung
It's been observed that kzalloc() on lookup_all_xattrs() are called millions of times on Android, quickly becoming the top abuser of slub memory allocator. Use a dedicated kmem cache pool for xattr lookups to mitigate this. Signed-off-by: Park Ju Hyung --- fs/f2fs/f2fs.h | 6 ++ fs/f2fs/s

[f2fs-dev] [Bug 204137] New: F2FS: kernel BUG at fs/f2fs/segment.c:2375!

2019-07-11 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=204137 Bug ID: 204137 Summary: F2FS: kernel BUG at fs/f2fs/segment.c:2375! Product: File System Version: 2.5 Kernel Version: 5.1.3 Hardware: All OS: Linux Tree: Main

[f2fs-dev] [Bug 204043] F2fs kernel BUG at fs/f2fs/data.c:317!

2019-07-11 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=204043 --- Comment #3 from Chao Yu (c...@kernel.org) --- Could you help to test below two commits? f2fs: introduce {page,io}_is_mergeable() for readability f2fs: fix panic of IO alignment feature https://lore.kernel.org/linux-f2fs-devel/1562841517-7791

[PATCH 1/2] f2fs: introduce {page,io}_is_mergeable() for readability

2019-07-11 Thread Chao Yu
Wrap merge condition into function for readability, no logic change. Signed-off-by: Chao Yu --- fs/f2fs/data.c | 42 +++--- 1 file changed, 35 insertions(+), 7 deletions(-) diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index 6a8db4a..bdfd8fb 100644 --- a/fs/f2

[PATCH 2/2] f2fs: fix panic of IO alignment feature

2019-07-11 Thread Chao Yu
Since 07173c3ec276 ("block: enable multipage bvecs"), one bio vector can store multi pages, so that we can not calculate max IO size of bio as PAGE_SIZE * bio->bi_max_vecs. However IO alignment feature of f2fs always has that assumption, so finally, it may cause panic during IO submission as below

[f2fs-dev] [Bug 204135] New: F2FS: BUG: KASAN: null-ptr-deref in mempool_alloc+0xd8/0x2e0

2019-07-11 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=204135 Bug ID: 204135 Summary: F2FS: BUG: KASAN: null-ptr-deref in mempool_alloc+0xd8/0x2e0 Product: File System Version: 2.5 Kernel Version: 5.1.3 Hardware: All