aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-01-08 17:03:34 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2009-01-08 17:03:34 -0500
commit894bcdfb1a40a7c5032242c380b956aab106e05d (patch)
treecb5d34da6a7f524bb3188be539422896f2427405 /include
parenta419df8a0ff01b6694cebc8885778f854165d17d (diff)
parent4044ba58dd15cb01797c4fd034f39ef4a75f7cc3 (diff)
Merge branch 'for-linus' of git://neil.brown.name/md
* 'for-linus' of git://neil.brown.name/md: md: don't retry recovery of raid1 that fails due to error on source drive. md: Allow md devices to be created by name. md: make devices disappear when they are no longer needed. md: centralise all freeing of an 'mddev' in 'md_free' md: move allocation of ->queue from mddev_find to md_probe md: need another print_sb for mdp_superblock_1 md: use list_for_each_entry macro directly md: raid0: make hash_spacing and preshift sector-based. md: raid0: Represent the size of strip zones in sectors. md: raid0 create_strip_zones(): Add KERN_INFO/KERN_ERR to printk's. md: raid0 create_strip_zones(): Make two local variables sector-based. md: raid0: Represent zone->zone_offset in sectors. md: raid0: Represent device offset in sectors. md: raid0_make_request(): Replace local variable block by sector. md: raid0_make_request(): Remove local variable chunk_size. md: raid0_make_request(): Replace chunksize_bits by chunksect_bits. md: use sysfs_notify_dirent to notify changes to md/sync_action. md: fix bitmap-on-external-file bug.
Diffstat (limited to 'include')
-rw-r--r--include/linux/raid/md_k.h20
-rw-r--r--include/linux/raid/md_p.h2
-rw-r--r--include/linux/raid/raid0.h10
3 files changed, 20 insertions, 12 deletions
diff --git a/include/linux/raid/md_k.h b/include/linux/raid/md_k.h
index 8fc909ef6787..9743e4dbc918 100644
--- a/include/linux/raid/md_k.h
+++ b/include/linux/raid/md_k.h
@@ -137,6 +137,9 @@ struct mddev_s
137 struct gendisk *gendisk; 137 struct gendisk *gendisk;
138 138
139 struct kobject kobj; 139 struct kobject kobj;
140 int hold_active;
141#define UNTIL_IOCTL 1
142#define UNTIL_STOP 2
140 143
141 /* Superblock information */ 144 /* Superblock information */
142 int major_version, 145 int major_version,
@@ -215,6 +218,9 @@ struct mddev_s
215#define MD_RECOVERY_FROZEN 9 218#define MD_RECOVERY_FROZEN 9
216 219
217 unsigned long recovery; 220 unsigned long recovery;
221 int recovery_disabled; /* if we detect that recovery
222 * will always fail, set this
223 * so we don't loop trying */
218 224
219 int in_sync; /* know to not need resync */ 225 int in_sync; /* know to not need resync */
220 struct mutex reconfig_mutex; 226 struct mutex reconfig_mutex;
@@ -244,6 +250,9 @@ struct mddev_s
244 struct sysfs_dirent *sysfs_state; /* handle for 'array_state' 250 struct sysfs_dirent *sysfs_state; /* handle for 'array_state'
245 * file in sysfs. 251 * file in sysfs.
246 */ 252 */
253 struct sysfs_dirent *sysfs_action; /* handle for 'sync_action' */
254
255 struct work_struct del_work; /* used for delayed sysfs removal */
247 256
248 spinlock_t write_lock; 257 spinlock_t write_lock;
249 wait_queue_head_t sb_wait; /* for waiting on superblock updates */ 258 wait_queue_head_t sb_wait; /* for waiting on superblock updates */
@@ -334,17 +343,14 @@ static inline char * mdname (mddev_t * mddev)
334 * iterates through some rdev ringlist. It's safe to remove the 343 * iterates through some rdev ringlist. It's safe to remove the
335 * current 'rdev'. Dont touch 'tmp' though. 344 * current 'rdev'. Dont touch 'tmp' though.
336 */ 345 */
337#define rdev_for_each_list(rdev, tmp, list) \ 346#define rdev_for_each_list(rdev, tmp, head) \
338 \ 347 list_for_each_entry_safe(rdev, tmp, head, same_set)
339 for ((tmp) = (list).next; \ 348
340 (rdev) = (list_entry((tmp), mdk_rdev_t, same_set)), \
341 (tmp) = (tmp)->next, (tmp)->prev != &(list) \
342 ; )
343/* 349/*
344 * iterates through the 'same array disks' ringlist 350 * iterates through the 'same array disks' ringlist
345 */ 351 */
346#define rdev_for_each(rdev, tmp, mddev) \ 352#define rdev_for_each(rdev, tmp, mddev) \
347 rdev_for_each_list(rdev, tmp, (mddev)->disks) 353 list_for_each_entry_safe(rdev, tmp, &((mddev)->disks), same_set)
348 354
349#define rdev_for_each_rcu(rdev, mddev) \ 355#define rdev_for_each_rcu(rdev, mddev) \
350 list_for_each_entry_rcu(rdev, &((mddev)->disks), same_set) 356 list_for_each_entry_rcu(rdev, &((mddev)->disks), same_set)
diff --git a/include/linux/raid/md_p.h b/include/linux/raid/md_p.h
index 8b4de4a41ff1..9491026afe66 100644
--- a/include/linux/raid/md_p.h
+++ b/include/linux/raid/md_p.h
@@ -194,6 +194,8 @@ static inline __u64 md_event(mdp_super_t *sb) {
194 return (ev<<32)| sb->events_lo; 194 return (ev<<32)| sb->events_lo;
195} 195}
196 196
197#define MD_SUPERBLOCK_1_TIME_SEC_MASK ((1ULL<<40) - 1)
198
197/* 199/*
198 * The version-1 superblock : 200 * The version-1 superblock :
199 * All numeric fields are little-endian. 201 * All numeric fields are little-endian.
diff --git a/include/linux/raid/raid0.h b/include/linux/raid/raid0.h
index 1b2dda035f8e..fd42aa87c391 100644
--- a/include/linux/raid/raid0.h
+++ b/include/linux/raid/raid0.h
@@ -5,9 +5,9 @@
5 5
6struct strip_zone 6struct strip_zone
7{ 7{
8 sector_t zone_offset; /* Zone offset in md_dev */ 8 sector_t zone_start; /* Zone offset in md_dev (in sectors) */
9 sector_t dev_offset; /* Zone offset in real dev */ 9 sector_t dev_start; /* Zone offset in real dev (in sectors) */
10 sector_t size; /* Zone size */ 10 sector_t sectors; /* Zone size in sectors */
11 int nb_dev; /* # of devices attached to the zone */ 11 int nb_dev; /* # of devices attached to the zone */
12 mdk_rdev_t **dev; /* Devices attached to the zone */ 12 mdk_rdev_t **dev; /* Devices attached to the zone */
13}; 13};
@@ -19,8 +19,8 @@ struct raid0_private_data
19 mdk_rdev_t **devlist; /* lists of rdevs, pointed to by strip_zone->dev */ 19 mdk_rdev_t **devlist; /* lists of rdevs, pointed to by strip_zone->dev */
20 int nr_strip_zones; 20 int nr_strip_zones;
21 21
22 sector_t hash_spacing; 22 sector_t spacing;
23 int preshift; /* shift this before divide by hash_spacing */ 23 int sector_shift; /* shift this before divide by spacing */
24}; 24};
25 25
26typedef struct raid0_private_data raid0_conf_t; 26typedef struct raid0_private_data raid0_conf_t;