active_logs=%u Support configuring the number of active logs. In the
current design, f2fs supports only 2, 4, and 6 logs.
Default number is 6.
+ When the underlying block device exposes write
+ streams, the default active_logs=6 configuration
+ maps hot, warm, and cold DATA writes to streams 1,
+ 2, and 3, respectively. If only one or two write
+ streams are available, f2fs falls back to mapping
+ all DATA writes to stream 1 or mapping hot/warm
+ to stream 1 and cold to stream 2. If no write
+ streams are exposed, f2fs leaves the stream
+ unset.
disable_ext_identify Disable the extension list configured by mkfs, so f2fs
is not aware of cold files such as media files.
inline_xattr Enable the inline xattrs feature.
bio->bi_private = sbi;
bio->bi_write_hint = f2fs_io_type_to_rw_hint(sbi,
fio->type, fio->temp);
+ bio->bi_write_stream = f2fs_io_type_to_write_stream(bdev, fio->type,
+ fio->temp);
}
iostat_alloc_and_bind_ctx(sbi, bio, NULL);
int f2fs_rw_hint_to_seg_type(struct f2fs_sb_info *sbi, enum rw_hint hint);
enum rw_hint f2fs_io_type_to_rw_hint(struct f2fs_sb_info *sbi,
enum page_type type, enum temp_type temp);
+u8 f2fs_io_type_to_write_stream(struct block_device *bdev,
+ enum page_type type, enum temp_type temp);
unsigned int f2fs_usable_segs_in_sec(struct f2fs_sb_info *sbi);
unsigned int f2fs_usable_blks_in_seg(struct f2fs_sb_info *sbi,
unsigned int segno);
enum temp_type temp = f2fs_get_segment_temp(sbi, type);
bio->bi_write_hint = f2fs_io_type_to_rw_hint(sbi, DATA, temp);
+ bio->bi_write_stream =
+ f2fs_io_type_to_write_stream(bio->bi_bdev, DATA, temp);
blk_crypto_submit_bio(bio);
}
}
}
+u8 f2fs_io_type_to_write_stream(struct block_device *bdev,
+ enum page_type type, enum temp_type temp)
+{
+ unsigned short nr = bdev_max_write_streams(bdev);
+
+ if (type != DATA || !nr)
+ return 0;
+ if (nr < NR_TEMP_TYPE)
+ return temp == COLD ? nr : HOT + 1;
+
+ return temp + 1;
+}
+
static int __get_segment_type_2(struct f2fs_io_info *fio)
{
if (fio->type == DATA)