summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Bushnell <thomas@gnu.org>1997-08-04 19:50:13 +0000
committerThomas Bushnell <thomas@gnu.org>1997-08-04 19:50:13 +0000
commit2a2a488ff1440e4e02f7e33349320d032358eb9a (patch)
tree3fb402bd81ff8b782311b0126c1e7c74775158bf
parent14bb2694d329127a5fbb688436ab9a047aa08d0c (diff)
Sun Aug 3 18:25:38 1997 Shantanu Goel <goel@cs.columbia.edu>
* i386/i386at/gpl/linux/include/linux/blk.h (end_request): Revamped Mach specific code. Don't use `errors' field in request. Don't call driver's request function. * i386/i386at/gpl/linux/include/linux/fs.h (struct buffer_head): Deleted old Mach-specific definition. Use original Linux defintion.
-rw-r--r--i386/i386at/gpl/linux/include/linux/blk.h28
-rw-r--r--i386/i386at/gpl/linux/include/linux/fs.h22
2 files changed, 6 insertions, 44 deletions
diff --git a/i386/i386at/gpl/linux/include/linux/blk.h b/i386/i386at/gpl/linux/include/linux/blk.h
index d7801dd..cf236a6 100644
--- a/i386/i386at/gpl/linux/include/linux/blk.h
+++ b/i386/i386at/gpl/linux/include/linux/blk.h
@@ -349,18 +349,19 @@ static void end_request(int uptodate) {
#endif /* IDE_DRIVER */
struct buffer_head * bh;
+ req->errors = 0;
if (!uptodate) {
printk("end_request: I/O error, dev %s, sector %lu\n",
kdevname(req->rq_dev), req->sector);
#ifdef MACH
- req->errors = 1;
- while (req->bh) {
- bh = req->bh;
- req->bh = bh->b_reqnext;
+ for (bh = req->bh; bh; ) {
+ struct buffer_head *next = bh->b_reqnext;
+ bh->b_reqnext = NULL;
mark_buffer_uptodate(bh, 0);
unlock_buffer(bh);
+ bh = next;
}
- goto done;
+ req->bh = NULL;
#else
req->nr_sectors--;
req->nr_sectors &= ~SECTOR_MASK;
@@ -384,11 +385,6 @@ static void end_request(int uptodate) {
return;
}
}
-#ifdef MACH
- req->errors = 0;
-
-done:
-#endif
#ifndef DEVICE_NO_RANDOM
add_blkdev_randomness(MAJOR(req->rq_dev));
#endif
@@ -402,19 +398,7 @@ done:
if (req->sem != NULL)
up(req->sem);
req->rq_status = RQ_INACTIVE;
-#ifndef MACH
wake_up(&wait_for_request);
-#endif
-#ifdef MACH
- {
- unsigned long flags;
-
- save_flags(flags);
- cli();
- (*blk_dev[MAJOR(req->rq_dev)].request_fn)();
- restore_flags(flags);
- }
-#endif
}
#endif /* defined(IDE_DRIVER) && !defined(_IDE_C) */
#endif /* ! SCSI_MAJOR(MAJOR_NR) */
diff --git a/i386/i386at/gpl/linux/include/linux/fs.h b/i386/i386at/gpl/linux/include/linux/fs.h
index d5bc62b..278aa36 100644
--- a/i386/i386at/gpl/linux/include/linux/fs.h
+++ b/i386/i386at/gpl/linux/include/linux/fs.h
@@ -150,24 +150,6 @@ typedef char buffer_block[BLOCK_SIZE];
* The second 16 bytes we use for lru buffer scans, as used by
* sync_buffers() and refill_freelist(). -- sct
*/
-#ifdef MACH
-struct buffer_head
-{
- unsigned long b_blocknr;
- kdev_t b_dev;
- unsigned long b_state;
- unsigned long b_size;
- char *b_data;
- struct wait_queue *b_wait;
- struct buffer_head *b_reqnext;
- void *b_page_list;
- int b_index;
- int b_off;
- int b_usrcnt;
- struct request *b_request;
- struct semaphore *b_sem;
-};
-#else /* ! MACH */
struct buffer_head {
/* First cache line: */
unsigned long b_blocknr; /* block number */
@@ -192,11 +174,7 @@ struct buffer_head {
struct buffer_head * b_prev; /* doubly linked list of hash-queue */
struct buffer_head * b_prev_free; /* doubly linked list of buffers */
struct buffer_head * b_reqnext; /* request queue */
- char *b_usrbuf;
- struct request *b_request;
- struct semaphore *b_sem;
};
-#endif /* ! MACH */
static inline int buffer_uptodate(struct buffer_head * bh)
{