diff options
author | Mike Christie <michaelc@cs.wisc.edu> | 2005-12-05 03:37:06 -0500 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.(none)> | 2005-12-15 18:11:40 -0500 |
commit | defd94b75409b983f94548ea2f52ff5787ddb848 (patch) | |
tree | 0138b2dae748de88edaee4da23431f1a9dd347a1 /drivers | |
parent | 8b05b773b6030de5b1bab1cbb0bf1ff8c34cdbe0 (diff) |
[SCSI] seperate max_sectors from max_hw_sectors
- export __blk_put_request and blk_execute_rq_nowait
needed for async REQ_BLOCK_PC requests
- seperate max_hw_sectors and max_sectors for block/scsi_ioctl.c and
SG_IO bio.c helpers per Jens's last comments. Since block/scsi_ioctl.c SG_IO was
already testing against max_sectors and SCSI-ml was setting max_sectors and
max_hw_sectors to the same value this does not change any scsi SG_IO behavior. It only
prepares ll_rw_blk.c, scsi_ioctl.c and bio.c for when SCSI-ml begins to set
a valid max_hw_sectors for all LLDs. Today if a LLD does not set it
SCSI-ml sets it to a safe default and some LLDs set it to a artificial low
value to overcome memory and feedback issues.
Note: Since we now cap max_sectors to BLK_DEF_MAX_SECTORS, which is 1024,
drivers that used to call blk_queue_max_sectors with a large value of
max_sectors will now see the fs requests capped to BLK_DEF_MAX_SECTORS.
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/md/dm-table.c | 2 | ||||
-rw-r--r-- | drivers/scsi/scsi_lib.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/md/dm-table.c b/drivers/md/dm-table.c index a6d3baa46f61..a6f2dc66c3db 100644 --- a/drivers/md/dm-table.c +++ b/drivers/md/dm-table.c | |||
@@ -638,7 +638,7 @@ int dm_split_args(int *argc, char ***argvp, char *input) | |||
638 | static void check_for_valid_limits(struct io_restrictions *rs) | 638 | static void check_for_valid_limits(struct io_restrictions *rs) |
639 | { | 639 | { |
640 | if (!rs->max_sectors) | 640 | if (!rs->max_sectors) |
641 | rs->max_sectors = MAX_SECTORS; | 641 | rs->max_sectors = SAFE_MAX_SECTORS; |
642 | if (!rs->max_phys_segments) | 642 | if (!rs->max_phys_segments) |
643 | rs->max_phys_segments = MAX_PHYS_SEGMENTS; | 643 | rs->max_phys_segments = MAX_PHYS_SEGMENTS; |
644 | if (!rs->max_hw_segments) | 644 | if (!rs->max_hw_segments) |
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index 54a72f197487..14ad2a785a34 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c | |||
@@ -462,6 +462,7 @@ int scsi_execute_async(struct scsi_device *sdev, const unsigned char *cmd, | |||
462 | req = blk_get_request(sdev->request_queue, write, gfp); | 462 | req = blk_get_request(sdev->request_queue, write, gfp); |
463 | if (!req) | 463 | if (!req) |
464 | goto free_sense; | 464 | goto free_sense; |
465 | req->flags |= REQ_BLOCK_PC | REQ_QUIET; | ||
465 | 466 | ||
466 | if (use_sg) | 467 | if (use_sg) |
467 | err = scsi_req_map_sg(req, buffer, use_sg, bufflen, gfp); | 468 | err = scsi_req_map_sg(req, buffer, use_sg, bufflen, gfp); |
@@ -477,7 +478,6 @@ int scsi_execute_async(struct scsi_device *sdev, const unsigned char *cmd, | |||
477 | req->sense_len = 0; | 478 | req->sense_len = 0; |
478 | req->timeout = timeout; | 479 | req->timeout = timeout; |
479 | req->retries = retries; | 480 | req->retries = retries; |
480 | req->flags |= REQ_BLOCK_PC | REQ_QUIET; | ||
481 | req->end_io_data = sioc; | 481 | req->end_io_data = sioc; |
482 | 482 | ||
483 | sioc->data = privdata; | 483 | sioc->data = privdata; |