Lines Matching refs:log

209 			struct log_group *log)
212 arena->logoff + (lane * LOG_GRP_SIZE), log,
273 static u32 log_seq(struct log_group *log, int log_idx)
275 return le32_to_cpu(log->ent[log_idx].seq);
279 * This function accepts two log entries, and uses the
287 static int btt_log_get_old(struct arena_info *a, struct log_group *log)
298 if (log_seq(log, idx0) == 0) {
299 log->ent[idx0].seq = cpu_to_le32(1);
303 if (log_seq(log, idx0) == log_seq(log, idx1))
305 if (log_seq(log, idx0) + log_seq(log, idx1) > 5)
308 if (log_seq(log, idx0) < log_seq(log, idx1)) {
309 if ((log_seq(log, idx1) - log_seq(log, idx0)) == 1)
314 if ((log_seq(log, idx0) - log_seq(log, idx1)) == 1)
324 * This function copies the desired (old/new) log entry into ent if
326 * where the desired log entry was found. Negative return values
334 struct log_group log;
336 ret = btt_log_group_read(arena, lane, &log);
340 old_ent = btt_log_get_old(arena, &log);
343 "log corruption (%d): lane %d seq [%d, %d]\n",
344 old_ent, lane, log.ent[arena->log_index[0]].seq,
345 log.ent[arena->log_index[1]].seq);
353 memcpy(ent, &log.ent[arena->log_index[ret_ent]], LOG_ENT_SIZE);
359 * This function commits a log entry to media
449 * This function initializes the BTT log with 'fake' entries pointing
586 * so use the stripped out versions from the log as well for
588 * 'raw' version of the log entries as that captured what we
613 * Detecting valid log indices: We read a log group (see the comments in btt.h
622 * written to), it is safe to assume the 'new format' of log entries in slots
630 struct log_group log;
634 ret = btt_log_group_read(arena, i, &log);
640 if (ent_is_padding(&log.ent[j])) {
662 * that all subsequent log groups are either in
668 if (ent_is_padding(&log.ent[j]))
680 if (!ent_is_padding(&log.ent[j]))
699 * If all the entries in the log were in the initial state,
706 * Only allow the known permutations of log/padding indices,
779 /* The log takes a fixed amount of space based on nfree */
798 /* Default log indices are (0,1) */
891 "Unable to deduce log/padding indices\n");
1311 struct log_entry log;
1382 log.lba = cpu_to_le32(premap);
1383 log.old_map = cpu_to_le32(old_postmap);
1384 log.new_map = cpu_to_le32(new_postmap);
1385 log.seq = cpu_to_le32(arena->freelist[lane].seq);
1387 ret = btt_flog_write(arena, lane, sub, &log);