2 ataraid.h Copyright (C) 2001 Red Hat, Inc. All rights reserved.
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2, or (at your option)
9 You should have received a copy of the GNU General Public License
10 (for example /usr/src/linux/COPYING); if not, write to the Free
11 Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
13 Authors: Arjan van de Ven <arjanv@redhat.com>
18 #include <linux/module.h>
19 #include <linux/init.h>
20 #include <linux/kernel.h>
21 #include <asm/semaphore.h>
22 #include <linux/blkdev.h>
23 #include <linux/blkpg.h>
24 #include <linux/genhd.h>
25 #include <linux/ioctl.h>
27 #include <linux/ide.h>
28 #include <asm/uaccess.h>
36 /* raid_device_operations is a light struct block_device_operations with an
37 added method for make_request */
38 struct raid_device_operations
{
39 int (*open
) (struct inode
*, struct file
*);
40 int (*release
) (struct inode
*, struct file
*);
41 int (*ioctl
) (struct inode
*, struct file
*, unsigned, unsigned long);
42 int (*make_request
) (request_queue_t
*q
, int rw
, struct buffer_head
* bh
);
48 unsigned int cylinders
;
49 unsigned char sectors
;
52 /* structure for the splitting of bufferheads */
54 struct ataraid_bh_private
{
55 struct buffer_head
*parent
;
59 extern struct gendisk ataraid_gendisk
;
61 extern int ataraid_get_device(struct raid_device_operations
*fops
);
62 extern void ataraid_release_device(int device
);
63 extern int get_blocksize(kdev_t dev
);
64 extern void ataraid_register_disk(int device
,long size
);
65 extern struct buffer_head
*ataraid_get_bhead(void);
66 extern struct ataraid_bh_private
*ataraid_get_private(void);
67 extern void ataraid_end_request(struct buffer_head
*bh
, int uptodate
);