Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 213055
b: refs/heads/master
c: 4b19776
h: refs/heads/master
i:
  213053: 90ffc57
  213051: 471c905
  213047: b11b309
  213039: ddd966a
  213023: 4dc5572
  212991: 0c478d4
v: v3
  • Loading branch information
Mark Lord authored and Jens Axboe committed Sep 24, 2010
1 parent 3e57868 commit 8f6665a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 749ef9f8423054e326f3a246327ed2db4b6d395f
refs/heads/master: 4b1977698ceb4c4caa800d475127139da49966f9
9 changes: 8 additions & 1 deletion trunk/block/blk-exec.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ int blk_execute_rq(struct request_queue *q, struct gendisk *bd_disk,
DECLARE_COMPLETION_ONSTACK(wait);
char sense[SCSI_SENSE_BUFFERSIZE];
int err = 0;
unsigned long hang_check;

/*
* we need an extra reference to the request, so we can look at
Expand All @@ -95,7 +96,13 @@ int blk_execute_rq(struct request_queue *q, struct gendisk *bd_disk,

rq->end_io_data = &wait;
blk_execute_rq_nowait(q, bd_disk, rq, at_head, blk_end_sync_rq);
wait_for_completion(&wait);

/* Prevent hang_check timer from firing at us during very long I/O */
hang_check = sysctl_hung_task_timeout_secs;
if (hang_check)
while (!wait_for_completion_timeout(&wait, hang_check * (HZ/2)));
else
wait_for_completion(&wait);

if (rq->errors)
err = -EIO;
Expand Down

0 comments on commit 8f6665a

Please sign in to comment.