Skip to content

Commit 071e50d

Browse files
Yongpeng YangJaegeuk Kim
authored andcommitted
f2fs: change seq_file_ra_mul and max_io_bytes to unsigned int
{struct file_ra_state}->ra_pages and {struct bio}->bi_iter.bi_size is defined as unsigned int, so values of seq_file_ra_mul and max_io_bytes exceeding UINT_MAX are meaningless. Signed-off-by: Yongpeng Yang <yangyongpeng@xiaomi.com> Reviewed-by: Chao Yu <chao@kernel.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
1 parent 98ea003 commit 071e50d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

fs/f2fs/f2fs.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1808,7 +1808,7 @@ struct f2fs_sb_info {
18081808
unsigned int total_valid_node_count; /* valid node block count */
18091809
int dir_level; /* directory level */
18101810
bool readdir_ra; /* readahead inode in readdir */
1811-
u64 max_io_bytes; /* max io bytes to merge IOs */
1811+
unsigned int max_io_bytes; /* max io bytes to merge IOs */
18121812

18131813
block_t user_block_count; /* # of user blocks */
18141814
block_t total_valid_block_count; /* # of valid blocks */
@@ -1956,7 +1956,7 @@ struct f2fs_sb_info {
19561956
unsigned int gc_segment_mode; /* GC state for reclaimed segments */
19571957
unsigned int gc_reclaimed_segs[MAX_GC_MODE]; /* Reclaimed segs for each mode */
19581958

1959-
unsigned long seq_file_ra_mul; /* multiplier for ra_pages of seq. files in fadvise */
1959+
unsigned int seq_file_ra_mul; /* multiplier for ra_pages of seq. files in fadvise */
19601960

19611961
int max_fragment_chunk; /* max chunk size for block fragmentation mode */
19621962
int max_fragment_hole; /* max hole size for block fragmentation mode */

0 commit comments

Comments
 (0)