diff options
author | Neil Brown <neilb@suse.de> | 2007-12-14 20:14:38 +1100 |
---|---|---|
committer | Neil Brown <neilb@suse.de> | 2007-12-14 20:14:38 +1100 |
commit | 1686dc25ecf60a9b7691d73fc2b5a7e08184c940 (patch) | |
tree | 828cbf76ac4e341c9c50fb9e2a90efcdefd5e76b /Grow.c | |
parent | 3da92f272d017b1817b13f37f41c1ed4d6117291 (diff) | |
download | mdadm-1686dc25ecf60a9b7691d73fc2b5a7e08184c940.tar.gz mdadm-1686dc25ecf60a9b7691d73fc2b5a7e08184c940.tar.xz mdadm-1686dc25ecf60a9b7691d73fc2b5a7e08184c940.zip |
Find super from fd on an array.
We used to use the major/minor numbers, but that isn't sufficient
any more, so pass the fd, and possibly check 'text' version.
Diffstat (limited to 'Grow.c')
-rw-r--r-- | Grow.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -58,7 +58,7 @@ int Grow_Add_device(char *devname, int fd, char *newdev) return 1; } - st = super_by_version(info.array.major_version, info.array.minor_version); + st = super_by_fd(fd); if (!st) { fprintf(stderr, Name ": cannot handle arrays with superblock version %d\n", info.array.major_version); return 1; @@ -277,7 +277,7 @@ int Grow_addbitmap(char *devname, int fd, char *file, int chunk, int delay, int bitmapsize = bitmapsize * array.raid_disks / ncopies; } - st = super_by_version(array.major_version, array.minor_version); + st = super_by_fd(fd); if (!st) { fprintf(stderr, Name ": Cannot understand version %d.%d\n", array.major_version, array.minor_version); @@ -519,8 +519,8 @@ int Grow_reshape(char *devname, int fd, int quiet, char *backup_file, case 4: case 5: case 6: - st = super_by_version(array.major_version, - array.minor_version); + st = super_by_fd(fd); + /* size can be changed independently. * layout/chunksize/raid_disks/level can be changed * though the kernel may not support it all. |