Lines Matching refs:record
504 /* record id already in cache, try next */
516 pr_warn(FW_WARN "too many record IDs!\n");
536 * Get the record ID of an existing error record on the persistent
537 * storage. If there is no error record on the persistent storage, the
557 /* found next record id in cache */
564 /* Try to add one more record ID to cache */
749 static int __erst_write_to_nvram(const struct cper_record_header *record)
767 int erst_write(const struct cper_record_header *record)
776 if (memcmp(record->signature, CPER_SIG_RECORD, CPER_SIG_SIZE))
782 rc = __erst_write_to_nvram(record);
787 if (record->record_length > erst_erange.size)
792 memcpy(erst_erange.vaddr, record, record->record_length);
820 static ssize_t __erst_read(u64 record_id, struct cper_record_header *record,
833 memcpy(record, rcd_tmp, len);
841 * else everything is OK, and return value is record length
843 ssize_t erst_read(u64 record_id, struct cper_record_header *record,
853 len = __erst_read(record_id, record, buflen);
917 static ssize_t erst_reader(struct pstore_record *record);
918 static int erst_writer(struct pstore_record *record);
919 static int erst_clearer(struct pstore_record *record);
972 static ssize_t erst_reader(struct pstore_record *record)
993 /* no more record */
1000 /* The record may be cleared by others, try read next record */
1010 record->buf = kmalloc(len, GFP_KERNEL);
1011 if (record->buf == NULL) {
1015 memcpy(record->buf, rcd->data, len - sizeof(*rcd));
1016 record->id = record_id;
1017 record->compressed = false;
1018 record->ecc_notice_size = 0;
1020 record->type = PSTORE_TYPE_DMESG;
1021 record->compressed = true;
1023 record->type = PSTORE_TYPE_DMESG;
1025 record->type = PSTORE_TYPE_MCE;
1027 record->type = PSTORE_TYPE_MAX;
1030 record->time.tv_sec = rcd->hdr.timestamp;
1032 record->time.tv_sec = 0;
1033 record->time.tv_nsec = 0;
1040 static int erst_writer(struct pstore_record *record)
1055 rcd->hdr.record_length = sizeof(*rcd) + record->size;
1062 rcd->sec_hdr.section_length = record->size;
1067 switch (record->type) {
1069 if (record->compressed)
1083 record->id = rcd->hdr.record_id;
1088 static int erst_clearer(struct pstore_record *record)
1090 return erst_clear(record->id);