linux_dsm_epyc7002/block
Jianchao Wang 85bd6e61f3 blk-mq: fix a hung issue when fsync
Florian reported a io hung issue when fsync(). It should be
triggered by following race condition.

data + post flush         a flush

blk_flush_complete_seq
  case REQ_FSEQ_DATA
    blk_flush_queue_rq
    issued to driver      blk_mq_dispatch_rq_list
                            try to issue a flush req
                            failed due to NON-NCQ command
                            .queue_rq return BLK_STS_DEV_RESOURCE

request completion
  req->end_io // doesn't check RESTART
  mq_flush_data_end_io
    case REQ_FSEQ_POSTFLUSH
      blk_kick_flush
        do nothing because previous flush
        has not been completed
     blk_mq_run_hw_queue
                              insert rq to hctx->dispatch
                              due to RESTART is still set, do nothing

To fix this, replace the blk_mq_run_hw_queue in mq_flush_data_end_io
with blk_mq_sched_restart to check and clear the RESTART flag.

Fixes: bd166ef1 (blk-mq-sched: add framework for MQ capable IO schedulers)
Reported-by: Florian Stecker <m19@florianstecker.de>
Tested-by: Florian Stecker <m19@florianstecker.de>
Signed-off-by: Jianchao Wang <jianchao.w.wang@oracle.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-01-30 08:53:54 -07:00
..
partitions
badblocks.c
bfq-cgroup.c
bfq-iosched.c
bfq-iosched.h
bfq-wf2q.c block, bfq: fix comments on __bfq_deactivate_entity 2019-01-14 06:25:44 -07:00
bio-integrity.c block: remove the bio_integrity_advance export 2018-12-16 08:33:57 -07:00
bio.c for-4.21/block-20190102 2019-01-02 18:49:58 -08:00
blk-cgroup.c blkcg: remove unused __blkg_release_rcu() 2018-12-21 08:47:58 -07:00
blk-core.c block: pass no-op callback to INIT_WORK(). 2019-01-30 08:53:20 -07:00
blk-exec.c
blk-flush.c blk-mq: fix a hung issue when fsync 2019-01-30 08:53:54 -07:00
blk-integrity.c
blk-ioc.c
blk-iolatency.c block: fix blk-iolatency accounting underflow 2018-12-17 11:19:54 -07:00
blk-lib.c
blk-map.c
blk-merge.c Revert "block: cover another queue enter recursion via BIO_QUEUE_ENTERED" 2019-01-27 06:35:28 -07:00
blk-mq-cpumap.c
blk-mq-debugfs-zoned.c block: Cleanup license notice 2019-01-17 21:21:40 -07:00
blk-mq-debugfs.c blk-mq: fix the cmd_flag_name array 2019-01-24 08:41:42 -07:00
blk-mq-debugfs.h blk-mq-debugfs: support rq_qos 2018-12-16 19:53:47 -07:00
blk-mq-pci.c
blk-mq-rdma.c blk-mq-rdma: pass in queue map to blk_mq_rdma_map_queues 2018-12-13 09:59:08 +01:00
blk-mq-sched.c blk-mq: fix dispatch from sw queue 2018-12-17 11:19:54 -07:00
blk-mq-sched.h block: mq-deadline: Fix write completion handling 2018-12-17 11:19:39 -07:00
blk-mq-sysfs.c blk-mq: export hctx->type in debugfs instead of sysfs 2018-12-17 05:44:45 -07:00
blk-mq-tag.c
blk-mq-tag.h
blk-mq-virtio.c
blk-mq.c block: don't lose track of REQ_INTEGRITY flag 2019-01-16 07:28:10 -07:00
blk-mq.h blk-mq: fix dispatch from sw queue 2018-12-17 11:19:54 -07:00
blk-pm.c
blk-pm.h
blk-rq-qos.c blk-mq-debugfs: support rq_qos 2018-12-16 19:53:47 -07:00
blk-rq-qos.h block: fix blk-iolatency accounting underflow 2018-12-17 11:19:54 -07:00
blk-settings.c SCSI misc on 20181224 2018-12-28 14:48:06 -08:00
blk-softirq.c
blk-stat.c
blk-stat.h block: deactivate blk_stat timer in wbt_disable_default() 2018-12-12 06:47:51 -07:00
blk-sysfs.c SCSI misc on 20181224 2018-12-28 14:48:06 -08:00
blk-throttle.c
blk-timeout.c
blk-wbt.c blk-wbt: Declare local functions static 2019-01-24 11:09:21 -07:00
blk-wbt.h
blk-zoned.c for-4.21/block-20181221 2018-12-28 13:19:59 -08:00
blk.h
bounce.c
bsg-lib.c
bsg.c bsg: deprecate BIDI support in bsg 2018-12-21 08:47:58 -07:00
cmdline-parser.c
compat_ioctl.c
elevator.c
genhd.c block: return just one value from part_in_flight 2018-12-10 08:30:38 -07:00
ioctl.c
ioprio.c
Kconfig Kconfig updates for v4.21 2018-12-29 13:03:29 -08:00
Kconfig.iosched
kyber-iosched.c kyber: use sbitmap add_wait_queue/list_del wait helpers 2018-12-20 12:17:21 -07:00
Makefile
mq-deadline.c block: mq-deadline: Fix write completion handling 2018-12-17 11:19:39 -07:00
opal_proto.h
partition-generic.c block: return just one value from part_in_flight 2018-12-10 08:30:38 -07:00
scsi_ioctl.c
sed-opal.c
t10-pi.c