]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
md/raid5: remove incorrect "min_t()" when calculating writepos.
authorNeilBrown <neilb@suse.com>
Wed, 15 Jul 2015 07:54:15 +0000 (17:54 +1000)
committerNeilBrown <neilb@suse.com>
Mon, 31 Aug 2015 17:36:06 +0000 (19:36 +0200)
commitc74c0d760e30f56f9699dc180036ca37993d1c58
treec064932e8affe59739303ad7bed313ce3662efcf
parent05256d9884d3276f61537d3d7f5605dc21bd3477
md/raid5: remove incorrect "min_t()" when calculating writepos.

This code is calculating:
  writepos, which is the furthest along address (device-space) that we
     *will* be writing to
  readpos, which is the earliest address that we *could* possible read
     from, and
  safepos, which is the earliest address in the 'old' section that we
     might read from after a crash when the reshape position is
     recovered from metadata.

  The first is a precise calculation, so clipping at zero doesn't
  make sense.  As the reshape position is now guaranteed to always be
  a multiple of reshape_sectors and as we already BUG_ON when
  reshape_progress is zero, there is no point in this min_t() call.

  The readpos and safepos are worst case - actual value depends on
  precise geometry.  That worst case could be negative, which is only
  a problem because we are storing the value in an unsigned.
  So leave the min_t() for those.

Signed-off-by: NeilBrown <neilb@suse.com>
drivers/md/raid5.c