Codebase list mdadm / 838acbc
Assorted fixes... Signed-off-by: Neil Brown <neilb@suse.de> Neil Brown 18 years ago
6 changed file(s) with 33 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
218218 }
219219 if (dfd >= 0) close(dfd);
220220
221 if (ident->uuid_set && (!update && strcmp(update, "uuid")!= 0) &&
221 if (ident->uuid_set && (!update || strcmp(update, "uuid")!= 0) &&
222222 (!super || same_uuid(info.uuid, ident->uuid, tst->ss->swapuuid)==0)) {
223223 if ((inargv && verbose >= 0) || verbose > 0)
224224 fprintf(stderr, Name ": %s has wrong uuid.\n",
265265 free(first_super);
266266 return 1;
267267 }
268
269
268270 st = tst; /* commit to this format, if haven't already */
269271 if (st->ss->compare_super(&first_super, super)) {
270272 fprintf(stderr, Name ": superblock on %s doesn't match others - assembly aborted\n",
363363 array.nr_disks = array.working_disks + array.failed_disks;
364364 array.layout = layout;
365365 array.chunk_size = chunk*1024;
366
366 array.major_version = st->ss->major;
367367
368368 if (!st->ss->init_super(st, &super, &array, name))
369369 return 1;
0 2005-dec-20
1 Want an incremental assembly mode to work nicely with udev.
2 Core usage would be something like
3 mdadm --incr-assemble /dev/newdevice
4 This would
5 - examine the device to determine uuid etc.
6 - look for a match in /etc/mdadm.conf, abort if not found
7 - find that device and collect current contents
8 - perform an 'assemble' analysis to make sure we have the best set of devices.
9 - remove or add devices as appropriate
10 - possibly start the array if it was complete
11
12 Other usages could involve
13 - specify which array to auto-add to.
14 This requires an existing array for uuid matching... is there any point?
15
16 -
17
18
019 2004-june-02
120 * Don't print 'errors' flag, it is meaningless. DONE
221 * Handle new superblock format
125125
126126 info = malloc(sizeof(*info));
127127 if (info == NULL) {
128 #if __GNUC__ < 3
129 fprintf(stderr, Name ": failed to allocate %d bytes\n",
130 (int)sizeof(*info));
131 #else
128132 fprintf(stderr, Name ": failed to allocate %zd bytes\n",
129133 sizeof(*info));
134 #endif
130135 return NULL;
131136 }
132137
210210 extern struct supertype *super_by_version(int vers, int minor);
211211 extern struct supertype *guess_super(int fd);
212212
213 #if __GNUC__ < 3
214 struct stat64;
215 #endif
216
213217 #ifdef UCLIBC
214218 struct FTW {};
215219 # define FTW_PHYS 1
395395 sb->resync_offset = ~0ULL;
396396 }
397397 if (strcmp(update, "uuid") == 0)
398 memcmp(sb->set_uuid, info->uuid, 16);
398 memcpy(sb->set_uuid, info->uuid, 16);
399399
400400 sb->sb_csum = calc_sb_1_csum(sb);
401401 return rv;