dm snapshot: add merging
Merging is started when origin is resumed and it is stopped when origin is suspended or when the merging snapshot is destroyed or errors are detected. Merging is not yet interlocked with writes: this will be handled in subsequent patches. The code relies on callbacks from a private kcopyd thread. Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> Signed-off-by: Mike Snitzer <snitzer@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
This commit is contained in:
committed by
Alasdair G Kergon
parent
9d3b15c4c7
commit
1e03f97e43
@ -154,6 +154,13 @@ static inline void dm_consecutive_chunk_count_inc(struct dm_exception *e)
|
||||
BUG_ON(!dm_consecutive_chunk_count(e));
|
||||
}
|
||||
|
||||
static inline void dm_consecutive_chunk_count_dec(struct dm_exception *e)
|
||||
{
|
||||
BUG_ON(!dm_consecutive_chunk_count(e));
|
||||
|
||||
e->new_chunk -= (1ULL << DM_CHUNK_NUMBER_BITS);
|
||||
}
|
||||
|
||||
# else
|
||||
# define DM_CHUNK_CONSECUTIVE_BITS 0
|
||||
|
||||
@ -171,6 +178,10 @@ static inline void dm_consecutive_chunk_count_inc(struct dm_exception *e)
|
||||
{
|
||||
}
|
||||
|
||||
static inline void dm_consecutive_chunk_count_dec(struct dm_exception *e)
|
||||
{
|
||||
}
|
||||
|
||||
# endif
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user