Lines Matching +full:record +full:- +full:size
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Persistent Storage - pstore.h
24 * pstore record types (see fs/pstore/platform.c for pstore_type_names[])
35 /* PPC64-specific partition types */
51 * struct pstore_record - details of a pstore record entry
53 * @type: pstore record type
54 * @id: per-type unique identifier for record
55 * @time: timestamp of the record
56 * @buf: pointer to record contents
57 * @size: size of @buf
61 * kfree()d by the pstore core if non-NULL
62 * when the record is freed.
68 * @part: position in a multipart record
78 ssize_t size; member
89 * struct pstore_info - backend pstore driver structure
96 * @bufsize: size of @buf available for crash dump bytes (must match
109 * @data: backend-private pointer passed back during callbacks
119 * Returns 0 on success, and non-zero on error.
128 * Returns 0 on success, and non-zero on error. (Though pstore will
132 * Read next available backend record. Called after a successful
135 * @record:
136 * pointer to record to populate. @buf should be allocated
141 * Returns record size on success, zero when no more records are
145 * A newly generated record needs to be written to backend storage.
147 * @record:
148 * pointer to record metadata. When @type is PSTORE_TYPE_DMESG,
153 * can help identify this record to a future @erase callback.
155 * when available. The @size field will have the size of data
158 * Returns 0 on success, and non-zero on error.
161 * Perform a frontend write to a backend record, using a specified
163 * @record @buf.
165 * @record: pointer to record metadata.
168 * Returns 0 on success, and non-zero on error.
171 * Delete a record from backend storage. Different backends
172 * identify records differently, so entire original record is
176 * @record: pointer to record metadata.
178 * Returns 0 on success, and non-zero on error.
197 ssize_t (*read)(struct pstore_record *record);
198 int (*write)(struct pstore_record *record);
199 int (*write_user)(struct pstore_record *record,
201 int (*erase)(struct pstore_record *record);
231 #define TS_CPU_MASK (BIT(TS_CPU_SHIFT) - 1)
242 rec->ip |= cpu; in pstore_ftrace_encode_cpu()
248 return rec->ip & PSTORE_CPU_IN_IP; in pstore_ftrace_decode_cpu()
254 return rec->ts; in pstore_ftrace_read_timestamp()
260 rec->ts = val; in pstore_ftrace_write_timestamp()
266 rec->ts &= ~(TS_CPU_MASK); in pstore_ftrace_encode_cpu()
267 rec->ts |= cpu; in pstore_ftrace_encode_cpu()
273 return rec->ts & TS_CPU_MASK; in pstore_ftrace_decode_cpu()
279 return rec->ts >> TS_CPU_SHIFT; in pstore_ftrace_read_timestamp()
285 rec->ts = (rec->ts & TS_CPU_MASK) | (val << TS_CPU_SHIFT); in pstore_ftrace_write_timestamp()