]> git.karo-electronics.de Git - karo-tx-linux.git/commit
md/bitmap: improve handling of 'allclean'.
authorNeilBrown <neilb@suse.de>
Thu, 1 Sep 2011 07:21:56 +0000 (17:21 +1000)
committerNeilBrown <neilb@suse.de>
Thu, 1 Sep 2011 07:21:56 +0000 (17:21 +1000)
commit0df163707dfa8a8da1d76600bd9c5c48327c9ecb
treee0aa95e618b10c731cc347e35b6ee0588d3cc922
parent5d44c1c7a7dacd3323ac8fe7035fc6a7fc04ab95
md/bitmap: improve handling of 'allclean'.

The 'allclean' flag is used to cache the fact that there is nothing to
do, so we can avoid waking up and scanning the bitmap regularly.

The two sorts of pages that might need the attention of the bitmap
daemon are BITMAP_PAGE_PENDING and BITMAP_PAGE_NEEDWRITE pages.

So make sure allclean reflects exactly when there are none of those.
So:
  set it before scanning all pages with either bit set.
  clear it whenever these bits are set
  clear it when we desire not to clear one of these bits.
  don't clear it any other time.

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