Re: [f2fs-dev] [PATCH -next] f2fs: remove set but not used variable 'cs_block'
On 2019/12/26 11:44, Chao Yu wrote: > On 2019/12/24 20:43, YueHaibing wrote: >> fs/f2fs/segment.c: In function fix_curseg_write_pointer: >> fs/f2fs/segment.c:4485:35: warning: variable cs_block set but not used >> [-Wunused-but-set-variable] >> >> It is never used since commit 362d8a920384 ("f2fs: Check >> write pointer consistency of open zones") , so remove it. > > Thanks for the fix! > > Do you mind merging this patch to original patch? as it's still > pending in dev branch. It's ok for me. > > Thanks, > >> >> Reported-by: Hulk Robot >> Signed-off-by: YueHaibing >> --- >> fs/f2fs/segment.c | 3 +-- >> 1 file changed, 1 insertion(+), 2 deletions(-) >> >> diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c >> index a951953..72cf257 100644 >> --- a/fs/f2fs/segment.c >> +++ b/fs/f2fs/segment.c >> @@ -4482,14 +4482,13 @@ static int fix_curseg_write_pointer(struct >> f2fs_sb_info *sbi, int type) >> struct f2fs_dev_info *zbd; >> struct blk_zone zone; >> unsigned int cs_section, wp_segno, wp_blkoff, wp_sector_off; >> -block_t cs_zone_block, wp_block, cs_block; >> +block_t cs_zone_block, wp_block; >> unsigned int log_sectors_per_block = sbi->log_blocksize - SECTOR_SHIFT; >> sector_t zone_sector; >> int err; >> >> cs_section = GET_SEC_FROM_SEG(sbi, cs->segno); >> cs_zone_block = START_BLOCK(sbi, GET_SEG_FROM_SEC(sbi, cs_section)); >> -cs_block = START_BLOCK(sbi, cs->segno) + cs->next_blkoff; >> >> zbd = get_target_zoned_dev(sbi, cs_zone_block); >> if (!zbd) >> > > . > ___ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
Re: [f2fs-dev] [PATCH -next] f2fs: remove set but not used variable 'cs_block'
On 2019/12/24 20:43, YueHaibing wrote: > fs/f2fs/segment.c: In function fix_curseg_write_pointer: > fs/f2fs/segment.c:4485:35: warning: variable cs_block set but not used > [-Wunused-but-set-variable] > > It is never used since commit 362d8a920384 ("f2fs: Check > write pointer consistency of open zones") , so remove it. Thanks for the fix! Do you mind merging this patch to original patch? as it's still pending in dev branch. Thanks, > > Reported-by: Hulk Robot > Signed-off-by: YueHaibing > --- > fs/f2fs/segment.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c > index a951953..72cf257 100644 > --- a/fs/f2fs/segment.c > +++ b/fs/f2fs/segment.c > @@ -4482,14 +4482,13 @@ static int fix_curseg_write_pointer(struct > f2fs_sb_info *sbi, int type) > struct f2fs_dev_info *zbd; > struct blk_zone zone; > unsigned int cs_section, wp_segno, wp_blkoff, wp_sector_off; > - block_t cs_zone_block, wp_block, cs_block; > + block_t cs_zone_block, wp_block; > unsigned int log_sectors_per_block = sbi->log_blocksize - SECTOR_SHIFT; > sector_t zone_sector; > int err; > > cs_section = GET_SEC_FROM_SEG(sbi, cs->segno); > cs_zone_block = START_BLOCK(sbi, GET_SEG_FROM_SEC(sbi, cs_section)); > - cs_block = START_BLOCK(sbi, cs->segno) + cs->next_blkoff; > > zbd = get_target_zoned_dev(sbi, cs_zone_block); > if (!zbd) > ___ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
Re: [f2fs-dev] [PATCH] f2fs: introduce DEFAULT_IO_TIMEOUT_JIFFIES
On 2019/12/23 16:41, Geert Uytterhoeven wrote: > Hi, > > CC linux-fsdevel > > On Mon, Dec 23, 2019 at 5:01 AM Chao Yu wrote: >> As Geert Uytterhoeven reported: >> >> for parameter HZ/50 in congestion_wait(BLK_RW_ASYNC, HZ/50); >> >> On some platforms, HZ can be less than 50, then unexpected 0 timeout >> jiffies will be set in congestion_wait(). >> >> This patch introduces a macro DEFAULT_IO_TIMEOUT_JIFFIES to limit >> mininum value of timeout jiffies. >> >> Signed-off-by: Chao Yu > > Thanks for your patch! > >> --- >> fs/f2fs/compress.c | 3 ++- >> fs/f2fs/data.c | 5 +++-- >> fs/f2fs/f2fs.h | 2 ++ >> fs/f2fs/gc.c | 3 ++- >> fs/f2fs/inode.c| 3 ++- >> fs/f2fs/node.c | 3 ++- >> fs/f2fs/recovery.c | 6 -- >> fs/f2fs/segment.c | 12 >> fs/f2fs/super.c| 6 -- >> 9 files changed, 29 insertions(+), 14 deletions(-) >> >> diff --git a/fs/f2fs/compress.c b/fs/f2fs/compress.c >> index 1bc86a54ad71..ee4fe8e644aa 100644 >> --- a/fs/f2fs/compress.c >> +++ b/fs/f2fs/compress.c >> @@ -945,7 +945,8 @@ static int f2fs_write_raw_pages(struct compress_ctx *cc, >> } else if (ret == -EAGAIN) { >> ret = 0; >> cond_resched(); >> - congestion_wait(BLK_RW_ASYNC, HZ/50); >> + congestion_wait(BLK_RW_ASYNC, >> + DEFAULT_IO_TIMEOUT_JIFFIES); >> lock_page(cc->rpages[i]); >> clear_page_dirty_for_io(cc->rpages[i]); >> goto retry_write; >> diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c >> index f1f5c701228d..78b5c0b0287e 100644 >> --- a/fs/f2fs/data.c >> +++ b/fs/f2fs/data.c >> @@ -2320,7 +2320,8 @@ int f2fs_encrypt_one_page(struct f2fs_io_info *fio) >> /* flush pending IOs and wait for a while in the ENOMEM case >> */ >> if (PTR_ERR(fio->encrypted_page) == -ENOMEM) { >> f2fs_flush_merged_writes(fio->sbi); >> - congestion_wait(BLK_RW_ASYNC, HZ/50); >> + congestion_wait(BLK_RW_ASYNC, >> + DEFAULT_IO_TIMEOUT_JIFFIES); >> gfp_flags |= __GFP_NOFAIL; >> goto retry_encrypt; >> } >> @@ -2900,7 +2901,7 @@ static int f2fs_write_cache_pages(struct address_space >> *mapping, >> if (wbc->sync_mode == WB_SYNC_ALL) { >> cond_resched(); >> congestion_wait(BLK_RW_ASYNC, >> - HZ/50); >> + >> DEFAULT_IO_TIMEOUT_JIFFIES); >> goto retry_write; >> } >> goto next; >> diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h >> index 16edbf4e05e8..4bdc20a94185 100644 >> --- a/fs/f2fs/f2fs.h >> +++ b/fs/f2fs/f2fs.h >> @@ -559,6 +559,8 @@ enum { >> >> #define DEFAULT_RETRY_IO_COUNT 8 /* maximum retry read IO count */ >> >> +#defineDEFAULT_IO_TIMEOUT_JIFFIES (max_t(long, HZ/50, 1)) >> + >> /* maximum retry quota flush count */ >> #define DEFAULT_RETRY_QUOTA_FLUSH_COUNT8 >> > > Seeing other file systems (ext4, xfs) and even core MM code suffers from > the same issue, perhaps it makes sense to move this into congestion_wait(), > i.e. increase the timeout to 1 if it's zero in the latter function? Yup, maybe I can submit a RFC patch to change congestion_wait(), before that we still need this f2fs change. Thanks, > > Gr{oetje,eeting}s, > > Geert > ___ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
[f2fs-dev] [Bug 205967] [bisected] f2fs compression support breaks build
https://bugzilla.kernel.org/show_bug.cgi?id=205967 --- Comment #1 from Chao Yu (c...@kernel.org) --- We have fixed this issue, could you please check commit in last dev branch? https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs.git/log/?h=dev -- You are receiving this mail because: You are watching the assignee of the bug. ___ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
[f2fs-dev] [Bug 205203] ram_thresh default (DEF_RAM_THRESHOLD) is wrong (outdated) in f2fs document
https://bugzilla.kernel.org/show_bug.cgi?id=205203 Chao Yu (c...@kernel.org) changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|--- |CODE_FIX --- Comment #2 from Chao Yu (c...@kernel.org) --- https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=4c3258b9b0fff24623a6e95381e1112cc290abd4 -- You are receiving this mail because: You are watching the assignee of the bug. ___ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
Re: [f2fs-dev] f2fs compile problem in next-20191220 on x86-32
On 2019/12/25 21:04, Pavel Machek wrote: > On Sun 2019-12-22 16:49:17, Pavel Machek wrote: >> Hi! >> >> I'm getting this: >> >> LD .tmp_vmlinux1 >> ld: fs/f2fs/file.o: in function `f2fs_truncate_blocks': >> file.c:(.text+0x2968): undefined reference to `__udivdi3' >> make: *** [Makefile:1079: vmlinux] Error 1 >> >> when attempting to compile kernel for x86-32. > > David bisected it: > > https://bugzilla.kernel.org/show_bug.cgi?id=205967 > > And the bug is actually easy to see: > > +int f2fs_truncate_blocks(struct inode *inode, u64 from, bool lock) > +{ > + u64 free_from = from; > + > + /* > +* for compressed file, only support cluster size > +* aligned truncation. > +*/ > + if (f2fs_compressed_file(inode)) { > + size_t cluster_size = PAGE_SIZE << > + F2FS_I(inode)->i_log_cluster_size; > + > + free_from = roundup(from, cluster_size); > > #define roundup(x, y) ( \ > { \ > typeof(y) __y = y; \ > (((x) + (__y - 1)) / __y) * __y;\ > } \ > > div64 is needed instead of div in the roundup macro. Or actually... It > is quite stupid to use roundup like this on value that is power of > two, right? This has been fixed in dev branch, could you check that? People still saw this issue because linux-next did not update after we fix this bug. https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs.git/commit/?h=dev Thanks, > > Best regards, > Pavel > ___ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
[f2fs-dev] [Bug 205967] New: [bisected] f2fs compression support breaks build
https://bugzilla.kernel.org/show_bug.cgi?id=205967 Bug ID: 205967 Summary: [bisected] f2fs compression support breaks build Product: File System Version: 2.5 Kernel Version: 5.5.0-rc2-next Hardware: All OS: Linux Tree: Mainline Status: NEW Severity: normal Priority: P1 Component: f2fs Assignee: filesystem_f...@kernel-bugs.kernel.org Reporter: da...@ixit.cz Regression: No commit: 25d18e19a91e60837d36368ee939db13fd16dc64 breaks build for me (armv6): /usr/bin/armv6-alpine-linux-musleabihf-ld: fs/f2fs/file.o: in function `f2fs_truncate_blocks': /mnt/linux/.output/../fs/f2fs/file.c:738: undefined reference to `__aeabi_uldivmod' make[1]: *** [/mnt/linux/Makefile:1079: vmlinux] Error 1 and Pavel Machek (x86-32) [1]: LD .tmp_vmlinux1 ld: fs/f2fs/file.o: in function `f2fs_truncate_blocks': file.c:(.text+0x2968): undefined reference to `__udivdi3' make: *** [Makefile:1079: vmlinux] Error 1 [1] https://lkml.org/lkml/fancy/2019/12/22/48 -- You are receiving this mail because: You are watching the assignee of the bug. ___ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
Re: [f2fs-dev] [PATCH] f2fs: introduce DEFAULT_IO_TIMEOUT_JIFFIES
On Mon, 2019-12-23 at 09:41 +0100, Geert Uytterhoeven wrote: > Hi, > > CC linux-fsdevel > > On Mon, Dec 23, 2019 at 5:01 AM Chao Yu wrote: > > As Geert Uytterhoeven reported: > > > > for parameter HZ/50 in congestion_wait(BLK_RW_ASYNC, HZ/50); > > > > On some platforms, HZ can be less than 50, then unexpected 0 > > timeout > > jiffies will be set in congestion_wait(). > > It looks like that HZ could have various value on diferent platforms. So, why does it need to divide HZ on 50? Does it really necessary? Could it be used HZ only without the division operation? Thanks, Viacheslav Dubeyko. ___ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel