diff options
author | Jonathan Brassow <jbrassow@redhat.com> | 2009-04-02 20:55:35 +0200 |
---|---|---|
committer | Alasdair G Kergon <agk@redhat.com> | 2009-04-02 20:55:35 +0200 |
commit | 1e302a929e2da6e8448e2058e4b07b07252b57fe (patch) | |
tree | 3345d31926a2254a2041d62d270cba76b2590bae /drivers/md/dm-snap-persistent.c | |
parent | dm snapshot: move ctr parsing to exception store (diff) | |
download | linux-1e302a929e2da6e8448e2058e4b07b07252b57fe.tar.xz linux-1e302a929e2da6e8448e2058e4b07b07252b57fe.zip |
dm snapshot: move status to exception store
Let the exception store types print out their status through
the new API, rather than having the snapshot code do it.
Adjust the buffer position to allow for the preceding DMEMIT in the
arguments to type->status().
Signed-off-by: Jonathan Brassow <jbrassow@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Diffstat (limited to 'drivers/md/dm-snap-persistent.c')
-rw-r--r-- | drivers/md/dm-snap-persistent.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/drivers/md/dm-snap-persistent.c b/drivers/md/dm-snap-persistent.c index 3907c4ce2ae5..1799205cd945 100644 --- a/drivers/md/dm-snap-persistent.c +++ b/drivers/md/dm-snap-persistent.c @@ -688,11 +688,19 @@ static int persistent_ctr(struct dm_exception_store *store, return 0; } -static int persistent_status(struct dm_exception_store *store, - status_type_t status, char *result, - unsigned int maxlen) +static unsigned persistent_status(struct dm_exception_store *store, + status_type_t status, char *result, + unsigned maxlen) { - int sz = 0; + unsigned sz = 0; + + switch (status) { + case STATUSTYPE_INFO: + break; + case STATUSTYPE_TABLE: + DMEMIT(" %s P %llu", store->cow->name, + (unsigned long long)store->chunk_size); + } return sz; } |