Re: fr1-2.16 patch for 2.6.10 kernel
[email protected] (Peter T. Breuer)
| Newsgroups | gmane.linux.enbd.general |
|---|---|
| Message-ID | <[email protected]> |
In article <[email protected]> you wrote: > In article <[email protected]> you wrote: > > Sorry for the delay, i was on holidays. Lots of snow! > > > > I'm going to merge all of these patches and test it soon. > > These are the parts I think you are interested in. And I forgot this one in md.c - rdev = md_import_device (dev, -1, 0); // PTB -1 == don't check sb + rdev = md_import_device (dev, 0/*-1*/, 0); // PTB -1 == don't check sb I also continued the theme a bit further down, testing to see if the sb had been loaded and loading it if not. Then print it, whatever happens. @@ -2276,6 +2463,69 @@ err = -EINVAL; goto abort_export; } + +#ifdef MD_BITMAP_SUPPORT + printk(KERN_INFO "md: old uuid %x %x %x %x\n", + *(__u32 *)(mddev->uuid+0), + *(__u32 *)(mddev->uuid+4), + *(__u32 *)(mddev->uuid+8), + *(__u32 *)(mddev->uuid+12)); + /* get the component's superblock */ + if (!rdev->sb_loaded) + read_disk_sb(rdev); + sb = (mdp_super_t *)page_address(rdev->sb_page); + if (sb) { + printk(KERN_INFO "md: new uuid %x %x %x %x\n", + sb->set_uuid0, + sb->set_uuid1, + sb->set_uuid2, + sb->set_uuid3); + } else { + printk(KERN_DEBUG "md: new component device has no sb\n"); + } + /* let's check the new disk sb at this poimt */ + if (mddev->persistent && sb + && sb->set_uuid0 == *(__u32 *)(mddev->uuid+0) + && sb->set_uuid1 == *(__u32 *)(mddev->uuid+4) + && sb->set_uuid2 == *(__u32 *)(mddev->uuid+8) ... (patch as always was before) ... + } +#endif /* MD_BITMAP_SUPPORT */ + rdev->in_sync = 0; rdev->desc_nr = -1; bind_rdev_to_array(rdev, mddev); @@ -2292,6 +2542,21 @@ Peter