]> err.no Git - linux-2.6/commit
[PATCH] md: Fix device-size updates in md
authorNeilBrown <neilb@suse.de>
Thu, 2 Feb 2006 22:28:03 +0000 (14:28 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Thu, 2 Feb 2006 23:07:10 +0000 (15:07 -0800)
commit6d89332b776fc11bac0073209e44ec8f39831e4e
treee3e3b1917a08f2cdfa8ff9acc804a7b7ef1a6e3d
parentcf41f8ac386e8d62122e7e394b4c6b3e3ab30ede
[PATCH] md: Fix device-size updates in md

As 'array_size' is a 'sector_t', it may overflow inappropriately when shifted
10 bits.  So We should cast it to a loff_t first.

There are two places with this problem, but the second (in update_raid_disks)
isn't needed so just remove it:
  The only personality that handles ->reshape currently is raid1,
  and it doesn't change the size of the array.
  When added for raid5/6, reshape again won't change the size of the array,
  at least not straight away.
  This code might be need for reshaping 'linear' but linear->shape,
  if implemented, should probably do the i_size_write itself.

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/md/md.c