pstore
static int alloc_area(struct pstore *ps)
static void free_area(struct pstore *ps)
static int chunk_io(struct pstore *ps, void *area, chunk_t chunk, blk_opf_t opf,
static chunk_t area_location(struct pstore *ps, chunk_t area)
static void skip_metadata(struct pstore *ps)
static int area_io(struct pstore *ps, blk_opf_t opf)
static void zero_memory_area(struct pstore *ps)
static int zero_disk_area(struct pstore *ps, chunk_t area)
static int read_header(struct pstore *ps, int *new_snapshot)
static int write_header(struct pstore *ps)
static struct disk_exception *get_exception(struct pstore *ps, void *ps_area,
static void read_exception(struct pstore *ps, void *ps_area,
static void write_exception(struct pstore *ps,
static void clear_exception(struct pstore *ps, uint32_t index)
static int insert_exceptions(struct pstore *ps, void *ps_area,
static int read_exceptions(struct pstore *ps,
static struct pstore *get_info(struct dm_exception_store *store)
struct pstore *ps = get_info(store);
struct pstore *ps = get_info(store);
struct pstore *ps = get_info(store);
struct pstore *ps = get_info(store);
struct pstore *ps = get_info(store);
struct pstore *ps = get_info(store);
struct pstore *ps = get_info(store);
struct pstore *ps = get_info(store);
struct pstore *ps;
struct pstore_info pstore;
.pstore = {
cxt->pstore.data = cxt;
cxt->pstore.flags = 0;
cxt->pstore.flags |= PSTORE_FLAGS_DMESG;
cxt->pstore.max_reason = pdata->max_reason;
cxt->pstore.flags |= PSTORE_FLAGS_CONSOLE;
cxt->pstore.flags |= PSTORE_FLAGS_FTRACE;
cxt->pstore.flags |= PSTORE_FLAGS_PMSG;
if (cxt->pstore.flags & PSTORE_FLAGS_DMESG) {
cxt->pstore.bufsize = cxt->dprzs[0]->buffer_size;
cxt->pstore.buf = kvzalloc(cxt->pstore.bufsize, GFP_KERNEL);
if (!cxt->pstore.buf) {
err = pstore_register(&cxt->pstore);
kvfree(cxt->pstore.buf);
cxt->pstore.bufsize = 0;
pstore_unregister(&cxt->pstore);
kvfree(cxt->pstore.buf);
cxt->pstore.bufsize = 0;
.pstore = {
cxt->pstore.bufsize = cxt->kpszs[0]->buffer_size -
cxt->pstore.buf = kzalloc(cxt->pstore.bufsize, GFP_KERNEL);
if (!cxt->pstore.buf) {
struct pstore_info pstore;
cxt->pstore.data = cxt;
cxt->pstore.max_reason = info->max_reason;
cxt->pstore.name = info->name;
cxt->pstore.flags |= PSTORE_FLAGS_DMESG;
kmsg_dump_reason_str(cxt->pstore.max_reason));
cxt->pstore.flags |= PSTORE_FLAGS_PMSG;
cxt->pstore.flags |= PSTORE_FLAGS_CONSOLE;
cxt->pstore.flags |= PSTORE_FLAGS_FTRACE;
err = pstore_register(&cxt->pstore);
kfree(cxt->pstore.buf);
cxt->pstore.buf = NULL;
cxt->pstore.bufsize = 0;
pstore_unregister(&cxt->pstore);
kfree(cxt->pstore.buf);
cxt->pstore.buf = NULL;
cxt->pstore.bufsize = 0;