diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-06-11 11:41:17 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-06-11 11:41:17 -0400 |
commit | 23d4ed53b7342bf5999b3ea227d9f69e75e5a625 (patch) | |
tree | 86229fb558235c2f742b35c0c66d5d98003f5f6e /drivers/scsi | |
parent | e413a19a8ef49ae3b76310bb569dabe66b22f5a3 (diff) | |
parent | a2d445d440003f2d70ee4cd4970ea82ace616fee (diff) |
Merge branch 'for-linus' of git://git.kernel.dk/linux-block
Pull block layer fixes from Jens Axboe:
"Final small batch of fixes to be included before -rc1. Some general
cleanups in here as well, but some of the blk-mq fixes we need for the
NVMe conversion and/or scsi-mq. The pull request contains:
- Support for not merging across a specified "chunk size", if set by
the driver. Some NVMe devices perform poorly for IO that crosses
such a chunk, so we need to support it generically as part of
request merging avoid having to do complicated split logic. From
me.
- Bump max tag depth to 10Ki tags. Some scsi devices have a huge
shared tag space. Before we failed with EINVAL if a too large tag
depth was specified, now we truncate it and pass back the actual
value. From me.
- Various blk-mq rq init fixes from me and others.
- A fix for enter on a dying queue for blk-mq from Keith. This is
needed to prevent oopsing on hot device removal.
- Fixup for blk-mq timer addition from Ming Lei.
- Small round of performance fixes for mtip32xx from Sam Bradshaw.
- Minor stack leak fix from Rickard Strandqvist.
- Two __init annotations from Fabian Frederick"
* 'for-linus' of git://git.kernel.dk/linux-block:
block: add __init to blkcg_policy_register
block: add __init to elv_register
block: ensure that bio_add_page() always accepts a page for an empty bio
blk-mq: add timer in blk_mq_start_request
blk-mq: always initialize request->start_time
block: blk-exec.c: Cleaning up local variable address returnd
mtip32xx: minor performance enhancements
blk-mq: ->timeout should be cleared in blk_mq_rq_ctx_init()
blk-mq: don't allow queue entering for a dying queue
blk-mq: bump max tag depth to 10K tags
block: add blk_rq_set_block_pc()
block: add notion of a chunk size for request merging
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/device_handler/scsi_dh_alua.c | 2 | ||||
-rw-r--r-- | drivers/scsi/device_handler/scsi_dh_emc.c | 2 | ||||
-rw-r--r-- | drivers/scsi/device_handler/scsi_dh_hp_sw.c | 4 | ||||
-rw-r--r-- | drivers/scsi/device_handler/scsi_dh_rdac.c | 2 | ||||
-rw-r--r-- | drivers/scsi/osd/osd_initiator.c | 4 | ||||
-rw-r--r-- | drivers/scsi/osst.c | 2 | ||||
-rw-r--r-- | drivers/scsi/scsi_error.c | 3 | ||||
-rw-r--r-- | drivers/scsi/scsi_lib.c | 2 | ||||
-rw-r--r-- | drivers/scsi/sg.c | 3 | ||||
-rw-r--r-- | drivers/scsi/st.c | 2 |
10 files changed, 13 insertions, 13 deletions
diff --git a/drivers/scsi/device_handler/scsi_dh_alua.c b/drivers/scsi/device_handler/scsi_dh_alua.c index 5248c888552b..7bcf67eec921 100644 --- a/drivers/scsi/device_handler/scsi_dh_alua.c +++ b/drivers/scsi/device_handler/scsi_dh_alua.c | |||
@@ -120,6 +120,7 @@ static struct request *get_alua_req(struct scsi_device *sdev, | |||
120 | "%s: blk_get_request failed\n", __func__); | 120 | "%s: blk_get_request failed\n", __func__); |
121 | return NULL; | 121 | return NULL; |
122 | } | 122 | } |
123 | blk_rq_set_block_pc(rq); | ||
123 | 124 | ||
124 | if (buflen && blk_rq_map_kern(q, rq, buffer, buflen, GFP_NOIO)) { | 125 | if (buflen && blk_rq_map_kern(q, rq, buffer, buflen, GFP_NOIO)) { |
125 | blk_put_request(rq); | 126 | blk_put_request(rq); |
@@ -128,7 +129,6 @@ static struct request *get_alua_req(struct scsi_device *sdev, | |||
128 | return NULL; | 129 | return NULL; |
129 | } | 130 | } |
130 | 131 | ||
131 | rq->cmd_type = REQ_TYPE_BLOCK_PC; | ||
132 | rq->cmd_flags |= REQ_FAILFAST_DEV | REQ_FAILFAST_TRANSPORT | | 132 | rq->cmd_flags |= REQ_FAILFAST_DEV | REQ_FAILFAST_TRANSPORT | |
133 | REQ_FAILFAST_DRIVER; | 133 | REQ_FAILFAST_DRIVER; |
134 | rq->retries = ALUA_FAILOVER_RETRIES; | 134 | rq->retries = ALUA_FAILOVER_RETRIES; |
diff --git a/drivers/scsi/device_handler/scsi_dh_emc.c b/drivers/scsi/device_handler/scsi_dh_emc.c index e1c8be06de9d..6f07f7fe3aa1 100644 --- a/drivers/scsi/device_handler/scsi_dh_emc.c +++ b/drivers/scsi/device_handler/scsi_dh_emc.c | |||
@@ -280,6 +280,7 @@ static struct request *get_req(struct scsi_device *sdev, int cmd, | |||
280 | return NULL; | 280 | return NULL; |
281 | } | 281 | } |
282 | 282 | ||
283 | blk_rq_set_block_pc(rq); | ||
283 | rq->cmd_len = COMMAND_SIZE(cmd); | 284 | rq->cmd_len = COMMAND_SIZE(cmd); |
284 | rq->cmd[0] = cmd; | 285 | rq->cmd[0] = cmd; |
285 | 286 | ||
@@ -304,7 +305,6 @@ static struct request *get_req(struct scsi_device *sdev, int cmd, | |||
304 | break; | 305 | break; |
305 | } | 306 | } |
306 | 307 | ||
307 | rq->cmd_type = REQ_TYPE_BLOCK_PC; | ||
308 | rq->cmd_flags |= REQ_FAILFAST_DEV | REQ_FAILFAST_TRANSPORT | | 308 | rq->cmd_flags |= REQ_FAILFAST_DEV | REQ_FAILFAST_TRANSPORT | |
309 | REQ_FAILFAST_DRIVER; | 309 | REQ_FAILFAST_DRIVER; |
310 | rq->timeout = CLARIION_TIMEOUT; | 310 | rq->timeout = CLARIION_TIMEOUT; |
diff --git a/drivers/scsi/device_handler/scsi_dh_hp_sw.c b/drivers/scsi/device_handler/scsi_dh_hp_sw.c index 084062bb8ee9..e9d9fea9e272 100644 --- a/drivers/scsi/device_handler/scsi_dh_hp_sw.c +++ b/drivers/scsi/device_handler/scsi_dh_hp_sw.c | |||
@@ -120,7 +120,7 @@ retry: | |||
120 | if (!req) | 120 | if (!req) |
121 | return SCSI_DH_RES_TEMP_UNAVAIL; | 121 | return SCSI_DH_RES_TEMP_UNAVAIL; |
122 | 122 | ||
123 | req->cmd_type = REQ_TYPE_BLOCK_PC; | 123 | blk_rq_set_block_pc(req); |
124 | req->cmd_flags |= REQ_FAILFAST_DEV | REQ_FAILFAST_TRANSPORT | | 124 | req->cmd_flags |= REQ_FAILFAST_DEV | REQ_FAILFAST_TRANSPORT | |
125 | REQ_FAILFAST_DRIVER; | 125 | REQ_FAILFAST_DRIVER; |
126 | req->cmd_len = COMMAND_SIZE(TEST_UNIT_READY); | 126 | req->cmd_len = COMMAND_SIZE(TEST_UNIT_READY); |
@@ -250,7 +250,7 @@ static int hp_sw_start_stop(struct hp_sw_dh_data *h) | |||
250 | if (!req) | 250 | if (!req) |
251 | return SCSI_DH_RES_TEMP_UNAVAIL; | 251 | return SCSI_DH_RES_TEMP_UNAVAIL; |
252 | 252 | ||
253 | req->cmd_type = REQ_TYPE_BLOCK_PC; | 253 | blk_rq_set_block_pc(req); |
254 | req->cmd_flags |= REQ_FAILFAST_DEV | REQ_FAILFAST_TRANSPORT | | 254 | req->cmd_flags |= REQ_FAILFAST_DEV | REQ_FAILFAST_TRANSPORT | |
255 | REQ_FAILFAST_DRIVER; | 255 | REQ_FAILFAST_DRIVER; |
256 | req->cmd_len = COMMAND_SIZE(START_STOP); | 256 | req->cmd_len = COMMAND_SIZE(START_STOP); |
diff --git a/drivers/scsi/device_handler/scsi_dh_rdac.c b/drivers/scsi/device_handler/scsi_dh_rdac.c index 4b9cf93f3fb6..826069db9848 100644 --- a/drivers/scsi/device_handler/scsi_dh_rdac.c +++ b/drivers/scsi/device_handler/scsi_dh_rdac.c | |||
@@ -279,6 +279,7 @@ static struct request *get_rdac_req(struct scsi_device *sdev, | |||
279 | "get_rdac_req: blk_get_request failed.\n"); | 279 | "get_rdac_req: blk_get_request failed.\n"); |
280 | return NULL; | 280 | return NULL; |
281 | } | 281 | } |
282 | blk_rq_set_block_pc(rq); | ||
282 | 283 | ||
283 | if (buflen && blk_rq_map_kern(q, rq, buffer, buflen, GFP_NOIO)) { | 284 | if (buflen && blk_rq_map_kern(q, rq, buffer, buflen, GFP_NOIO)) { |
284 | blk_put_request(rq); | 285 | blk_put_request(rq); |
@@ -287,7 +288,6 @@ static struct request *get_rdac_req(struct scsi_device *sdev, | |||
287 | return NULL; | 288 | return NULL; |
288 | } | 289 | } |
289 | 290 | ||
290 | rq->cmd_type = REQ_TYPE_BLOCK_PC; | ||
291 | rq->cmd_flags |= REQ_FAILFAST_DEV | REQ_FAILFAST_TRANSPORT | | 291 | rq->cmd_flags |= REQ_FAILFAST_DEV | REQ_FAILFAST_TRANSPORT | |
292 | REQ_FAILFAST_DRIVER; | 292 | REQ_FAILFAST_DRIVER; |
293 | rq->retries = RDAC_RETRIES; | 293 | rq->retries = RDAC_RETRIES; |
diff --git a/drivers/scsi/osd/osd_initiator.c b/drivers/scsi/osd/osd_initiator.c index bac04c2335aa..5f4cbf0c4759 100644 --- a/drivers/scsi/osd/osd_initiator.c +++ b/drivers/scsi/osd/osd_initiator.c | |||
@@ -1570,6 +1570,7 @@ static struct request *_make_request(struct request_queue *q, bool has_write, | |||
1570 | if (unlikely(!req)) | 1570 | if (unlikely(!req)) |
1571 | return ERR_PTR(-ENOMEM); | 1571 | return ERR_PTR(-ENOMEM); |
1572 | 1572 | ||
1573 | blk_rq_set_block_pc(req); | ||
1573 | return req; | 1574 | return req; |
1574 | } | 1575 | } |
1575 | } | 1576 | } |
@@ -1590,7 +1591,6 @@ static int _init_blk_request(struct osd_request *or, | |||
1590 | } | 1591 | } |
1591 | 1592 | ||
1592 | or->request = req; | 1593 | or->request = req; |
1593 | req->cmd_type = REQ_TYPE_BLOCK_PC; | ||
1594 | req->cmd_flags |= REQ_QUIET; | 1594 | req->cmd_flags |= REQ_QUIET; |
1595 | 1595 | ||
1596 | req->timeout = or->timeout; | 1596 | req->timeout = or->timeout; |
@@ -1608,7 +1608,7 @@ static int _init_blk_request(struct osd_request *or, | |||
1608 | ret = PTR_ERR(req); | 1608 | ret = PTR_ERR(req); |
1609 | goto out; | 1609 | goto out; |
1610 | } | 1610 | } |
1611 | req->cmd_type = REQ_TYPE_BLOCK_PC; | 1611 | blk_rq_set_block_pc(req); |
1612 | or->in.req = or->request->next_rq = req; | 1612 | or->in.req = or->request->next_rq = req; |
1613 | } | 1613 | } |
1614 | } else if (has_in) | 1614 | } else if (has_in) |
diff --git a/drivers/scsi/osst.c b/drivers/scsi/osst.c index 21883a2d6324..0727ea7cc387 100644 --- a/drivers/scsi/osst.c +++ b/drivers/scsi/osst.c | |||
@@ -365,7 +365,7 @@ static int osst_execute(struct osst_request *SRpnt, const unsigned char *cmd, | |||
365 | if (!req) | 365 | if (!req) |
366 | return DRIVER_ERROR << 24; | 366 | return DRIVER_ERROR << 24; |
367 | 367 | ||
368 | req->cmd_type = REQ_TYPE_BLOCK_PC; | 368 | blk_rq_set_block_pc(req); |
369 | req->cmd_flags |= REQ_QUIET; | 369 | req->cmd_flags |= REQ_QUIET; |
370 | 370 | ||
371 | SRpnt->bio = NULL; | 371 | SRpnt->bio = NULL; |
diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c index 47a1ffc4c904..cbe38e5e7955 100644 --- a/drivers/scsi/scsi_error.c +++ b/drivers/scsi/scsi_error.c | |||
@@ -1952,6 +1952,8 @@ static void scsi_eh_lock_door(struct scsi_device *sdev) | |||
1952 | */ | 1952 | */ |
1953 | req = blk_get_request(sdev->request_queue, READ, GFP_KERNEL); | 1953 | req = blk_get_request(sdev->request_queue, READ, GFP_KERNEL); |
1954 | 1954 | ||
1955 | blk_rq_set_block_pc(req); | ||
1956 | |||
1955 | req->cmd[0] = ALLOW_MEDIUM_REMOVAL; | 1957 | req->cmd[0] = ALLOW_MEDIUM_REMOVAL; |
1956 | req->cmd[1] = 0; | 1958 | req->cmd[1] = 0; |
1957 | req->cmd[2] = 0; | 1959 | req->cmd[2] = 0; |
@@ -1961,7 +1963,6 @@ static void scsi_eh_lock_door(struct scsi_device *sdev) | |||
1961 | 1963 | ||
1962 | req->cmd_len = COMMAND_SIZE(req->cmd[0]); | 1964 | req->cmd_len = COMMAND_SIZE(req->cmd[0]); |
1963 | 1965 | ||
1964 | req->cmd_type = REQ_TYPE_BLOCK_PC; | ||
1965 | req->cmd_flags |= REQ_QUIET; | 1966 | req->cmd_flags |= REQ_QUIET; |
1966 | req->timeout = 10 * HZ; | 1967 | req->timeout = 10 * HZ; |
1967 | req->retries = 5; | 1968 | req->retries = 5; |
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index be0d5fad999d..f7e316368c99 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c | |||
@@ -195,6 +195,7 @@ int scsi_execute(struct scsi_device *sdev, const unsigned char *cmd, | |||
195 | req = blk_get_request(sdev->request_queue, write, __GFP_WAIT); | 195 | req = blk_get_request(sdev->request_queue, write, __GFP_WAIT); |
196 | if (!req) | 196 | if (!req) |
197 | return ret; | 197 | return ret; |
198 | blk_rq_set_block_pc(req); | ||
198 | 199 | ||
199 | if (bufflen && blk_rq_map_kern(sdev->request_queue, req, | 200 | if (bufflen && blk_rq_map_kern(sdev->request_queue, req, |
200 | buffer, bufflen, __GFP_WAIT)) | 201 | buffer, bufflen, __GFP_WAIT)) |
@@ -206,7 +207,6 @@ int scsi_execute(struct scsi_device *sdev, const unsigned char *cmd, | |||
206 | req->sense_len = 0; | 207 | req->sense_len = 0; |
207 | req->retries = retries; | 208 | req->retries = retries; |
208 | req->timeout = timeout; | 209 | req->timeout = timeout; |
209 | req->cmd_type = REQ_TYPE_BLOCK_PC; | ||
210 | req->cmd_flags |= flags | REQ_QUIET | REQ_PREEMPT; | 210 | req->cmd_flags |= flags | REQ_QUIET | REQ_PREEMPT; |
211 | 211 | ||
212 | /* | 212 | /* |
diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c index df5e961484e1..53268aaba559 100644 --- a/drivers/scsi/sg.c +++ b/drivers/scsi/sg.c | |||
@@ -1653,10 +1653,9 @@ static int sg_start_req(Sg_request *srp, unsigned char *cmd) | |||
1653 | if (!rq) | 1653 | if (!rq) |
1654 | return -ENOMEM; | 1654 | return -ENOMEM; |
1655 | 1655 | ||
1656 | blk_rq_set_block_pc(rq); | ||
1656 | memcpy(rq->cmd, cmd, hp->cmd_len); | 1657 | memcpy(rq->cmd, cmd, hp->cmd_len); |
1657 | |||
1658 | rq->cmd_len = hp->cmd_len; | 1658 | rq->cmd_len = hp->cmd_len; |
1659 | rq->cmd_type = REQ_TYPE_BLOCK_PC; | ||
1660 | 1659 | ||
1661 | srp->rq = rq; | 1660 | srp->rq = rq; |
1662 | rq->end_io_data = srp; | 1661 | rq->end_io_data = srp; |
diff --git a/drivers/scsi/st.c b/drivers/scsi/st.c index afc834e172c6..14eb4b256a03 100644 --- a/drivers/scsi/st.c +++ b/drivers/scsi/st.c | |||
@@ -484,7 +484,7 @@ static int st_scsi_execute(struct st_request *SRpnt, const unsigned char *cmd, | |||
484 | if (!req) | 484 | if (!req) |
485 | return DRIVER_ERROR << 24; | 485 | return DRIVER_ERROR << 24; |
486 | 486 | ||
487 | req->cmd_type = REQ_TYPE_BLOCK_PC; | 487 | blk_rq_set_block_pc(req); |
488 | req->cmd_flags |= REQ_QUIET; | 488 | req->cmd_flags |= REQ_QUIET; |
489 | 489 | ||
490 | mdata->null_mapped = 1; | 490 | mdata->null_mapped = 1; |