summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@home.transmeta.com>2002-07-18 20:50:44 -0700
committerLinus Torvalds <torvalds@home.transmeta.com>2002-07-18 20:50:44 -0700
commitfaaab2cfed81a30e38ad15051865d5cd7cbf8274 (patch)
tree3ced1bea83e7801baeba1043672dd0f19ad5193e /include
parentaa3202b28dbd4ae677a6dbf121bcbf38342ae386 (diff)
parent84f4a1c476b850edf3e54bf0db060b481b7a78d6 (diff)
Merge http://linuxusb.bkbits.net/agpgart-2.5
into home.transmeta.com:/home/torvalds/v2.5/linux
Diffstat (limited to 'include')
-rw-r--r--include/asm-alpha/ide.h2
-rw-r--r--include/asm-arm/ide.h2
-rw-r--r--include/asm-cris/ide.h2
-rw-r--r--include/asm-i386/ide.h2
-rw-r--r--include/asm-ia64/ide.h2
-rw-r--r--include/asm-m68k/ide.h31
-rw-r--r--include/asm-mips/ide.h2
-rw-r--r--include/asm-mips64/ide.h2
-rw-r--r--include/asm-parisc/ide.h2
-rw-r--r--include/asm-ppc/ide.h2
-rw-r--r--include/asm-ppc64/ide.h6
-rw-r--r--include/asm-s390/ide.h2
-rw-r--r--include/asm-s390x/ide.h29
-rw-r--r--include/asm-sh/ide.h2
-rw-r--r--include/asm-sparc/ide.h2
-rw-r--r--include/asm-sparc64/ide.h2
-rw-r--r--include/asm-x86_64/ide.h2
-rw-r--r--include/linux/atapi.h26
-rw-r--r--include/linux/ide.h62
-rw-r--r--include/linux/pci_ids.h1
-rw-r--r--include/linux/raid/md.h1
-rw-r--r--include/linux/raid/md_k.h64
-rw-r--r--include/linux/raid/multipath.h31
-rw-r--r--include/linux/raid/raid1.h3
-rw-r--r--include/linux/raid/raid5.h2
-rw-r--r--include/linux/sunrpc/xprt.h2
26 files changed, 87 insertions, 199 deletions
diff --git a/include/asm-alpha/ide.h b/include/asm-alpha/ide.h
index 5ec5fe1da2c1..63bb9f785498 100644
--- a/include/asm-alpha/ide.h
+++ b/include/asm-alpha/ide.h
@@ -19,8 +19,6 @@
#define MAX_HWIFS 4
#endif
-#define ide__sti() __sti()
-
static __inline__ int ide_default_irq(ide_ioreg_t base)
{
switch (base) {
diff --git a/include/asm-arm/ide.h b/include/asm-arm/ide.h
index f1cbbe4876ea..741b223b06f0 100644
--- a/include/asm-arm/ide.h
+++ b/include/asm-arm/ide.h
@@ -17,8 +17,6 @@
#define MAX_HWIFS 4
#endif
-#define ide__sti() __sti()
-
#include <asm/arch/ide.h>
/*
diff --git a/include/asm-cris/ide.h b/include/asm-cris/ide.h
index 051e96142e10..8f4bd8c131f4 100644
--- a/include/asm-cris/ide.h
+++ b/include/asm-cris/ide.h
@@ -22,8 +22,6 @@
#define MAX_HWIFS 4
-#define ide__sti() __sti()
-
static __inline__ int ide_default_irq(ide_ioreg_t base)
{
/* all IDE busses share the same IRQ, number 4.
diff --git a/include/asm-i386/ide.h b/include/asm-i386/ide.h
index 9bec7f280cde..b2ad635bdf94 100644
--- a/include/asm-i386/ide.h
+++ b/include/asm-i386/ide.h
@@ -23,8 +23,6 @@
# endif
#endif
-#define ide__sti() __sti()
-
static __inline__ int ide_default_irq(ide_ioreg_t base)
{
switch (base) {
diff --git a/include/asm-ia64/ide.h b/include/asm-ia64/ide.h
index 50370ff4de3d..3c9fe4910181 100644
--- a/include/asm-ia64/ide.h
+++ b/include/asm-ia64/ide.h
@@ -25,8 +25,6 @@
# endif
#endif
-#define ide__sti() __sti()
-
static __inline__ int
ide_default_irq (ide_ioreg_t base)
{
diff --git a/include/asm-m68k/ide.h b/include/asm-m68k/ide.h
index 28c7e66668ea..1471687982a9 100644
--- a/include/asm-m68k/ide.h
+++ b/include/asm-m68k/ide.h
@@ -171,36 +171,5 @@ static __inline__ void ide_get_lock (int *ide_lock, void (*handler)(int, void *,
}
}
#endif /* CONFIG_ATARI */
-
-/*
- * On the Atari, we sometimes can't enable interrupts:
- */
-
-/* MSch: changed sti() to STI() wherever possible in ide.c; moved STI() def.
- * to asm/ide.h
- */
-/* The Atari interrupt structure strictly requires that the IPL isn't lowered
- * uncontrolled in an interrupt handler. In the concrete case, the IDE
- * interrupt is already a slow int, so the irq is already disabled at the time
- * the handler is called, and the IPL has been lowered to the minimum value
- * possible. To avoid going below that, STI() checks for being called inside
- * an interrupt, and in that case it does nothing. Hope that is reasonable and
- * works. (Roman)
- */
-#ifdef MACH_ATARI_ONLY
-#define ide__sti() \
- do { \
- if (!in_interrupt()) __sti(); \
- } while(0)
-#elif defined(CONFIG_ATARI)
-#define ide__sti() \
- do { \
- if (!MACH_IS_ATARI || !in_interrupt()) sti(); \
- } while(0)
-#else /* !defined(CONFIG_ATARI) */
-#define ide__sti() __sti()
-#endif
-
#endif /* __KERNEL__ */
-
#endif /* _M68K_IDE_H */
diff --git a/include/asm-mips/ide.h b/include/asm-mips/ide.h
index 85447877a181..33cd055aea35 100644
--- a/include/asm-mips/ide.h
+++ b/include/asm-mips/ide.h
@@ -24,8 +24,6 @@
# endif
#endif
-#define ide__sti() __sti()
-
struct ide_ops {
int (*ide_default_irq)(ide_ioreg_t base);
ide_ioreg_t (*ide_default_io_base)(int index);
diff --git a/include/asm-mips64/ide.h b/include/asm-mips64/ide.h
index ce6635f97a0c..de357ad5070e 100644
--- a/include/asm-mips64/ide.h
+++ b/include/asm-mips64/ide.h
@@ -27,8 +27,6 @@
# endif
#endif
-#define ide__sti() __sti()
-
struct ide_ops {
int (*ide_default_irq)(ide_ioreg_t base);
ide_ioreg_t (*ide_default_io_base)(int index);
diff --git a/include/asm-parisc/ide.h b/include/asm-parisc/ide.h
index 133997006872..be46fbf6af79 100644
--- a/include/asm-parisc/ide.h
+++ b/include/asm-parisc/ide.h
@@ -19,8 +19,6 @@
#define MAX_HWIFS 10
#endif
-#define ide__sti() __sti()
-
static __inline__ int ide_default_irq(ide_ioreg_t base)
{
switch (base) {
diff --git a/include/asm-ppc/ide.h b/include/asm-ppc/ide.h
index 48dafbc1655b..db9bd31d08c5 100644
--- a/include/asm-ppc/ide.h
+++ b/include/asm-ppc/ide.h
@@ -44,8 +44,6 @@ extern struct ide_machdep_calls ppc_ide_md;
#undef SUPPORT_SLOW_DATA_PORTS
#define SUPPORT_SLOW_DATA_PORTS 0
-#define ide__sti() __sti()
-
static __inline__ int ide_default_irq(ide_ioreg_t base)
{
if (ppc_ide_md.default_irq)
diff --git a/include/asm-ppc64/ide.h b/include/asm-ppc64/ide.h
index 4752dee41b2f..717dd566c7e7 100644
--- a/include/asm-ppc64/ide.h
+++ b/include/asm-ppc64/ide.h
@@ -7,7 +7,7 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
- */
+ */
/*
* This file contains the ppc64 architecture specific IDE code.
@@ -19,11 +19,9 @@
#ifdef __KERNEL__
#ifndef MAX_HWIFS
-#define MAX_HWIFS 4
+# define MAX_HWIFS 4
#endif
-#define ide__sti() __sti()
-
static __inline__ int ide_default_irq(ide_ioreg_t base) { return 0; }
static __inline__ ide_ioreg_t ide_default_io_base(int index) { return 0; }
diff --git a/include/asm-s390/ide.h b/include/asm-s390/ide.h
index b5ca760a3097..01d7765f7ef4 100644
--- a/include/asm-s390/ide.h
+++ b/include/asm-s390/ide.h
@@ -15,8 +15,6 @@
#define MAX_HWIFS 0
#endif
-#define ide__sti() do {} while (0)
-
/*
* We always use the new IDE port registering,
* so these are fixed here.
diff --git a/include/asm-s390x/ide.h b/include/asm-s390x/ide.h
deleted file mode 100644
index b5ca760a3097..000000000000
--- a/include/asm-s390x/ide.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * linux/include/asm-s390/ide.h
- *
- * Copyright (C) 1994-1996 Linus Torvalds & authors
- */
-
-/* s390 does not have IDE */
-
-#ifndef __ASMS390_IDE_H
-#define __ASMS390_IDE_H
-
-#ifdef __KERNEL__
-
-#ifndef MAX_HWIFS
-#define MAX_HWIFS 0
-#endif
-
-#define ide__sti() do {} while (0)
-
-/*
- * We always use the new IDE port registering,
- * so these are fixed here.
- */
-#define ide_default_io_base(i) ((ide_ioreg_t)0)
-#define ide_default_irq(b) (0)
-
-#endif /* __KERNEL__ */
-
-#endif /* __ASMS390_IDE_H */
diff --git a/include/asm-sh/ide.h b/include/asm-sh/ide.h
index 9a2ddc373224..eb551e50d57f 100644
--- a/include/asm-sh/ide.h
+++ b/include/asm-sh/ide.h
@@ -22,8 +22,6 @@
#define MAX_HWIFS 2
#endif
-#define ide__sti() __sti()
-
static __inline__ int ide_default_irq_hp600(ide_ioreg_t base)
{
switch (base) {
diff --git a/include/asm-sparc/ide.h b/include/asm-sparc/ide.h
index 7ac2eda1d0e7..07bb6650f34c 100644
--- a/include/asm-sparc/ide.h
+++ b/include/asm-sparc/ide.h
@@ -20,8 +20,6 @@
#undef MAX_HWIFS
#define MAX_HWIFS 2
-#define ide__sti() __sti()
-
static __inline__ int ide_default_irq(ide_ioreg_t base)
{
return 0;
diff --git a/include/asm-sparc64/ide.h b/include/asm-sparc64/ide.h
index de65170ba834..d5672caf1628 100644
--- a/include/asm-sparc64/ide.h
+++ b/include/asm-sparc64/ide.h
@@ -20,8 +20,6 @@
#undef MAX_HWIFS
#define MAX_HWIFS 2
-#define ide__sti() __sti()
-
static __inline__ int ide_default_irq(ide_ioreg_t base)
{
return 0;
diff --git a/include/asm-x86_64/ide.h b/include/asm-x86_64/ide.h
index 9bec7f280cde..b2ad635bdf94 100644
--- a/include/asm-x86_64/ide.h
+++ b/include/asm-x86_64/ide.h
@@ -23,8 +23,6 @@
# endif
#endif
-#define ide__sti() __sti()
-
static __inline__ int ide_default_irq(ide_ioreg_t base)
{
switch (base) {
diff --git a/include/linux/atapi.h b/include/linux/atapi.h
index 0ac305922e3a..806aa4e49146 100644
--- a/include/linux/atapi.h
+++ b/include/linux/atapi.h
@@ -74,15 +74,6 @@ struct atapi_packet_command {
} s;
};
-extern void atapi_init_pc(struct atapi_packet_command *pc);
-
-extern void atapi_discard_data(struct ata_device *, unsigned int);
-extern void atapi_write_zeros(struct ata_device *, unsigned int);
-
-extern void atapi_read(struct ata_device *, u8 *, unsigned int);
-extern void atapi_write(struct ata_device *, u8 *, unsigned int);
-
-
/*
* ATAPI Status Register.
*/
@@ -360,3 +351,20 @@ typedef struct atapi_request_sense {
u8 sk_specific[2]; /* Sense Key Specific */
u8 pad[2]; /* Padding to 20 bytes */
} atapi_request_sense_result_t;
+
+
+extern void atapi_init_pc(struct atapi_packet_command *pc);
+
+extern void atapi_discard_data(struct ata_device *, unsigned int);
+extern void atapi_write_zeros(struct ata_device *, unsigned int);
+
+extern void atapi_read(struct ata_device *, u8 *, unsigned int);
+extern void atapi_write(struct ata_device *, u8 *, unsigned int);
+
+typedef enum {
+ ide_wait, /* insert rq at end of list, and wait for it */
+ ide_preempt, /* insert rq in front of current request */
+ ide_end /* insert rq at end of list, but don't wait for it */
+} ide_action_t;
+
+extern int ide_do_drive_cmd(struct ata_device *, struct request *, ide_action_t);
diff --git a/include/linux/ide.h b/include/linux/ide.h
index 4076310675f8..7b9c5cce01cf 100644
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -1,5 +1,6 @@
#ifndef _IDE_H
#define _IDE_H
+
/*
* Copyright (C) 1994-2002 Linus Torvalds & authors
*/
@@ -57,15 +58,14 @@ typedef unsigned char byte; /* used everywhere */
*/
#define ERROR_MAX 8 /* Max read/write errors per sector */
#define ERROR_RESET 3 /* Reset controller every 4th retry */
-#define ERROR_RECAL 1 /* Recalibrate every 2nd retry */
/*
- * state flags
+ * State flags.
*/
#define DMA_PIO_RETRY 1 /* retrying in PIO */
/*
- * Definitions for accessing IDE controller registers
+ * Definitions for accessing IDE controller registers.
*/
enum {
@@ -192,23 +192,21 @@ typedef enum {
* Structure to hold all information about the location of this port
*/
typedef struct hw_regs_s {
- ide_ioreg_t io_ports[IDE_NR_PORTS]; /* task file registers */
- int irq; /* our irq number */
- int dma; /* our dma entry */
- ide_ack_intr_t *ack_intr; /* acknowledge interrupt */
+ ide_ioreg_t io_ports[IDE_NR_PORTS]; /* task file registers */
+ int irq; /* our irq number */
+ int dma; /* our dma entry */
+ int (*ack_intr)(struct ata_channel *); /* acknowledge interrupt */
hwif_chipset_t chipset;
} hw_regs_t;
/*
* Set up hw_regs_t structure before calling ide_register_hw (optional)
*/
-void ide_setup_ports(hw_regs_t *hw,
- ide_ioreg_t base,
- int *offsets,
- ide_ioreg_t ctrl,
- ide_ioreg_t intr,
- ide_ack_intr_t *ack_intr,
- int irq);
+extern void ide_setup_ports(hw_regs_t *hw,
+ ide_ioreg_t base, int *offsets,
+ ide_ioreg_t ctrl, ide_ioreg_t intr,
+ int (*ack_intr)(struct ata_channel *),
+ int irq);
#include <asm/ide.h>
@@ -282,14 +280,10 @@ struct ata_device {
unsigned int usage; /* current "open()" count for drive */
char type; /* distingiush different devices: disk, cdrom, tape, floppy, ... */
- /* NOTE: If we had proper separation between channel and host chip, we
- * could move this to the channel and many sync problems would
- * magically just go away.
- */
- request_queue_t queue; /* per device request queue */
+ request_queue_t queue; /* per device request queue */
struct request *rq; /* current request */
- unsigned long sleep; /* sleep until this time */
+ unsigned long sleep; /* sleep until this time */
byte retry_pio; /* retrying dma capable host in pio */
byte state; /* retry state */
@@ -341,6 +335,7 @@ struct ata_device {
void *driver_data; /* extra driver data */
devfs_handle_t de; /* directory for device */
+
char driver_req[10]; /* requests specific driver */
int last_lun; /* last logical unit */
@@ -392,6 +387,7 @@ enum {
enum {
IDE_BUSY, /* awaiting an interrupt */
IDE_SLEEP,
+ IDE_PIO, /* PIO in progress */
IDE_DMA /* DMA in progress */
};
@@ -404,11 +400,15 @@ struct ata_channel {
*/
spinlock_t *lock;
unsigned long *active; /* active processing request */
-
ide_startstop_t (*handler)(struct ata_device *, struct request *); /* irq handler, if active */
+
+ /* FIXME: Only still used in PDC4030. Localize this code there by
+ * replacing with busy waits.
+ */
struct timer_list timer; /* failsafe timer */
ide_startstop_t (*expiry)(struct ata_device *, struct request *, unsigned long *); /* irq handler, if active */
unsigned long poll_timeout; /* timeout value during polled operations */
+
struct ata_device *drive; /* last serviced drive */
@@ -508,8 +508,6 @@ struct ata_channel {
extern int ide_register_hw(hw_regs_t *hw);
extern void ide_unregister(struct ata_channel *);
-struct ata_taskfile;
-
#define IDE_MAX_TAG 32
#ifdef CONFIG_BLK_DEV_IDE_TCQ
@@ -605,8 +603,7 @@ extern int noautodma;
#define DEVICE_NR(device) (minor(device) >> PARTN_BITS)
#include <linux/blk.h>
-extern int __ata_end_request(struct ata_device *, struct request *, int, unsigned int);
-
+extern int ata_end_request(struct ata_device *, struct request *, int, unsigned int);
extern void ata_set_handler(struct ata_device *drive, ata_handler_t handler,
unsigned long timeout, ata_expiry_t expiry);
@@ -627,21 +624,10 @@ int ide_xlate_1024(kdev_t, int, int, const char *);
struct ata_device *get_info_ptr(kdev_t i_rdev);
/*
- * "action" parameter type for ide_do_drive_cmd() below.
- */
-typedef enum {
- ide_wait, /* insert rq at end of list, and wait for it */
- ide_preempt, /* insert rq in front of current request */
- ide_end /* insert rq at end of list, but don't wait for it */
-} ide_action_t;
-
-/*
* temporarily mapping a (possible) highmem bio for PIO transfer
*/
#define ide_rq_offset(rq) (((rq)->hard_cur_sectors - (rq)->current_nr_sectors) << 9)
-extern int ide_do_drive_cmd(struct ata_device *, struct request *, ide_action_t);
-
struct ata_taskfile {
struct hd_drive_task_hdr taskfile;
struct hd_drive_task_hdr hobfile;
@@ -654,7 +640,6 @@ extern void ata_read(struct ata_device *, void *, unsigned int);
extern void ata_write(struct ata_device *, void *, unsigned int);
extern int ide_raw_taskfile(struct ata_device *, struct ata_taskfile *, char *);
-extern void ide_fix_driveid(struct hd_driveid *id);
extern int ide_config_drive_speed(struct ata_device *, byte);
extern byte eighty_ninty_three(struct ata_device *);
@@ -803,13 +788,12 @@ extern spinlock_t ide_lock;
#define DRIVE_LOCK(drive) ((drive)->queue.queue_lock)
-extern int drive_is_ready(struct ata_device *drive);
-
/* Low level device access functions. */
extern void ata_select(struct ata_device *, unsigned long);
extern void ata_mask(struct ata_device *);
extern int ata_status(struct ata_device *, u8, u8);
+extern int ata_status_irq(struct ata_device *drive);
extern int ata_status_poll( struct ata_device *, u8, u8,
unsigned long, struct request *rq);
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index 6758bf742e0c..c1f391bf8f62 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -610,6 +610,7 @@
#define PCI_DEVICE_ID_PROMISE_20268 0x4d68
#define PCI_DEVICE_ID_PROMISE_20268R 0x6268
#define PCI_DEVICE_ID_PROMISE_20269 0x4d69
+#define PCI_DEVICE_ID_PROMISE_20271 0x6269
#define PCI_DEVICE_ID_PROMISE_20275 0x1275
#define PCI_DEVICE_ID_PROMISE_20276 0x5275
#define PCI_DEVICE_ID_PROMISE_5300 0x5300
diff --git a/include/linux/raid/md.h b/include/linux/raid/md.h
index 280092c6e95b..45aaf76dd768 100644
--- a/include/linux/raid/md.h
+++ b/include/linux/raid/md.h
@@ -75,7 +75,6 @@ extern mdk_thread_t * md_register_thread (void (*run) (void *data),
extern void md_unregister_thread (mdk_thread_t *thread);
extern void md_wakeup_thread(mdk_thread_t *thread);
extern void md_interrupt_thread (mdk_thread_t *thread);
-extern void md_update_sb (mddev_t *mddev);
extern void md_done_sync(mddev_t *mddev, int blocks, int ok);
extern void md_sync_acct(struct block_device *bdev, unsigned long nr_sectors);
extern int md_error (mddev_t *mddev, struct block_device *bdev);
diff --git a/include/linux/raid/md_k.h b/include/linux/raid/md_k.h
index 2a9bbed805ad..12358bb23a99 100644
--- a/include/linux/raid/md_k.h
+++ b/include/linux/raid/md_k.h
@@ -25,13 +25,16 @@
#define MULTIPATH 7UL
#define MAX_PERSONALITY 8UL
+#define LEVEL_MULTIPATH (-4)
+#define LEVEL_LINEAR (-1)
+
static inline int pers_to_level (int pers)
{
switch (pers) {
- case MULTIPATH: return -4;
+ case MULTIPATH: return LEVEL_MULTIPATH;
case HSM: return -3;
case TRANSLUCENT: return -2;
- case LINEAR: return -1;
+ case LINEAR: return LEVEL_LINEAR;
case RAID0: return 0;
case RAID1: return 1;
case RAID5: return 5;
@@ -43,10 +46,10 @@ static inline int pers_to_level (int pers)
static inline int level_to_pers (int level)
{
switch (level) {
- case -4: return MULTIPATH;
+ case LEVEL_MULTIPATH: return MULTIPATH;
case -3: return HSM;
case -2: return TRANSLUCENT;
- case -1: return LINEAR;
+ case LEVEL_LINEAR: return LINEAR;
case 0: return RAID0;
case 1: return RAID1;
case 4:
@@ -140,11 +143,7 @@ static inline void mark_disk_nonsync(mdp_disk_t * d)
struct mdk_rdev_s
{
struct list_head same_set; /* RAID devices within the same set */
- struct list_head all; /* all RAID devices */
- struct list_head pending; /* undetected RAID devices */
- kdev_t dev; /* Device number */
- kdev_t old_dev; /* "" when it was last imported */
unsigned long size; /* Device size (in blocks) */
mddev_t *mddev; /* RAID array if running */
unsigned long last_events; /* IO event timestamp */
@@ -157,7 +156,10 @@ struct mdk_rdev_s
int alias_device; /* device alias to the same disk */
int faulty; /* if faulty do not issue IO requests */
+ int in_sync; /* device is a full member of the array */
+
int desc_nr; /* descriptor index in the superblock */
+ int raid_disk; /* role of device in array */
};
typedef struct mdk_personality_s mdk_personality_t;
@@ -167,11 +169,25 @@ struct mddev_s
void *private;
mdk_personality_t *pers;
int __minor;
- mdp_super_t *sb;
struct list_head disks;
int sb_dirty;
int ro;
+ /* Superblock information */
+ int major_version,
+ minor_version,
+ patch_version;
+ int persistent;
+ int chunk_size;
+ time_t ctime, utime;
+ int level, layout;
+ int raid_disks;
+ unsigned long state;
+ sector_t size; /* used size of component devices */
+ __u64 events;
+
+ char uuid[16];
+
struct mdk_thread_s *sync_thread; /* doing resync or reconstruct */
unsigned long curr_resync; /* blocks scheduled */
unsigned long resync_mark; /* a recent timestamp */
@@ -186,7 +202,11 @@ struct mddev_s
int in_sync; /* know to not need resync */
struct semaphore reconfig_sem;
atomic_t active;
- mdp_disk_t *spare;
+ mdk_rdev_t *spare;
+
+ int degraded; /* whether md should consider
+ * adding a spare
+ */
atomic_t recovery_active; /* blocks scheduled, but not written */
wait_queue_head_t recovery_wait;
@@ -204,11 +224,11 @@ struct mdk_personality_s
int (*stop)(mddev_t *mddev);
int (*status)(char *page, mddev_t *mddev);
int (*error_handler)(mddev_t *mddev, struct block_device *bdev);
- int (*hot_add_disk) (mddev_t *mddev, mdp_disk_t *descriptor, mdk_rdev_t *rdev);
+ int (*hot_add_disk) (mddev_t *mddev, mdk_rdev_t *rdev);
int (*hot_remove_disk) (mddev_t *mddev, int number);
- int (*spare_write) (mddev_t *mddev, int number);
+ int (*spare_write) (mddev_t *mddev);
int (*spare_inactive) (mddev_t *mddev);
- int (*spare_active) (mddev_t *mddev, mdp_disk_t **descriptor);
+ int (*spare_active) (mddev_t *mddev);
int (*sync_request)(mddev_t *mddev, sector_t sector_nr, int go_faster);
};
@@ -228,38 +248,30 @@ static inline kdev_t mddev_to_kdev(mddev_t * mddev)
return mk_kdev(MD_MAJOR, mdidx(mddev));
}
-extern mdk_rdev_t * find_rdev(mddev_t * mddev, kdev_t dev);
extern mdk_rdev_t * find_rdev_nr(mddev_t *mddev, int nr);
-extern mdp_disk_t *get_spare(mddev_t *mddev);
+extern mdk_rdev_t *get_spare(mddev_t *mddev);
/*
* iterates through some rdev ringlist. It's safe to remove the
* current 'rdev'. Dont touch 'tmp' though.
*/
-#define ITERATE_RDEV_GENERIC(head,field,rdev,tmp) \
+#define ITERATE_RDEV_GENERIC(head,rdev,tmp) \
\
for ((tmp) = (head).next; \
- (rdev) = (list_entry((tmp), mdk_rdev_t, field)), \
+ (rdev) = (list_entry((tmp), mdk_rdev_t, same_set)), \
(tmp) = (tmp)->next, (tmp)->prev != &(head) \
; )
/*
* iterates through the 'same array disks' ringlist
*/
#define ITERATE_RDEV(mddev,rdev,tmp) \
- ITERATE_RDEV_GENERIC((mddev)->disks,same_set,rdev,tmp)
-
-
-/*
- * Iterates through all 'RAID managed disks'
- */
-#define ITERATE_RDEV_ALL(rdev,tmp) \
- ITERATE_RDEV_GENERIC(all_raid_disks,all,rdev,tmp)
+ ITERATE_RDEV_GENERIC((mddev)->disks,rdev,tmp)
/*
* Iterates through 'pending RAID disks'
*/
#define ITERATE_RDEV_PENDING(rdev,tmp) \
- ITERATE_RDEV_GENERIC(pending_raid_disks,pending,rdev,tmp)
+ ITERATE_RDEV_GENERIC(pending_raid_disks,rdev,tmp)
#define xchg_values(x,y) do { __typeof__(x) __tmp = x; \
x = y; y = __tmp; } while (0)
diff --git a/include/linux/raid/multipath.h b/include/linux/raid/multipath.h
index e4f3e6189b7b..6ceb343eedb0 100644
--- a/include/linux/raid/multipath.h
+++ b/include/linux/raid/multipath.h
@@ -2,17 +2,15 @@
#define _MULTIPATH_H
#include <linux/raid/md.h>
+#include <linux/bio.h>
struct multipath_info {
- int number;
- int raid_disk;
struct block_device *bdev;
/*
* State bits:
*/
int operational;
- int spare;
int used_slot;
};
@@ -20,23 +18,12 @@ struct multipath_info {
struct multipath_private_data {
mddev_t *mddev;
struct multipath_info multipaths[MD_SB_DISKS];
- int nr_disks;
int raid_disks;
int working_disks;
mdk_thread_t *thread;
- struct multipath_info *spare;
spinlock_t device_lock;
- /* buffer pool */
- /* buffer_heads that we have pre-allocated have b_pprev -> &freebh
- * and are linked into a stack using b_next
- * multipath_bh that are pre-allocated have MPBH_PreAlloc set.
- * All these variable are protected by device_lock
- */
- struct multipath_bh *freer1;
- int freer1_blocked;
- int freer1_cnt;
- wait_queue_head_t wait_buffer;
+ mempool_t *pool;
};
typedef struct multipath_private_data multipath_conf_t;
@@ -54,18 +41,10 @@ typedef struct multipath_private_data multipath_conf_t;
*/
struct multipath_bh {
- atomic_t remaining; /* 'have we finished' count,
- * used from IRQ handlers
- */
- int cmd;
- unsigned long state;
mddev_t *mddev;
struct bio *master_bio;
- struct bio *bio;
- struct multipath_bh *next_mp; /* next for retry or in free list */
+ struct bio bio;
+ int path;
+ struct multipath_bh *next_mp; /* next for retry */
};
-/* bits for multipath_bh.state */
-#define MPBH_Uptodate 1
-#define MPBH_SyncPhase 2
-#define MPBH_PreAlloc 3 /* this was pre-allocated, add to free list */
#endif
diff --git a/include/linux/raid/raid1.h b/include/linux/raid/raid1.h
index f63d68e55c11..28651c4d0658 100644
--- a/include/linux/raid/raid1.h
+++ b/include/linux/raid/raid1.h
@@ -6,8 +6,6 @@
typedef struct mirror_info mirror_info_t;
struct mirror_info {
- int number;
- int raid_disk;
struct block_device *bdev;
sector_t head_position;
atomic_t nr_pending;
@@ -27,7 +25,6 @@ typedef struct r1bio_s r1bio_t;
struct r1_private_data_s {
mddev_t *mddev;
mirror_info_t mirrors[MD_SB_DISKS];
- int nr_disks;
int raid_disks;
int working_disks;
int last_used;
diff --git a/include/linux/raid/raid5.h b/include/linux/raid/raid5.h
index 7f8beb8acdaa..7e8333a75bd4 100644
--- a/include/linux/raid/raid5.h
+++ b/include/linux/raid/raid5.h
@@ -194,8 +194,6 @@ struct stripe_head {
struct disk_info {
struct block_device *bdev;
int operational;
- int number;
- int raid_disk;
int write_only;
int spare;
int used_slot;
diff --git a/include/linux/sunrpc/xprt.h b/include/linux/sunrpc/xprt.h
index 0a247f460ff7..eca42599039f 100644
--- a/include/linux/sunrpc/xprt.h
+++ b/include/linux/sunrpc/xprt.h
@@ -37,7 +37,7 @@
#define RPC_MAXREQS RPC_MAXCONG
#define RPC_CWNDSCALE (256)
#define RPC_MAXCWND (RPC_MAXCONG * RPC_CWNDSCALE)
-#define RPC_INITCWND (RPC_MAXCWND >> 1)
+#define RPC_INITCWND RPC_CWNDSCALE
#define RPCXPRT_CONGESTED(xprt) ((xprt)->cong >= (xprt)->cwnd)
/* Default timeout values */