• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/drivers/md/

Lines Matching defs:store

8 #include "dm-exception-store.h"
25 * We need to store a record of which parts of the origin have
28 * of the COW store. It makes sense therefore, to store the
90 * The top level structure for a persistent exception store.
93 struct dm_exception_store *store;
129 * the exception store because chunks can be committed out of
167 len = ps->store->chunk_size << SECTOR_SHIFT;
234 .bdev = dm_snap_cow(ps->store->snap)->bdev,
235 .sector = ps->store->chunk_size * chunk,
236 .count = ps->store->chunk_size,
292 memset(ps->area, 0, ps->store->chunk_size << SECTOR_SHIFT);
312 if (!ps->store->chunk_size) {
313 ps->store->chunk_size = max(DM_CHUNK_SIZE_DEFAULT_SECTORS,
314 bdev_logical_block_size(dm_snap_cow(ps->store->snap)->
316 ps->store->chunk_mask = ps->store->chunk_size - 1;
317 ps->store->chunk_shift = ffs(ps->store->chunk_size) - 1;
321 ps->io_client = dm_io_client_create(sectors_to_pages(ps->store->
352 if (ps->store->chunk_size == chunk_size)
358 chunk_size, ps->store->chunk_size);
363 r = dm_exception_store_set_chunk_size(ps->store, chunk_size,
371 r = dm_io_client_resize(sectors_to_pages(ps->store->chunk_size),
388 memset(ps->header_area, 0, ps->store->chunk_size << SECTOR_SHIFT);
394 dh->chunk_size = cpu_to_le32(ps->store->chunk_size);
514 static struct pstore *get_info(struct dm_exception_store *store)
516 return (struct pstore *) store->context;
519 static void persistent_usage(struct dm_exception_store *store,
524 struct pstore *ps = get_info(store);
526 *sectors_allocated = ps->next_free * store->chunk_size;
527 *total_sectors = get_dev_size(dm_snap_cow(store->snap)->bdev);
535 store->chunk_size;
538 static void persistent_dtr(struct dm_exception_store *store)
540 struct pstore *ps = get_info(store);
556 static int persistent_read_metadata(struct dm_exception_store *store,
562 struct pstore *ps = get_info(store);
574 ps->exceptions_per_area = (ps->store->chunk_size << SECTOR_SHIFT) /
621 static int persistent_prepare_exception(struct dm_exception_store *store,
624 struct pstore *ps = get_info(store);
627 sector_t size = get_dev_size(dm_snap_cow(store->snap)->bdev);
630 if (size < ((ps->next_free + 1) * store->chunk_size))
648 static void persistent_commit_exception(struct dm_exception_store *store,
654 struct pstore *ps = get_info(store);
710 static int persistent_prepare_merge(struct dm_exception_store *store,
714 struct pstore *ps = get_info(store);
756 static int persistent_commit_merge(struct dm_exception_store *store,
760 struct pstore *ps = get_info(store);
789 static void persistent_drop_snapshot(struct dm_exception_store *store)
791 struct pstore *ps = get_info(store);
798 static int persistent_ctr(struct dm_exception_store *store,
808 ps->store = store;
828 store->context = ps;
833 static unsigned persistent_status(struct dm_exception_store *store,
843 DMEMIT(" P %llu", (unsigned long long)store->chunk_size);
885 DMERR("Unable to register persistent exception store type");
892 "store type");