dm snapshot: rename struct exception_store

Rename struct exception_store to dm_exception_store.

Signed-off-by: Jonathan Brassow <jbrassow@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>

authored by

Jonathan Brassow and committed by
Alasdair G Kergon
1ae25f9c aea53d92

+25 -24
+14 -14
drivers/md/dm-exception-store.c
··· 462 462 return 0; 463 463 } 464 464 465 - static struct pstore *get_info(struct exception_store *store) 465 + static struct pstore *get_info(struct dm_exception_store *store) 466 466 { 467 467 return (struct pstore *) store->context; 468 468 } 469 469 470 - static void persistent_fraction_full(struct exception_store *store, 470 + static void persistent_fraction_full(struct dm_exception_store *store, 471 471 sector_t *numerator, sector_t *denominator) 472 472 { 473 473 *numerator = get_info(store)->next_free * store->snap->chunk_size; 474 474 *denominator = get_dev_size(store->snap->cow->bdev); 475 475 } 476 476 477 - static void persistent_destroy(struct exception_store *store) 477 + static void persistent_destroy(struct dm_exception_store *store) 478 478 { 479 479 struct pstore *ps = get_info(store); 480 480 ··· 485 485 kfree(ps); 486 486 } 487 487 488 - static int persistent_read_metadata(struct exception_store *store) 488 + static int persistent_read_metadata(struct dm_exception_store *store) 489 489 { 490 490 int r, uninitialized_var(new_snapshot); 491 491 struct pstore *ps = get_info(store); ··· 551 551 return 0; 552 552 } 553 553 554 - static int persistent_prepare(struct exception_store *store, 554 + static int persistent_prepare(struct dm_exception_store *store, 555 555 struct dm_snap_exception *e) 556 556 { 557 557 struct pstore *ps = get_info(store); ··· 578 578 return 0; 579 579 } 580 580 581 - static void persistent_commit(struct exception_store *store, 581 + static void persistent_commit(struct dm_exception_store *store, 582 582 struct dm_snap_exception *e, 583 583 void (*callback) (void *, int success), 584 584 void *callback_context) ··· 640 640 ps->callback_count = 0; 641 641 } 642 642 643 - static void persistent_drop(struct exception_store *store) 643 + static void persistent_drop(struct dm_exception_store *store) 644 644 { 645 645 struct pstore *ps = get_info(store); 646 646 ··· 649 649 DMWARN("write header failed"); 650 650 } 651 651 652 - int dm_create_persistent(struct exception_store *store) 652 + int dm_create_persistent(struct dm_exception_store *store) 653 653 { 654 654 struct pstore *ps; 655 655 ··· 694 694 sector_t next_free; 695 695 }; 696 696 697 - static void transient_destroy(struct exception_store *store) 697 + static void transient_destroy(struct dm_exception_store *store) 698 698 { 699 699 kfree(store->context); 700 700 } 701 701 702 - static int transient_read_metadata(struct exception_store *store) 702 + static int transient_read_metadata(struct dm_exception_store *store) 703 703 { 704 704 return 0; 705 705 } 706 706 707 - static int transient_prepare(struct exception_store *store, 707 + static int transient_prepare(struct dm_exception_store *store, 708 708 struct dm_snap_exception *e) 709 709 { 710 710 struct transient_c *tc = (struct transient_c *) store->context; ··· 719 719 return 0; 720 720 } 721 721 722 - static void transient_commit(struct exception_store *store, 722 + static void transient_commit(struct dm_exception_store *store, 723 723 struct dm_snap_exception *e, 724 724 void (*callback) (void *, int success), 725 725 void *callback_context) ··· 728 728 callback(callback_context, 1); 729 729 } 730 730 731 - static void transient_fraction_full(struct exception_store *store, 731 + static void transient_fraction_full(struct dm_exception_store *store, 732 732 sector_t *numerator, sector_t *denominator) 733 733 { 734 734 *numerator = ((struct transient_c *) store->context)->next_free; 735 735 *denominator = get_dev_size(store->snap->cow->bdev); 736 736 } 737 737 738 - int dm_create_transient(struct exception_store *store) 738 + int dm_create_transient(struct dm_exception_store *store) 739 739 { 740 740 struct transient_c *tc; 741 741
+10 -9
drivers/md/dm-exception-store.h
··· 36 36 * Abstraction to handle the meta/layout of exception stores (the 37 37 * COW device). 38 38 */ 39 - struct exception_store { 39 + struct dm_exception_store { 40 + 40 41 /* 41 42 * Destroys this object when you've finished with it. 42 43 */ 43 - void (*destroy) (struct exception_store *store); 44 + void (*destroy) (struct dm_exception_store *store); 44 45 45 46 /* 46 47 * The target shouldn't read the COW device until this is 47 48 * called. 48 49 */ 49 - int (*read_metadata) (struct exception_store *store); 50 + int (*read_metadata) (struct dm_exception_store *store); 50 51 51 52 /* 52 53 * Find somewhere to store the next exception. 53 54 */ 54 - int (*prepare_exception) (struct exception_store *store, 55 + int (*prepare_exception) (struct dm_exception_store *store, 55 56 struct dm_snap_exception *e); 56 57 57 58 /* 58 59 * Update the metadata with this exception. 59 60 */ 60 - void (*commit_exception) (struct exception_store *store, 61 + void (*commit_exception) (struct dm_exception_store *store, 61 62 struct dm_snap_exception *e, 62 63 void (*callback) (void *, int success), 63 64 void *callback_context); ··· 66 65 /* 67 66 * The snapshot is invalid, note this in the metadata. 68 67 */ 69 - void (*drop_snapshot) (struct exception_store *store); 68 + void (*drop_snapshot) (struct dm_exception_store *store); 70 69 71 70 /* 72 71 * Return how full the snapshot is. 73 72 */ 74 - void (*fraction_full) (struct exception_store *store, 73 + void (*fraction_full) (struct dm_exception_store *store, 75 74 sector_t *numerator, 76 75 sector_t *denominator); 77 76 ··· 125 124 /* 126 125 * Two exception store implementations. 127 126 */ 128 - int dm_create_persistent(struct exception_store *store); 127 + int dm_create_persistent(struct dm_exception_store *store); 129 128 130 - int dm_create_transient(struct exception_store *store); 129 + int dm_create_transient(struct dm_exception_store *store); 131 130 132 131 #endif /* _LINUX_DM_EXCEPTION_STORE */
+1 -1
drivers/md/dm-snap.h
··· 61 61 spinlock_t pe_lock; 62 62 63 63 /* The on disk metadata handler */ 64 - struct exception_store store; 64 + struct dm_exception_store store; 65 65 66 66 struct dm_kcopyd_client *kcopyd_client; 67 67