diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/device-mapper.h | 6 | ||||
| -rw-r--r-- | include/linux/dm-ioctl.h | 4 | ||||
| -rw-r--r-- | include/linux/gameport.h | 1 | ||||
| -rw-r--r-- | include/linux/gpio_keys.h | 1 | ||||
| -rw-r--r-- | include/linux/input.h | 9 | ||||
| -rw-r--r-- | include/linux/joystick.h | 2 | ||||
| -rw-r--r-- | include/linux/libps2.h | 1 | ||||
| -rw-r--r-- | include/linux/netfilter/nf_conntrack_common.h | 8 | ||||
| -rw-r--r-- | include/linux/netfilter/nfnetlink_conntrack.h | 8 | ||||
| -rw-r--r-- | include/linux/netfilter/nfnetlink_log.h | 3 | ||||
| -rw-r--r-- | include/linux/raid/bitmap.h | 1 | ||||
| -rw-r--r-- | include/linux/raid/linear.h | 2 | ||||
| -rw-r--r-- | include/linux/raid/md.h | 2 | ||||
| -rw-r--r-- | include/linux/raid/md_k.h | 17 | ||||
| -rw-r--r-- | include/linux/raid/md_p.h | 3 | ||||
| -rw-r--r-- | include/linux/raid/raid5.h | 64 | ||||
| -rw-r--r-- | include/linux/serio.h | 4 |
17 files changed, 85 insertions, 51 deletions
diff --git a/include/linux/device-mapper.h b/include/linux/device-mapper.h index 0d8d419d191..a90222e3297 100644 --- a/include/linux/device-mapper.h +++ b/include/linux/device-mapper.h | |||
| @@ -9,11 +9,13 @@ | |||
| 9 | #define _LINUX_DEVICE_MAPPER_H | 9 | #define _LINUX_DEVICE_MAPPER_H |
| 10 | 10 | ||
| 11 | #include <linux/bio.h> | 11 | #include <linux/bio.h> |
| 12 | #include <linux/blkdev.h> | ||
| 12 | 13 | ||
| 13 | struct dm_target; | 14 | struct dm_target; |
| 14 | struct dm_table; | 15 | struct dm_table; |
| 15 | struct dm_dev; | 16 | struct dm_dev; |
| 16 | struct mapped_device; | 17 | struct mapped_device; |
| 18 | struct bio_vec; | ||
| 17 | 19 | ||
| 18 | typedef enum { STATUSTYPE_INFO, STATUSTYPE_TABLE } status_type_t; | 20 | typedef enum { STATUSTYPE_INFO, STATUSTYPE_TABLE } status_type_t; |
| 19 | 21 | ||
| @@ -72,6 +74,9 @@ typedef int (*dm_ioctl_fn) (struct dm_target *ti, struct inode *inode, | |||
| 72 | struct file *filp, unsigned int cmd, | 74 | struct file *filp, unsigned int cmd, |
| 73 | unsigned long arg); | 75 | unsigned long arg); |
| 74 | 76 | ||
| 77 | typedef int (*dm_merge_fn) (struct dm_target *ti, struct bvec_merge_data *bvm, | ||
| 78 | struct bio_vec *biovec, int max_size); | ||
| 79 | |||
| 75 | void dm_error(const char *message); | 80 | void dm_error(const char *message); |
| 76 | 81 | ||
| 77 | /* | 82 | /* |
| @@ -107,6 +112,7 @@ struct target_type { | |||
| 107 | dm_status_fn status; | 112 | dm_status_fn status; |
| 108 | dm_message_fn message; | 113 | dm_message_fn message; |
| 109 | dm_ioctl_fn ioctl; | 114 | dm_ioctl_fn ioctl; |
| 115 | dm_merge_fn merge; | ||
| 110 | }; | 116 | }; |
| 111 | 117 | ||
| 112 | struct io_restrictions { | 118 | struct io_restrictions { |
diff --git a/include/linux/dm-ioctl.h b/include/linux/dm-ioctl.h index b03c41bbfa1..28c2940eb30 100644 --- a/include/linux/dm-ioctl.h +++ b/include/linux/dm-ioctl.h | |||
| @@ -256,9 +256,9 @@ enum { | |||
| 256 | #define DM_DEV_SET_GEOMETRY _IOWR(DM_IOCTL, DM_DEV_SET_GEOMETRY_CMD, struct dm_ioctl) | 256 | #define DM_DEV_SET_GEOMETRY _IOWR(DM_IOCTL, DM_DEV_SET_GEOMETRY_CMD, struct dm_ioctl) |
| 257 | 257 | ||
| 258 | #define DM_VERSION_MAJOR 4 | 258 | #define DM_VERSION_MAJOR 4 |
| 259 | #define DM_VERSION_MINOR 13 | 259 | #define DM_VERSION_MINOR 14 |
| 260 | #define DM_VERSION_PATCHLEVEL 0 | 260 | #define DM_VERSION_PATCHLEVEL 0 |
| 261 | #define DM_VERSION_EXTRA "-ioctl (2007-10-18)" | 261 | #define DM_VERSION_EXTRA "-ioctl (2008-04-23)" |
| 262 | 262 | ||
| 263 | /* Status bits */ | 263 | /* Status bits */ |
| 264 | #define DM_READONLY_FLAG (1 << 0) /* In/Out */ | 264 | #define DM_READONLY_FLAG (1 << 0) /* In/Out */ |
diff --git a/include/linux/gameport.h b/include/linux/gameport.h index afad9527284..f64e29c0ef3 100644 --- a/include/linux/gameport.h +++ b/include/linux/gameport.h | |||
| @@ -68,7 +68,6 @@ struct gameport_driver { | |||
| 68 | 68 | ||
| 69 | int gameport_open(struct gameport *gameport, struct gameport_driver *drv, int mode); | 69 | int gameport_open(struct gameport *gameport, struct gameport_driver *drv, int mode); |
| 70 | void gameport_close(struct gameport *gameport); | 70 | void gameport_close(struct gameport *gameport); |
| 71 | void gameport_rescan(struct gameport *gameport); | ||
| 72 | 71 | ||
| 73 | #if defined(CONFIG_GAMEPORT) || (defined(MODULE) && defined(CONFIG_GAMEPORT_MODULE)) | 72 | #if defined(CONFIG_GAMEPORT) || (defined(MODULE) && defined(CONFIG_GAMEPORT_MODULE)) |
| 74 | 73 | ||
diff --git a/include/linux/gpio_keys.h b/include/linux/gpio_keys.h index c6d3a9de563..ec6ecd74781 100644 --- a/include/linux/gpio_keys.h +++ b/include/linux/gpio_keys.h | |||
| @@ -9,6 +9,7 @@ struct gpio_keys_button { | |||
| 9 | char *desc; | 9 | char *desc; |
| 10 | int type; /* input event type (EV_KEY, EV_SW) */ | 10 | int type; /* input event type (EV_KEY, EV_SW) */ |
| 11 | int wakeup; /* configure the button as a wake-up source */ | 11 | int wakeup; /* configure the button as a wake-up source */ |
| 12 | int debounce_interval; /* debounce ticks interval in msecs */ | ||
| 12 | }; | 13 | }; |
| 13 | 14 | ||
| 14 | struct gpio_keys_platform_data { | 15 | struct gpio_keys_platform_data { |
diff --git a/include/linux/input.h b/include/linux/input.h index d150c57e5f0..a5802c9c81a 100644 --- a/include/linux/input.h +++ b/include/linux/input.h | |||
| @@ -373,6 +373,8 @@ struct input_absinfo { | |||
| 373 | 373 | ||
| 374 | #define KEY_WIMAX 246 | 374 | #define KEY_WIMAX 246 |
| 375 | 375 | ||
| 376 | /* Range 248 - 255 is reserved for special needs of AT keyboard driver */ | ||
| 377 | |||
| 376 | #define BTN_MISC 0x100 | 378 | #define BTN_MISC 0x100 |
| 377 | #define BTN_0 0x100 | 379 | #define BTN_0 0x100 |
| 378 | #define BTN_1 0x101 | 380 | #define BTN_1 0x101 |
| @@ -640,6 +642,8 @@ struct input_absinfo { | |||
| 640 | #define SW_RFKILL_ALL 0x03 /* rfkill master switch, type "any" | 642 | #define SW_RFKILL_ALL 0x03 /* rfkill master switch, type "any" |
| 641 | set = radio enabled */ | 643 | set = radio enabled */ |
| 642 | #define SW_RADIO SW_RFKILL_ALL /* deprecated */ | 644 | #define SW_RADIO SW_RFKILL_ALL /* deprecated */ |
| 645 | #define SW_MICROPHONE_INSERT 0x04 /* set = inserted */ | ||
| 646 | #define SW_DOCK 0x05 /* set = plugged into dock */ | ||
| 643 | #define SW_MAX 0x0f | 647 | #define SW_MAX 0x0f |
| 644 | #define SW_CNT (SW_MAX+1) | 648 | #define SW_CNT (SW_MAX+1) |
| 645 | 649 | ||
| @@ -1215,11 +1219,6 @@ struct input_handle { | |||
| 1215 | struct list_head h_node; | 1219 | struct list_head h_node; |
| 1216 | }; | 1220 | }; |
| 1217 | 1221 | ||
| 1218 | #define to_dev(n) container_of(n, struct input_dev, node) | ||
| 1219 | #define to_handler(n) container_of(n, struct input_handler, node) | ||
| 1220 | #define to_handle(n) container_of(n, struct input_handle, d_node) | ||
| 1221 | #define to_handle_h(n) container_of(n, struct input_handle, h_node) | ||
| 1222 | |||
| 1223 | struct input_dev *input_allocate_device(void); | 1222 | struct input_dev *input_allocate_device(void); |
| 1224 | void input_free_device(struct input_dev *dev); | 1223 | void input_free_device(struct input_dev *dev); |
| 1225 | 1224 | ||
diff --git a/include/linux/joystick.h b/include/linux/joystick.h index e2d3a18af45..b5e051295a6 100644 --- a/include/linux/joystick.h +++ b/include/linux/joystick.h | |||
| @@ -2,8 +2,6 @@ | |||
| 2 | #define _LINUX_JOYSTICK_H | 2 | #define _LINUX_JOYSTICK_H |
| 3 | 3 | ||
| 4 | /* | 4 | /* |
| 5 | * $Id: joystick.h,v 1.3 2000/11/30 11:07:05 vojtech Exp $ | ||
| 6 | * | ||
| 7 | * Copyright (C) 1996-2000 Vojtech Pavlik | 5 | * Copyright (C) 1996-2000 Vojtech Pavlik |
| 8 | * | 6 | * |
| 9 | * Sponsored by SuSE | 7 | * Sponsored by SuSE |
diff --git a/include/linux/libps2.h b/include/linux/libps2.h index f6f301e2b0f..afc41336910 100644 --- a/include/linux/libps2.h +++ b/include/linux/libps2.h | |||
| @@ -43,7 +43,6 @@ void ps2_init(struct ps2dev *ps2dev, struct serio *serio); | |||
| 43 | int ps2_sendbyte(struct ps2dev *ps2dev, unsigned char byte, int timeout); | 43 | int ps2_sendbyte(struct ps2dev *ps2dev, unsigned char byte, int timeout); |
| 44 | void ps2_drain(struct ps2dev *ps2dev, int maxbytes, int timeout); | 44 | void ps2_drain(struct ps2dev *ps2dev, int maxbytes, int timeout); |
| 45 | int ps2_command(struct ps2dev *ps2dev, unsigned char *param, int command); | 45 | int ps2_command(struct ps2dev *ps2dev, unsigned char *param, int command); |
| 46 | int ps2_schedule_command(struct ps2dev *ps2dev, unsigned char *param, int command); | ||
| 47 | int ps2_handle_ack(struct ps2dev *ps2dev, unsigned char data); | 46 | int ps2_handle_ack(struct ps2dev *ps2dev, unsigned char data); |
| 48 | int ps2_handle_response(struct ps2dev *ps2dev, unsigned char data); | 47 | int ps2_handle_response(struct ps2dev *ps2dev, unsigned char data); |
| 49 | void ps2_cmd_aborted(struct ps2dev *ps2dev); | 48 | void ps2_cmd_aborted(struct ps2dev *ps2dev); |
diff --git a/include/linux/netfilter/nf_conntrack_common.h b/include/linux/netfilter/nf_conntrack_common.h index bad1eb760f6..885cbe28226 100644 --- a/include/linux/netfilter/nf_conntrack_common.h +++ b/include/linux/netfilter/nf_conntrack_common.h | |||
| @@ -122,7 +122,7 @@ enum ip_conntrack_events | |||
| 122 | IPCT_NATINFO_BIT = 10, | 122 | IPCT_NATINFO_BIT = 10, |
| 123 | IPCT_NATINFO = (1 << IPCT_NATINFO_BIT), | 123 | IPCT_NATINFO = (1 << IPCT_NATINFO_BIT), |
| 124 | 124 | ||
| 125 | /* Counter highest bit has been set */ | 125 | /* Counter highest bit has been set, unused */ |
| 126 | IPCT_COUNTER_FILLING_BIT = 11, | 126 | IPCT_COUNTER_FILLING_BIT = 11, |
| 127 | IPCT_COUNTER_FILLING = (1 << IPCT_COUNTER_FILLING_BIT), | 127 | IPCT_COUNTER_FILLING = (1 << IPCT_COUNTER_FILLING_BIT), |
| 128 | 128 | ||
| @@ -145,12 +145,6 @@ enum ip_conntrack_expect_events { | |||
| 145 | }; | 145 | }; |
| 146 | 146 | ||
| 147 | #ifdef __KERNEL__ | 147 | #ifdef __KERNEL__ |
| 148 | struct ip_conntrack_counter | ||
| 149 | { | ||
| 150 | u_int32_t packets; | ||
| 151 | u_int32_t bytes; | ||
| 152 | }; | ||
| 153 | |||
| 154 | struct ip_conntrack_stat | 148 | struct ip_conntrack_stat |
| 155 | { | 149 | { |
| 156 | unsigned int searched; | 150 | unsigned int searched; |
diff --git a/include/linux/netfilter/nfnetlink_conntrack.h b/include/linux/netfilter/nfnetlink_conntrack.h index 759bc043dc6..c19595c8930 100644 --- a/include/linux/netfilter/nfnetlink_conntrack.h +++ b/include/linux/netfilter/nfnetlink_conntrack.h | |||
| @@ -115,10 +115,10 @@ enum ctattr_protoinfo_sctp { | |||
| 115 | 115 | ||
| 116 | enum ctattr_counters { | 116 | enum ctattr_counters { |
| 117 | CTA_COUNTERS_UNSPEC, | 117 | CTA_COUNTERS_UNSPEC, |
| 118 | CTA_COUNTERS_PACKETS, /* old 64bit counters */ | 118 | CTA_COUNTERS_PACKETS, /* 64bit counters */ |
| 119 | CTA_COUNTERS_BYTES, /* old 64bit counters */ | 119 | CTA_COUNTERS_BYTES, /* 64bit counters */ |
| 120 | CTA_COUNTERS32_PACKETS, | 120 | CTA_COUNTERS32_PACKETS, /* old 32bit counters, unused */ |
| 121 | CTA_COUNTERS32_BYTES, | 121 | CTA_COUNTERS32_BYTES, /* old 32bit counters, unused */ |
| 122 | __CTA_COUNTERS_MAX | 122 | __CTA_COUNTERS_MAX |
| 123 | }; | 123 | }; |
| 124 | #define CTA_COUNTERS_MAX (__CTA_COUNTERS_MAX - 1) | 124 | #define CTA_COUNTERS_MAX (__CTA_COUNTERS_MAX - 1) |
diff --git a/include/linux/netfilter/nfnetlink_log.h b/include/linux/netfilter/nfnetlink_log.h index a8572133292..f661731f3cb 100644 --- a/include/linux/netfilter/nfnetlink_log.h +++ b/include/linux/netfilter/nfnetlink_log.h | |||
| @@ -48,6 +48,9 @@ enum nfulnl_attr_type { | |||
| 48 | NFULA_SEQ, /* instance-local sequence number */ | 48 | NFULA_SEQ, /* instance-local sequence number */ |
| 49 | NFULA_SEQ_GLOBAL, /* global sequence number */ | 49 | NFULA_SEQ_GLOBAL, /* global sequence number */ |
| 50 | NFULA_GID, /* group id of socket */ | 50 | NFULA_GID, /* group id of socket */ |
| 51 | NFULA_HWTYPE, /* hardware type */ | ||
| 52 | NFULA_HWHEADER, /* hardware header */ | ||
| 53 | NFULA_HWLEN, /* hardware header length */ | ||
| 51 | 54 | ||
| 52 | __NFULA_MAX | 55 | __NFULA_MAX |
| 53 | }; | 56 | }; |
diff --git a/include/linux/raid/bitmap.h b/include/linux/raid/bitmap.h index 78bfdea24a8..e98900671ca 100644 --- a/include/linux/raid/bitmap.h +++ b/include/linux/raid/bitmap.h | |||
| @@ -221,6 +221,7 @@ struct bitmap { | |||
| 221 | unsigned long syncchunk; | 221 | unsigned long syncchunk; |
| 222 | 222 | ||
| 223 | __u64 events_cleared; | 223 | __u64 events_cleared; |
| 224 | int need_sync; | ||
| 224 | 225 | ||
| 225 | /* bitmap spinlock */ | 226 | /* bitmap spinlock */ |
| 226 | spinlock_t lock; | 227 | spinlock_t lock; |
diff --git a/include/linux/raid/linear.h b/include/linux/raid/linear.h index ba15469daf1..7e375111d00 100644 --- a/include/linux/raid/linear.h +++ b/include/linux/raid/linear.h | |||
| @@ -16,7 +16,7 @@ struct linear_private_data | |||
| 16 | struct linear_private_data *prev; /* earlier version */ | 16 | struct linear_private_data *prev; /* earlier version */ |
| 17 | dev_info_t **hash_table; | 17 | dev_info_t **hash_table; |
| 18 | sector_t hash_spacing; | 18 | sector_t hash_spacing; |
| 19 | sector_t array_size; | 19 | sector_t array_sectors; |
| 20 | int preshift; /* shift before dividing by hash_spacing */ | 20 | int preshift; /* shift before dividing by hash_spacing */ |
| 21 | dev_info_t disks[0]; | 21 | dev_info_t disks[0]; |
| 22 | }; | 22 | }; |
diff --git a/include/linux/raid/md.h b/include/linux/raid/md.h index b7386ae9d28..dc0e3fcb9f2 100644 --- a/include/linux/raid/md.h +++ b/include/linux/raid/md.h | |||
| @@ -95,7 +95,7 @@ extern int sync_page_io(struct block_device *bdev, sector_t sector, int size, | |||
| 95 | struct page *page, int rw); | 95 | struct page *page, int rw); |
| 96 | extern void md_do_sync(mddev_t *mddev); | 96 | extern void md_do_sync(mddev_t *mddev); |
| 97 | extern void md_new_event(mddev_t *mddev); | 97 | extern void md_new_event(mddev_t *mddev); |
| 98 | extern void md_allow_write(mddev_t *mddev); | 98 | extern int md_allow_write(mddev_t *mddev); |
| 99 | extern void md_wait_for_blocked_rdev(mdk_rdev_t *rdev, mddev_t *mddev); | 99 | extern void md_wait_for_blocked_rdev(mdk_rdev_t *rdev, mddev_t *mddev); |
| 100 | 100 | ||
| 101 | #endif /* CONFIG_MD */ | 101 | #endif /* CONFIG_MD */ |
diff --git a/include/linux/raid/md_k.h b/include/linux/raid/md_k.h index 3dea9f545c8..9f2549ac0e2 100644 --- a/include/linux/raid/md_k.h +++ b/include/linux/raid/md_k.h | |||
| @@ -59,7 +59,7 @@ struct mdk_rdev_s | |||
| 59 | int sb_loaded; | 59 | int sb_loaded; |
| 60 | __u64 sb_events; | 60 | __u64 sb_events; |
| 61 | sector_t data_offset; /* start of data in array */ | 61 | sector_t data_offset; /* start of data in array */ |
| 62 | sector_t sb_offset; | 62 | sector_t sb_start; /* offset of the super block (in 512byte sectors) */ |
| 63 | int sb_size; /* bytes in the superblock */ | 63 | int sb_size; /* bytes in the superblock */ |
| 64 | int preferred_minor; /* autorun support */ | 64 | int preferred_minor; /* autorun support */ |
| 65 | 65 | ||
| @@ -87,6 +87,9 @@ struct mdk_rdev_s | |||
| 87 | #define Blocked 8 /* An error occured on an externally | 87 | #define Blocked 8 /* An error occured on an externally |
| 88 | * managed array, don't allow writes | 88 | * managed array, don't allow writes |
| 89 | * until it is cleared */ | 89 | * until it is cleared */ |
| 90 | #define StateChanged 9 /* Faulty or Blocked has changed during | ||
| 91 | * interrupt, so it needs to be | ||
| 92 | * notified by the thread */ | ||
| 90 | wait_queue_head_t blocked_wait; | 93 | wait_queue_head_t blocked_wait; |
| 91 | 94 | ||
| 92 | int desc_nr; /* descriptor index in the superblock */ | 95 | int desc_nr; /* descriptor index in the superblock */ |
| @@ -147,7 +150,7 @@ struct mddev_s | |||
| 147 | int raid_disks; | 150 | int raid_disks; |
| 148 | int max_disks; | 151 | int max_disks; |
| 149 | sector_t size; /* used size of component devices */ | 152 | sector_t size; /* used size of component devices */ |
| 150 | sector_t array_size; /* exported array size */ | 153 | sector_t array_sectors; /* exported array size */ |
| 151 | __u64 events; | 154 | __u64 events; |
| 152 | 155 | ||
| 153 | char uuid[16]; | 156 | char uuid[16]; |
| @@ -188,6 +191,7 @@ struct mddev_s | |||
| 188 | * NEEDED: we might need to start a resync/recover | 191 | * NEEDED: we might need to start a resync/recover |
| 189 | * RUNNING: a thread is running, or about to be started | 192 | * RUNNING: a thread is running, or about to be started |
| 190 | * SYNC: actually doing a resync, not a recovery | 193 | * SYNC: actually doing a resync, not a recovery |
| 194 | * RECOVER: doing recovery, or need to try it. | ||
| 191 | * INTR: resync needs to be aborted for some reason | 195 | * INTR: resync needs to be aborted for some reason |
| 192 | * DONE: thread is done and is waiting to be reaped | 196 | * DONE: thread is done and is waiting to be reaped |
| 193 | * REQUEST: user-space has requested a sync (used with SYNC) | 197 | * REQUEST: user-space has requested a sync (used with SYNC) |
| @@ -198,6 +202,7 @@ struct mddev_s | |||
| 198 | */ | 202 | */ |
| 199 | #define MD_RECOVERY_RUNNING 0 | 203 | #define MD_RECOVERY_RUNNING 0 |
| 200 | #define MD_RECOVERY_SYNC 1 | 204 | #define MD_RECOVERY_SYNC 1 |
| 205 | #define MD_RECOVERY_RECOVER 2 | ||
| 201 | #define MD_RECOVERY_INTR 3 | 206 | #define MD_RECOVERY_INTR 3 |
| 202 | #define MD_RECOVERY_DONE 4 | 207 | #define MD_RECOVERY_DONE 4 |
| 203 | #define MD_RECOVERY_NEEDED 5 | 208 | #define MD_RECOVERY_NEEDED 5 |
| @@ -210,7 +215,8 @@ struct mddev_s | |||
| 210 | 215 | ||
| 211 | int in_sync; /* know to not need resync */ | 216 | int in_sync; /* know to not need resync */ |
| 212 | struct mutex reconfig_mutex; | 217 | struct mutex reconfig_mutex; |
| 213 | atomic_t active; | 218 | atomic_t active; /* general refcount */ |
| 219 | atomic_t openers; /* number of active opens */ | ||
| 214 | 220 | ||
| 215 | int changed; /* true if we might need to reread partition info */ | 221 | int changed; /* true if we might need to reread partition info */ |
| 216 | int degraded; /* whether md should consider | 222 | int degraded; /* whether md should consider |
| @@ -227,6 +233,8 @@ struct mddev_s | |||
| 227 | atomic_t recovery_active; /* blocks scheduled, but not written */ | 233 | atomic_t recovery_active; /* blocks scheduled, but not written */ |
| 228 | wait_queue_head_t recovery_wait; | 234 | wait_queue_head_t recovery_wait; |
| 229 | sector_t recovery_cp; | 235 | sector_t recovery_cp; |
| 236 | sector_t resync_min; /* user requested sync | ||
| 237 | * starts here */ | ||
| 230 | sector_t resync_max; /* resync should pause | 238 | sector_t resync_max; /* resync should pause |
| 231 | * when it gets here */ | 239 | * when it gets here */ |
| 232 | 240 | ||
| @@ -331,6 +339,9 @@ static inline char * mdname (mddev_t * mddev) | |||
| 331 | #define rdev_for_each(rdev, tmp, mddev) \ | 339 | #define rdev_for_each(rdev, tmp, mddev) \ |
| 332 | rdev_for_each_list(rdev, tmp, (mddev)->disks) | 340 | rdev_for_each_list(rdev, tmp, (mddev)->disks) |
| 333 | 341 | ||
| 342 | #define rdev_for_each_rcu(rdev, mddev) \ | ||
| 343 | list_for_each_entry_rcu(rdev, &((mddev)->disks), same_set) | ||
| 344 | |||
| 334 | typedef struct mdk_thread_s { | 345 | typedef struct mdk_thread_s { |
| 335 | void (*run) (mddev_t *mddev); | 346 | void (*run) (mddev_t *mddev); |
| 336 | mddev_t *mddev; | 347 | mddev_t *mddev; |
diff --git a/include/linux/raid/md_p.h b/include/linux/raid/md_p.h index 3f2cd98c508..8b4de4a41ff 100644 --- a/include/linux/raid/md_p.h +++ b/include/linux/raid/md_p.h | |||
| @@ -43,14 +43,11 @@ | |||
| 43 | */ | 43 | */ |
| 44 | #define MD_RESERVED_BYTES (64 * 1024) | 44 | #define MD_RESERVED_BYTES (64 * 1024) |
| 45 | #define MD_RESERVED_SECTORS (MD_RESERVED_BYTES / 512) | 45 | #define MD_RESERVED_SECTORS (MD_RESERVED_BYTES / 512) |
| 46 | #define MD_RESERVED_BLOCKS (MD_RESERVED_BYTES / BLOCK_SIZE) | ||
| 47 | 46 | ||
| 48 | #define MD_NEW_SIZE_SECTORS(x) ((x & ~(MD_RESERVED_SECTORS - 1)) - MD_RESERVED_SECTORS) | 47 | #define MD_NEW_SIZE_SECTORS(x) ((x & ~(MD_RESERVED_SECTORS - 1)) - MD_RESERVED_SECTORS) |
| 49 | #define MD_NEW_SIZE_BLOCKS(x) ((x & ~(MD_RESERVED_BLOCKS - 1)) - MD_RESERVED_BLOCKS) | ||
| 50 | 48 | ||
| 51 | #define MD_SB_BYTES 4096 | 49 | #define MD_SB_BYTES 4096 |
| 52 | #define MD_SB_WORDS (MD_SB_BYTES / 4) | 50 | #define MD_SB_WORDS (MD_SB_BYTES / 4) |
| 53 | #define MD_SB_BLOCKS (MD_SB_BYTES / BLOCK_SIZE) | ||
| 54 | #define MD_SB_SECTORS (MD_SB_BYTES / 512) | 51 | #define MD_SB_SECTORS (MD_SB_BYTES / 512) |
| 55 | 52 | ||
| 56 | /* | 53 | /* |
diff --git a/include/linux/raid/raid5.h b/include/linux/raid/raid5.h index f0827d31ae6..3b267279245 100644 --- a/include/linux/raid/raid5.h +++ b/include/linux/raid/raid5.h | |||
| @@ -158,6 +158,43 @@ | |||
| 158 | * the compute block completes. | 158 | * the compute block completes. |
| 159 | */ | 159 | */ |
| 160 | 160 | ||
| 161 | /* | ||
| 162 | * Operations state - intermediate states that are visible outside of sh->lock | ||
| 163 | * In general _idle indicates nothing is running, _run indicates a data | ||
| 164 | * processing operation is active, and _result means the data processing result | ||
| 165 | * is stable and can be acted upon. For simple operations like biofill and | ||
| 166 | * compute that only have an _idle and _run state they are indicated with | ||
| 167 | * sh->state flags (STRIPE_BIOFILL_RUN and STRIPE_COMPUTE_RUN) | ||
| 168 | */ | ||
| 169 | /** | ||
| 170 | * enum check_states - handles syncing / repairing a stripe | ||
| 171 | * @check_state_idle - check operations are quiesced | ||
| 172 | * @check_state_run - check operation is running | ||
| 173 | * @check_state_result - set outside lock when check result is valid | ||
| 174 | * @check_state_compute_run - check failed and we are repairing | ||
| 175 | * @check_state_compute_result - set outside lock when compute result is valid | ||
| 176 | */ | ||
| 177 | enum check_states { | ||
| 178 | check_state_idle = 0, | ||
| 179 | check_state_run, /* parity check */ | ||
| 180 | check_state_check_result, | ||
| 181 | check_state_compute_run, /* parity repair */ | ||
| 182 | check_state_compute_result, | ||
| 183 | }; | ||
| 184 | |||
| 185 | /** | ||
| 186 | * enum reconstruct_states - handles writing or expanding a stripe | ||
| 187 | */ | ||
| 188 | enum reconstruct_states { | ||
| 189 | reconstruct_state_idle = 0, | ||
| 190 | reconstruct_state_prexor_drain_run, /* prexor-write */ | ||
| 191 | reconstruct_state_drain_run, /* write */ | ||
| 192 | reconstruct_state_run, /* expand */ | ||
| 193 | reconstruct_state_prexor_drain_result, | ||
| 194 | reconstruct_state_drain_result, | ||
| 195 | reconstruct_state_result, | ||
| 196 | }; | ||
| 197 | |||
| 161 | struct stripe_head { | 198 | struct stripe_head { |
| 162 | struct hlist_node hash; | 199 | struct hlist_node hash; |
| 163 | struct list_head lru; /* inactive_list or handle_list */ | 200 | struct list_head lru; /* inactive_list or handle_list */ |
| @@ -169,19 +206,13 @@ struct stripe_head { | |||
| 169 | spinlock_t lock; | 206 | spinlock_t lock; |
| 170 | int bm_seq; /* sequence number for bitmap flushes */ | 207 | int bm_seq; /* sequence number for bitmap flushes */ |
| 171 | int disks; /* disks in stripe */ | 208 | int disks; /* disks in stripe */ |
| 209 | enum check_states check_state; | ||
| 210 | enum reconstruct_states reconstruct_state; | ||
| 172 | /* stripe_operations | 211 | /* stripe_operations |
| 173 | * @pending - pending ops flags (set for request->issue->complete) | ||
| 174 | * @ack - submitted ops flags (set for issue->complete) | ||
| 175 | * @complete - completed ops flags (set for complete) | ||
| 176 | * @target - STRIPE_OP_COMPUTE_BLK target | 212 | * @target - STRIPE_OP_COMPUTE_BLK target |
| 177 | * @count - raid5_runs_ops is set to run when this is non-zero | ||
| 178 | */ | 213 | */ |
| 179 | struct stripe_operations { | 214 | struct stripe_operations { |
| 180 | unsigned long pending; | ||
| 181 | unsigned long ack; | ||
| 182 | unsigned long complete; | ||
| 183 | int target; | 215 | int target; |
| 184 | int count; | ||
| 185 | u32 zero_sum_result; | 216 | u32 zero_sum_result; |
| 186 | } ops; | 217 | } ops; |
| 187 | struct r5dev { | 218 | struct r5dev { |
| @@ -202,6 +233,7 @@ struct stripe_head_state { | |||
| 202 | int locked, uptodate, to_read, to_write, failed, written; | 233 | int locked, uptodate, to_read, to_write, failed, written; |
| 203 | int to_fill, compute, req_compute, non_overwrite; | 234 | int to_fill, compute, req_compute, non_overwrite; |
| 204 | int failed_num; | 235 | int failed_num; |
| 236 | unsigned long ops_request; | ||
| 205 | }; | 237 | }; |
| 206 | 238 | ||
| 207 | /* r6_state - extra state data only relevant to r6 */ | 239 | /* r6_state - extra state data only relevant to r6 */ |
| @@ -228,9 +260,7 @@ struct r6_state { | |||
| 228 | #define R5_Wantfill 12 /* dev->toread contains a bio that needs | 260 | #define R5_Wantfill 12 /* dev->toread contains a bio that needs |
| 229 | * filling | 261 | * filling |
| 230 | */ | 262 | */ |
| 231 | #define R5_Wantprexor 13 /* distinguish blocks ready for rmw from | 263 | #define R5_Wantdrain 13 /* dev->towrite needs to be drained */ |
| 232 | * other "towrites" | ||
| 233 | */ | ||
| 234 | /* | 264 | /* |
| 235 | * Write method | 265 | * Write method |
| 236 | */ | 266 | */ |
| @@ -254,8 +284,10 @@ struct r6_state { | |||
| 254 | #define STRIPE_EXPAND_READY 11 | 284 | #define STRIPE_EXPAND_READY 11 |
| 255 | #define STRIPE_IO_STARTED 12 /* do not count towards 'bypass_count' */ | 285 | #define STRIPE_IO_STARTED 12 /* do not count towards 'bypass_count' */ |
| 256 | #define STRIPE_FULL_WRITE 13 /* all blocks are set to be overwritten */ | 286 | #define STRIPE_FULL_WRITE 13 /* all blocks are set to be overwritten */ |
| 287 | #define STRIPE_BIOFILL_RUN 14 | ||
| 288 | #define STRIPE_COMPUTE_RUN 15 | ||
| 257 | /* | 289 | /* |
| 258 | * Operations flags (in issue order) | 290 | * Operation request flags |
| 259 | */ | 291 | */ |
| 260 | #define STRIPE_OP_BIOFILL 0 | 292 | #define STRIPE_OP_BIOFILL 0 |
| 261 | #define STRIPE_OP_COMPUTE_BLK 1 | 293 | #define STRIPE_OP_COMPUTE_BLK 1 |
| @@ -263,14 +295,6 @@ struct r6_state { | |||
| 263 | #define STRIPE_OP_BIODRAIN 3 | 295 | #define STRIPE_OP_BIODRAIN 3 |
| 264 | #define STRIPE_OP_POSTXOR 4 | 296 | #define STRIPE_OP_POSTXOR 4 |
| 265 | #define STRIPE_OP_CHECK 5 | 297 | #define STRIPE_OP_CHECK 5 |
| 266 | #define STRIPE_OP_IO 6 | ||
| 267 | |||
| 268 | /* modifiers to the base operations | ||
| 269 | * STRIPE_OP_MOD_REPAIR_PD - compute the parity block and write it back | ||
| 270 | * STRIPE_OP_MOD_DMA_CHECK - parity is not corrupted by the check | ||
| 271 | */ | ||
| 272 | #define STRIPE_OP_MOD_REPAIR_PD 7 | ||
| 273 | #define STRIPE_OP_MOD_DMA_CHECK 8 | ||
| 274 | 298 | ||
| 275 | /* | 299 | /* |
| 276 | * Plugging: | 300 | * Plugging: |
diff --git a/include/linux/serio.h b/include/linux/serio.h index 95674d97dab..e72716cca57 100644 --- a/include/linux/serio.h +++ b/include/linux/serio.h | |||
| @@ -175,7 +175,7 @@ static inline void serio_unpin_driver(struct serio *serio) | |||
| 175 | #define SERIO_8042_XL 0x06 | 175 | #define SERIO_8042_XL 0x06 |
| 176 | 176 | ||
| 177 | /* | 177 | /* |
| 178 | * Serio types | 178 | * Serio protocols |
| 179 | */ | 179 | */ |
| 180 | #define SERIO_UNKNOWN 0x00 | 180 | #define SERIO_UNKNOWN 0x00 |
| 181 | #define SERIO_MSC 0x01 | 181 | #define SERIO_MSC 0x01 |
| @@ -212,5 +212,7 @@ static inline void serio_unpin_driver(struct serio *serio) | |||
| 212 | #define SERIO_TAOSEVM 0x34 | 212 | #define SERIO_TAOSEVM 0x34 |
| 213 | #define SERIO_FUJITSU 0x35 | 213 | #define SERIO_FUJITSU 0x35 |
| 214 | #define SERIO_ZHENHUA 0x36 | 214 | #define SERIO_ZHENHUA 0x36 |
| 215 | #define SERIO_INEXIO 0x37 | ||
| 216 | #define SERIO_TOUCHIT213 0x37 | ||
| 215 | 217 | ||
| 216 | #endif | 218 | #endif |
