patch-2.1.30 linux/include/linux/blk.h
Next file: linux/include/linux/elf.h
Previous file: linux/include/asm-sparc64/vaddrs.h
Back to the patch index
Back to the overall index
- Lines: 24
- Date:
Wed Mar 26 10:58:25 1997
- Orig file:
v2.1.29/linux/include/linux/blk.h
- Orig date:
Thu Feb 6 02:53:33 1997
diff -u --recursive --new-file v2.1.29/linux/include/linux/blk.h linux/include/linux/blk.h
@@ -440,15 +440,19 @@
struct request *req = CURRENT;
#endif /* IDE_DRIVER */
struct buffer_head * bh;
+ int nsect;
req->errors = 0;
if (!uptodate) {
printk("end_request: I/O error, dev %s, sector %lu\n",
kdevname(req->rq_dev), req->sector);
- req->nr_sectors--;
- req->nr_sectors &= ~SECTOR_MASK;
- req->sector += (BLOCK_SIZE / 512);
- req->sector &= ~SECTOR_MASK;
+ if ((bh = req->bh) != NULL) {
+ nsect = bh->b_size >> 9;
+ req->nr_sectors--;
+ req->nr_sectors &= ~(nsect - 1);
+ req->sector += nsect;
+ req->sector &= ~(nsect - 1);
+ }
}
if ((bh = req->bh) != NULL) {
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov