[sheepdog] [PATCH v3 1/3] sheep: handle VID overflow correctly

Hitoshi Mitake mitake.hitoshi at lab.ntt.co.jp
Fri Feb 27 09:24:23 CET 2015


At Fri, 27 Feb 2015 16:18:51 +0800,
Liu Yuan wrote:
> 
> On Fri, Feb 27, 2015 at 01:46:14PM +0900, Hitoshi Mitake wrote:
> > Current sheep cannot handle a case like this:
> > 1. iterate snapshot creation and let latest working VDI have VID 0xffffff
> > 2. create one more snapshot
> > 
> > This problem comes from invalid usage of find_next_zero_bit() of sheep.
> > Current sheep checks its VID bitmap with find_next_zero_bit(). But the
> > function has a subtle point we must care about. If we check a bitmap
> > and whose right most bit is 1, it returns a number of the bit though
> > the bit is not 0. It means
> 
> Is it possible to fix find_next_zero_bit() to return what it should in this
> subtle case?

It would be possible but I want to minimize amount of
change because the mechanism of VID distribution is very
fragile. And find_next_zero_bit() is proven, heavy-used (e.g. in
linux) function. So I choosed this way.

Thanks,
Hitoshi


> 
> Thanks
> Yuan
> -- 
> sheepdog mailing list
> sheepdog at lists.wpkg.org
> https://lists.wpkg.org/mailman/listinfo/sheepdog



More information about the sheepdog mailing list