[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
[dm-devel] Re: [PATCH] dm snapshot: don't use zero chunksize
- From: Alasdair G Kergon <agk redhat com>
- To: Mikulas Patocka <mpatocka redhat com>
- Cc: dm-devel redhat com, Mike Snitzer <snitzer redhat com>
- Subject: [dm-devel] Re: [PATCH] dm snapshot: don't use zero chunksize
- Date: Thu, 8 Oct 2009 00:36:31 +0100
On Tue, Oct 06, 2009 at 07:01:37PM -0400, Mikulas Patocka wrote:
> Under some special conditions (too big chunk size or zero-sized device),
> the resulting hash_size is calculated as zero.
>
> rounddown_pow_of_two(0) is undefined operation (it expands to shift by -1).
> And init_exception_table with zero argument would fail with -ENOMEM.
>
> This patch makes minimum chunk size 64, just like for pending exception table.
Could we have some more specific information in this patch header?
How does a "too big" chunk size happen? And what is "too big"?
How does a zero-sized device happen and how can this code do anything
sensible if it encounters one - shouldn't it fail with an error instead?
Or do we still have a problem with the sequence in which dm ioctls are being
issued?
Alasdairs
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]