blk-mq.c (46eeaa11bdd1bc9e077bdf741d32ca7235d263c6) | blk-mq.c (e5d98cc3311fba46646782c913557322afdb1f32) |
---|---|
1// SPDX-License-Identifier: GPL-2.0 2/* 3 * Block multiqueue core code 4 * 5 * Copyright (C) 2013-2014 Jens Axboe 6 * Copyright (C) 2013-2014 Christoph Hellwig 7 */ 8#include <linux/kernel.h> --- 980 unchanged lines hidden (view full) --- 989 if (blk_do_io_stat(req) && req->part && 990 !(req->rq_flags & RQF_FLUSH_SEQ)) { 991 const int sgrp = op_stat_group(req_op(req)); 992 993 part_stat_lock(); 994 update_io_ticks(req->part, jiffies, true); 995 part_stat_inc(req->part, ios[sgrp]); 996 part_stat_add(req->part, nsecs[sgrp], now - req->start_time_ns); | 1// SPDX-License-Identifier: GPL-2.0 2/* 3 * Block multiqueue core code 4 * 5 * Copyright (C) 2013-2014 Jens Axboe 6 * Copyright (C) 2013-2014 Christoph Hellwig 7 */ 8#include <linux/kernel.h> --- 980 unchanged lines hidden (view full) --- 989 if (blk_do_io_stat(req) && req->part && 990 !(req->rq_flags & RQF_FLUSH_SEQ)) { 991 const int sgrp = op_stat_group(req_op(req)); 992 993 part_stat_lock(); 994 update_io_ticks(req->part, jiffies, true); 995 part_stat_inc(req->part, ios[sgrp]); 996 part_stat_add(req->part, nsecs[sgrp], now - req->start_time_ns); |
997 part_stat_local_dec(req->part, 998 in_flight[op_is_write(req_op(req))]); |
|
997 part_stat_unlock(); 998 } 999} 1000 1001static inline void blk_account_io_start(struct request *req) 1002{ 1003 trace_block_io_start(req); 1004 --- 6 unchanged lines hidden (view full) --- 1011 */ 1012 if (req->bio) 1013 req->part = req->bio->bi_bdev; 1014 else 1015 req->part = req->q->disk->part0; 1016 1017 part_stat_lock(); 1018 update_io_ticks(req->part, jiffies, false); | 999 part_stat_unlock(); 1000 } 1001} 1002 1003static inline void blk_account_io_start(struct request *req) 1004{ 1005 trace_block_io_start(req); 1006 --- 6 unchanged lines hidden (view full) --- 1013 */ 1014 if (req->bio) 1015 req->part = req->bio->bi_bdev; 1016 else 1017 req->part = req->q->disk->part0; 1018 1019 part_stat_lock(); 1020 update_io_ticks(req->part, jiffies, false); |
1021 part_stat_local_inc(req->part, 1022 in_flight[op_is_write(req_op(req))]); |
|
1019 part_stat_unlock(); 1020 } 1021} 1022 1023static inline void __blk_mq_end_request_acct(struct request *rq, u64 now) 1024{ 1025 if (rq->rq_flags & RQF_STATS) 1026 blk_stat_add(rq, now); --- 3893 unchanged lines hidden --- | 1023 part_stat_unlock(); 1024 } 1025} 1026 1027static inline void __blk_mq_end_request_acct(struct request *rq, u64 now) 1028{ 1029 if (rq->rq_flags & RQF_STATS) 1030 blk_stat_add(rq, now); --- 3893 unchanged lines hidden --- |