]> git.baikalelectronics.ru Git - kernel.git/commit
md: Tidy up rdev_size_store a bit:
authorNeil Brown <neilb@suse.de>
Sat, 12 Jul 2008 00:37:50 +0000 (10:37 +1000)
committerNeilBrown <neilb@suse.de>
Mon, 21 Jul 2008 04:22:18 +0000 (14:22 +1000)
commitb64f69dfe3ada91366efb7b496bcee8b7844ba98
tree03bb7d75f4951eba4eff21926d1ce71c6d728260
parent6edd59eb9ee27f97044f8de5d0c0347c2bd95651
md: Tidy up rdev_size_store a bit:

 - used strict_strtoull in place of simple_strtoull
 - use my_mddev in place of rdev->mddev (they have the same value)
and more significantly,
 - don't adjust mddev->size to fit, rather reject changes which make
   rdev->size smaller than mddev->size

Adjusting mddev->size is a hangover from bind_rdev_to_array which
does a similar thing.  But it really is a better design to insist that
mddev->size is set as required, then the rdev->sizes are set to allow
for that.  The previous way invites confusion.

Signed-off-by: NeilBrown <neilb@suse.de>
Documentation/md.txt
drivers/md/md.c