]> git.neil.brown.name Git - history.git/commit
[PATCH] MD - Set desc_nr more sanely.
authorNeil Brown <neilb@cse.unsw.edu.au>
Fri, 19 Jul 2002 02:08:42 +0000 (19:08 -0700)
committerTrond Myklebust <trond.myklebust@fys.uio.no>
Fri, 19 Jul 2002 02:08:42 +0000 (19:08 -0700)
commit999a2029f386dc3807f93370e4d14d9ac954dd0d
treebf266db50ddc5d91c96c664796f82eb967b67bb9
parent6f42312c7cd31635048afa10ad4dbce76a9dbe08
[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.
drivers/md/md.c