Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 131771
b: refs/heads/master
c: d3dd710
h: refs/heads/master
i:
  131769: 2993362
  131767: 3b1aaba
v: v3
  • Loading branch information
Bartlomiej Zolnierkiewicz committed Feb 25, 2009
1 parent 1207ae1 commit c2163a7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f38344b0a0898d2a8c13581ee61007719e16e1d7
refs/heads/master: d3dd7107f4d843d0f01d0f77d49a7c5449130577
8 changes: 8 additions & 0 deletions trunk/drivers/ide/ide-cd.c
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,14 @@ static void cdrom_analyze_sense_data(ide_drive_t *drive,
bio_sectors = max(bio_sectors(failed_command->bio), 4U);
sector &= ~(bio_sectors - 1);

/*
* The SCSI specification allows for the value
* returned by READ CAPACITY to be up to 75 2K
* sectors past the last readable block.
* Therefore, if we hit a medium error within the
* last 75 2K sectors, we decrease the saved size
* value.
*/
if (sector < get_capacity(info->disk) &&
drive->probed_capacity - sector < 4 * 75)
set_capacity(info->disk, sector);
Expand Down

0 comments on commit c2163a7

Please sign in to comment.