Lines Matching refs:store
102 struct dm_exception_store *store; member
171 len = ps->store->chunk_size << SECTOR_SHIFT; in alloc_area()
232 .bdev = dm_snap_cow(ps->store->snap)->bdev, in chunk_io()
233 .sector = ps->store->chunk_size * chunk, in chunk_io()
234 .count = ps->store->chunk_size, in chunk_io()
299 memset(ps->area, 0, ps->store->chunk_size << SECTOR_SHIFT); in zero_memory_area()
319 if (!ps->store->chunk_size) { in read_header()
320 ps->store->chunk_size = max(DM_CHUNK_SIZE_DEFAULT_SECTORS, in read_header()
321 bdev_logical_block_size(dm_snap_cow(ps->store->snap)-> in read_header()
323 ps->store->chunk_mask = ps->store->chunk_size - 1; in read_header()
324 ps->store->chunk_shift = ffs(ps->store->chunk_size) - 1; in read_header()
358 if (ps->store->chunk_size == chunk_size) in read_header()
364 chunk_size, ps->store->chunk_size); in read_header()
369 r = dm_exception_store_set_chunk_size(ps->store, chunk_size, in read_header()
389 memset(ps->header_area, 0, ps->store->chunk_size << SECTOR_SHIFT); in write_header()
395 dh->chunk_size = cpu_to_le32(ps->store->chunk_size); in write_header()
499 client = dm_bufio_client_create(dm_snap_cow(ps->store->snap)->bdev, in read_exceptions()
500 ps->store->chunk_size << SECTOR_SHIFT, in read_exceptions()
545 memcpy(ps->area, area, ps->store->chunk_size << SECTOR_SHIFT); in read_exceptions()
567 static struct pstore *get_info(struct dm_exception_store *store) in get_info() argument
569 return (struct pstore *) store->context; in get_info()
572 static void persistent_usage(struct dm_exception_store *store, in persistent_usage() argument
577 struct pstore *ps = get_info(store); in persistent_usage()
579 *sectors_allocated = ps->next_free * store->chunk_size; in persistent_usage()
580 *total_sectors = get_dev_size(dm_snap_cow(store->snap)->bdev); in persistent_usage()
588 store->chunk_size; in persistent_usage()
591 static void persistent_dtr(struct dm_exception_store *store) in persistent_dtr() argument
593 struct pstore *ps = get_info(store); in persistent_dtr()
608 static int persistent_read_metadata(struct dm_exception_store *store, in persistent_read_metadata() argument
614 struct pstore *ps = get_info(store); in persistent_read_metadata()
626 ps->exceptions_per_area = (ps->store->chunk_size << SECTOR_SHIFT) / in persistent_read_metadata()
673 static int persistent_prepare_exception(struct dm_exception_store *store, in persistent_prepare_exception() argument
676 struct pstore *ps = get_info(store); in persistent_prepare_exception()
677 sector_t size = get_dev_size(dm_snap_cow(store->snap)->bdev); in persistent_prepare_exception()
680 if (size < ((ps->next_free + 1) * store->chunk_size)) in persistent_prepare_exception()
696 static void persistent_commit_exception(struct dm_exception_store *store, in persistent_commit_exception() argument
702 struct pstore *ps = get_info(store); in persistent_commit_exception()
761 static int persistent_prepare_merge(struct dm_exception_store *store, in persistent_prepare_merge() argument
765 struct pstore *ps = get_info(store); in persistent_prepare_merge()
807 static int persistent_commit_merge(struct dm_exception_store *store, in persistent_commit_merge() argument
811 struct pstore *ps = get_info(store); in persistent_commit_merge()
840 static void persistent_drop_snapshot(struct dm_exception_store *store) in persistent_drop_snapshot() argument
842 struct pstore *ps = get_info(store); in persistent_drop_snapshot()
849 static int persistent_ctr(struct dm_exception_store *store, in persistent_ctr() argument
859 ps->store = store; in persistent_ctr()
879 store->context = ps; in persistent_ctr()
884 static unsigned persistent_status(struct dm_exception_store *store, in persistent_status() argument
894 DMEMIT(" P %llu", (unsigned long long)store->chunk_size); in persistent_status()