Staging: fix assorted typos all over the place
[safe/jmp/linux-2.6] / drivers / md / dm-snap-transient.c
index 77f58be..cde5aa5 100644 (file)
@@ -6,7 +6,6 @@
  */
 
 #include "dm-exception-store.h"
-#include "dm-snap.h"
 
 #include <linux/mm.h>
 #include <linux/pagemap.h>
@@ -45,7 +44,7 @@ static int transient_prepare_exception(struct dm_exception_store *store,
        if (size < (tc->next_free + store->chunk_size))
                return -1;
 
-       e->new_chunk = sector_to_chunk(store->snap, tc->next_free);
+       e->new_chunk = sector_to_chunk(store, tc->next_free);
        tc->next_free += store->chunk_size;
 
        return 0;
@@ -82,11 +81,19 @@ static int transient_ctr(struct dm_exception_store *store,
        return 0;
 }
 
-static int transient_status(struct dm_exception_store *store,
-                           status_type_t status, char *result,
-                           unsigned maxlen)
+static unsigned transient_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 N %llu", store->cow->name,
+                      (unsigned long long)store->chunk_size);
+       }
 
        return sz;
 }