[PATCH] MD - Set desc_nr more sanely.
Set desc_nr more sanely. Currently rdev->desc_nr is set in sync_sbs which is typcially called just before writing out the superblocks, which is an odd place to set it. It is also called when a new disk is added (which is sane) and when an old disc is imported ... which is quesitonable. With this patch it is set when a new disk is added, and when the superblocks are being analysed, which makes lots of sense. MULTIPATH is particularly an issue here. The old code tried to figure the desc_nr for an rdev by matching device numbers in the superblock. This doesn't make a lot of sense as device numbers can change. Now MULTIPATH components get sequential desc_nrs.
Showing
Please register or sign in to comment