mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-01-23 21:29:39 +07:00
Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block
* 'for-linus' of git://git.kernel.dk/linux-2.6-block: block: don't merge requests of different failfast settings cciss: Ignore stale commands after reboot
This commit is contained in:
commit
59107c6525
@ -350,6 +350,12 @@ static int attempt_merge(struct request_queue *q, struct request *req,
|
||||
if (blk_integrity_rq(req) != blk_integrity_rq(next))
|
||||
return 0;
|
||||
|
||||
/* don't merge requests of different failfast settings */
|
||||
if (blk_failfast_dev(req) != blk_failfast_dev(next) ||
|
||||
blk_failfast_transport(req) != blk_failfast_transport(next) ||
|
||||
blk_failfast_driver(req) != blk_failfast_driver(next))
|
||||
return 0;
|
||||
|
||||
/*
|
||||
* If we are allowed to merge, then append bio list
|
||||
* from next to rq and release next. merge_requests_fn
|
||||
|
@ -100,6 +100,14 @@ int elv_rq_merge_ok(struct request *rq, struct bio *bio)
|
||||
if (bio_integrity(bio) != blk_integrity_rq(rq))
|
||||
return 0;
|
||||
|
||||
/*
|
||||
* Don't merge if failfast settings don't match
|
||||
*/
|
||||
if (bio_failfast_dev(bio) != blk_failfast_dev(rq) ||
|
||||
bio_failfast_transport(bio) != blk_failfast_transport(rq) ||
|
||||
bio_failfast_driver(bio) != blk_failfast_driver(rq))
|
||||
return 0;
|
||||
|
||||
if (!elv_iosched_allow_merge(rq, bio))
|
||||
return 0;
|
||||
|
||||
|
@ -226,8 +226,18 @@ static inline void addQ(struct hlist_head *list, CommandList_struct *c)
|
||||
|
||||
static inline void removeQ(CommandList_struct *c)
|
||||
{
|
||||
if (WARN_ON(hlist_unhashed(&c->list)))
|
||||
/*
|
||||
* After kexec/dump some commands might still
|
||||
* be in flight, which the firmware will try
|
||||
* to complete. Resetting the firmware doesn't work
|
||||
* with old fw revisions, so we have to mark
|
||||
* them off as 'stale' to prevent the driver from
|
||||
* falling over.
|
||||
*/
|
||||
if (WARN_ON(hlist_unhashed(&c->list))) {
|
||||
c->cmd_type = CMD_MSG_STALE;
|
||||
return;
|
||||
}
|
||||
|
||||
hlist_del_init(&c->list);
|
||||
}
|
||||
@ -4246,7 +4256,8 @@ static void fail_all_cmds(unsigned long ctlr)
|
||||
while (!hlist_empty(&h->cmpQ)) {
|
||||
c = hlist_entry(h->cmpQ.first, CommandList_struct, list);
|
||||
removeQ(c);
|
||||
c->err_info->CommandStatus = CMD_HARDWARE_ERR;
|
||||
if (c->cmd_type != CMD_MSG_STALE)
|
||||
c->err_info->CommandStatus = CMD_HARDWARE_ERR;
|
||||
if (c->cmd_type == CMD_RWREQ) {
|
||||
complete_command(h, c, 0);
|
||||
} else if (c->cmd_type == CMD_IOCTL_PEND)
|
||||
|
@ -274,6 +274,7 @@ typedef struct _ErrorInfo_struct {
|
||||
#define CMD_SCSI 0x03
|
||||
#define CMD_MSG_DONE 0x04
|
||||
#define CMD_MSG_TIMEOUT 0x05
|
||||
#define CMD_MSG_STALE 0xff
|
||||
|
||||
/* This structure needs to be divisible by 8 for new
|
||||
* indexing method.
|
||||
|
Loading…
Reference in New Issue
Block a user