DM Snapshot: shot new ctr table format
PATCH 1/1 DM Snapshot: shot new ctr table format
Patch name: dm-snapshot-new-ctr-table-format.patch
From: Jonathan Brassow <[email protected]>
Introduce the new constructor table formats for snapshots and exception stores. This allows for new exception store types and allows for easy addition of future features to snapshots.
Signed-off-by Jonathan Brassow <[email protected]>
--- drivers/md/dm-snap-persistent.c | 9 ++++++-- drivers/md/dm-snap-transient.c | 9 ++++++-- drivers/md/dm-snap.c | 41 +++++++++++++++++++++++++++++++++------- 3 files changed, 48 insertions(+), 11 deletions(-)
drivers/md/dm-snap-persistent.c +7 -2
@@ -708,8 +708,13 @@ static unsigned persistent_status(structcase STATUSTYPE_INFO :break ;case STATUSTYPE_TABLE : -DMEMIT (" %s P %llu" , store->cow->name, - (unsigned long long )store->chunk_size); +if (!strcmp ("P" , store->type->name)) +DMEMIT (" %s P %llu" , store->cow->name, + (unsigned long long )store->chunk_size); +else +DMEMIT (" %s 2 %s %llu" , store->type->name, + store->cow->name, + (unsigned long long )store->chunk_size); }return sz;
drivers/md/dm-snap-transient.c +7 -2
@@ -91,8 +91,13 @@ static unsigned transient_status(structcase STATUSTYPE_INFO :break ;case STATUSTYPE_TABLE : -DMEMIT (" %s N %llu" , store->cow->name, - (unsigned long long )store->chunk_size); +if (!strcmp ("N" , store->type->name)) +DMEMIT (" %s N %llu" , store->cow->name, + (unsigned long long )store->chunk_size); +else +DMEMIT (" %s 2 %s %llu" , store->type->name, + store->cow->name, + (unsigned long long )store->chunk_size); }return sz;
drivers/md/dm-snap.c +34 -7
80 lines not on this page · raw message