| data.c (2b703bbda2713fd2a7d98029ea6c44f9c3159f34) | data.c (da9953b729c12ece6d35fd15d236457eee679228) |
|---|---|
| 1// SPDX-License-Identifier: GPL-2.0 2/* 3 * fs/f2fs/data.c 4 * 5 * Copyright (c) 2012 Samsung Electronics Co., Ltd. 6 * http://www.samsung.com/ 7 */ 8#include <linux/fs.h> --- 499 unchanged lines hidden (view full) --- 508} 509 510void f2fs_submit_bio(struct f2fs_sb_info *sbi, 511 struct bio *bio, enum page_type type) 512{ 513 __submit_bio(sbi, bio, type); 514} 515 | 1// SPDX-License-Identifier: GPL-2.0 2/* 3 * fs/f2fs/data.c 4 * 5 * Copyright (c) 2012 Samsung Electronics Co., Ltd. 6 * http://www.samsung.com/ 7 */ 8#include <linux/fs.h> --- 499 unchanged lines hidden (view full) --- 508} 509 510void f2fs_submit_bio(struct f2fs_sb_info *sbi, 511 struct bio *bio, enum page_type type) 512{ 513 __submit_bio(sbi, bio, type); 514} 515 |
| 516static void __attach_data_io_flag(struct f2fs_io_info *fio) 517{ 518 struct f2fs_sb_info *sbi = fio->sbi; 519 unsigned int temp_mask = (1 << NR_TEMP_TYPE) - 1; 520 unsigned int fua_flag = sbi->data_io_flag & temp_mask; 521 unsigned int meta_flag = (sbi->data_io_flag >> NR_TEMP_TYPE) & 522 temp_mask; 523 /* 524 * data io flag bits per temp: 525 * REQ_META | REQ_FUA | 526 * 5 | 4 | 3 | 2 | 1 | 0 | 527 * Cold | Warm | Hot | Cold | Warm | Hot | 528 */ 529 if (fio->type != DATA) 530 return; 531 532 if ((1 << fio->temp) & meta_flag) 533 fio->op_flags |= REQ_META; 534 if ((1 << fio->temp) & fua_flag) 535 fio->op_flags |= REQ_FUA; 536} 537 |
|
| 516static void __submit_merged_bio(struct f2fs_bio_info *io) 517{ 518 struct f2fs_io_info *fio = &io->fio; 519 520 if (!io->bio) 521 return; 522 | 538static void __submit_merged_bio(struct f2fs_bio_info *io) 539{ 540 struct f2fs_io_info *fio = &io->fio; 541 542 if (!io->bio) 543 return; 544 |
| 545 __attach_data_io_flag(fio); |
|
| 523 bio_set_op_attrs(io->bio, fio->op, fio->op_flags); 524 525 if (is_read_io(fio->op)) 526 trace_f2fs_prepare_read_bio(io->sbi->sb, fio->type, io->bio); 527 else 528 trace_f2fs_prepare_write_bio(io->sbi->sb, fio->type, io->bio); 529 530 __submit_bio(io->sbi, io->bio, fio->type); --- 3365 unchanged lines hidden --- | 546 bio_set_op_attrs(io->bio, fio->op, fio->op_flags); 547 548 if (is_read_io(fio->op)) 549 trace_f2fs_prepare_read_bio(io->sbi->sb, fio->type, io->bio); 550 else 551 trace_f2fs_prepare_write_bio(io->sbi->sb, fio->type, io->bio); 552 553 __submit_bio(io->sbi, io->bio, fio->type); --- 3365 unchanged lines hidden --- |