Re: [f2fs-dev] [PATCH v2] f2fs: fix get_blocktype_secs bug when segs_per_sec is larger than 1
On 2018/10/30 20:46, Yunlong Song wrote: > f2fs_need_SSR uses get_blocktype_secs to calculate needed dirty > sections, however, for the case segs_per_sec > 1, when needed segs are > smaller than segs_per_sec, it will just return 0, so fix it. > > Signed-off-by: Yunlong Song > --- > fs/f2fs/f2fs.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h > index 56204a8..ef41ea2 100644 > --- a/fs/f2fs/f2fs.h > +++ b/fs/f2fs/f2fs.h > @@ -1842,7 +1842,7 @@ static inline int get_blocktype_secs(struct > f2fs_sb_info *sbi, int block_type) > unsigned int segs = (get_pages(sbi, block_type) + pages_per_sec - 1) >> > sbi->log_blocks_per_seg; > > - return segs / sbi->segs_per_sec; > + return (segs + sbi->segs_per_sec - 1) / sbi->segs_per_sec; roundup(segs, sbi->segs_per_sec)? Thanks, > } > > static inline block_t valid_user_blocks(struct f2fs_sb_info *sbi) > ___ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
Re: [f2fs-dev] [PATCH v2] f2fs: change segment to section in f2fs_ioc_gc_range
On 2018/10/30 20:37, Yunlong Song wrote: > f2fs_ioc_gc_range skips blocks_per_seg each time, however, f2fs_gc moves > blocks of section each time, so fix it from segment to section. > > Signed-off-by: Yunlong Song Reviewed-by: Chao Yu Thanks, ___ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
[f2fs-dev] [Bug 201555] [f2fs] Processes freezing periodically with f2fs root
https://bugzilla.kernel.org/show_bug.cgi?id=201555 Chao Yu (c...@kernel.org) changed: What|Removed |Added CC||c...@kernel.org --- Comment #1 from Chao Yu (c...@kernel.org) --- Hi, Could you please have a try with last f2fs in below dev branch? https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs.git/log/?h=dev And could you attach entire dmesg file? -- 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] [PATCH v2] f2fs: fix get_blocktype_secs bug when segs_per_sec is larger than 1
f2fs_need_SSR uses get_blocktype_secs to calculate needed dirty sections, however, for the case segs_per_sec > 1, when needed segs are smaller than segs_per_sec, it will just return 0, so fix it. Signed-off-by: Yunlong Song --- fs/f2fs/f2fs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index 56204a8..ef41ea2 100644 --- a/fs/f2fs/f2fs.h +++ b/fs/f2fs/f2fs.h @@ -1842,7 +1842,7 @@ static inline int get_blocktype_secs(struct f2fs_sb_info *sbi, int block_type) unsigned int segs = (get_pages(sbi, block_type) + pages_per_sec - 1) >> sbi->log_blocks_per_seg; - return segs / sbi->segs_per_sec; + return (segs + sbi->segs_per_sec - 1) / sbi->segs_per_sec; } static inline block_t valid_user_blocks(struct f2fs_sb_info *sbi) -- 1.8.5.2 ___ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
[f2fs-dev] [PATCH v2] f2fs: change segment to section in f2fs_ioc_gc_range
f2fs_ioc_gc_range skips blocks_per_seg each time, however, f2fs_gc moves blocks of section each time, so fix it from segment to section. Signed-off-by: Yunlong Song --- fs/f2fs/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index 88b1246..f981b6c 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c @@ -2155,7 +2155,7 @@ static int f2fs_ioc_gc_range(struct file *filp, unsigned long arg) } ret = f2fs_gc(sbi, range.sync, true, GET_SEGNO(sbi, range.start)); - range.start += sbi->blocks_per_seg; + range.start += BLKS_PER_SEC(sbi); if (range.start <= end) goto do_more; out: -- 1.8.5.2 ___ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
[f2fs-dev] [PATCH] f2fs: fix get_blocktype_secs bug when segs_per_sec is larger than 1
f2fs_need_SSR uses get_blocktype_secs to calculate needed dirty sections, however, for the case segs_per_sec > 1, when needed segs are smaller than segs_per_sec, it will just return 0, so fix it. Signed-off-by: Yunlong Song --- fs/f2fs/f2fs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index 56204a8..d47417b 100644 --- a/fs/f2fs/f2fs.h +++ b/fs/f2fs/f2fs.h @@ -1842,7 +1842,7 @@ static inline int get_blocktype_secs(struct f2fs_sb_info *sbi, int block_type) unsigned int segs = (get_pages(sbi, block_type) + pages_per_sec - 1) >> sbi->log_blocks_per_seg; - return segs / sbi->segs_per_sec; + return (segs / sbi->segs_per_sec + sbi->segs_per_sec - 1) / sbi->segs_per_sec; } static inline block_t valid_user_blocks(struct f2fs_sb_info *sbi) -- 1.8.5.2 ___ 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-tools: add the max chunk size limit in sparse image
Hi, Jaegeuk, Chao, Ming On 2018/10/15 21:24, Gao Ming wrote: > Malloc Failure occurs in 32bit Windows, when using fastboot.exe flash the > f2fs sparse image filling with up to 2G chunk size. > > Signed-off-by: Gao Ming > --- > lib/libf2fs_io.c | 7 +++ > 1 file changed, 7 insertions(+) > > diff --git a/lib/libf2fs_io.c b/lib/libf2fs_io.c > index 76d283d..47917ab 100644 > --- a/lib/libf2fs_io.c > +++ b/lib/libf2fs_io.c > @@ -311,6 +311,7 @@ int f2fs_init_sparse_file(void) > #endif > } > > +#define MAX_CHUNK_SIZE (1 * 1024 * 1024 * 1024ULL) Should we introduce an option for fsck.f2fs to get the MAX_CHUNK_SIZE ? Thanks > int f2fs_finalize_device(void) > { > int i; > @@ -337,6 +338,12 @@ int f2fs_finalize_device(void) > chunk_start = -1; > } else if (blocks[j] && chunk_start == -1) { > chunk_start = j; > + } else if (blocks[j] && (chunk_start != -1) && > + (j + 1 - chunk_start >= > + (MAX_CHUNK_SIZE / F2FS_BLKSIZE))) { > + ret = sparse_merge_blocks(chunk_start, > + j + 1 - chunk_start); > + chunk_start = -1; > } > ASSERT(!ret); > } > ___ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel