mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-07 14:32:23 +00:00
dm snapshot: revert "fix a crash when an origin has no snapshots"
Commit7ee06ddc40
("dm snapshot: fix a crash when an origin has no snapshots") introduced a regression in snapshot merging - causing the lvm2 test lvcreate-cache-snapshot.sh got stuck in an infinite loop. Even though commit7ee06ddc40
was marked for stable@ the stable team was notified to _not_ backport it. Fixes:7ee06ddc40
("dm snapshot: fix a crash when an origin has no snapshots") Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> Signed-off-by: Mike Snitzer <snitzer@redhat.com>
This commit is contained in:
parent
0c1f3193b1
commit
f16dba5dc6
@ -855,11 +855,12 @@ static int dm_add_exception(void *context, chunk_t old, chunk_t new)
|
||||
static uint32_t __minimum_chunk_size(struct origin *o)
|
||||
{
|
||||
struct dm_snapshot *snap;
|
||||
unsigned chunk_size = rounddown_pow_of_two(UINT_MAX);
|
||||
unsigned chunk_size = 0;
|
||||
|
||||
if (o)
|
||||
list_for_each_entry(snap, &o->snapshots, list)
|
||||
chunk_size = min(chunk_size, snap->store->chunk_size);
|
||||
chunk_size = min_not_zero(chunk_size,
|
||||
snap->store->chunk_size);
|
||||
|
||||
return (uint32_t) chunk_size;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user