40
40
for (blkno = 0; blkno < log->l_logBBsize; blkno++) {
41
41
r = read(fd, buf, sizeof(buf));
43
fprintf(stderr, "%s: read error (%lld): %s\n",
43
fprintf(stderr, _("%s: read error (%lld): %s\n"),
44
44
__FUNCTION__, (long long)blkno,
47
47
} else if (r == 0) {
48
printf("%s: physical end of log at %lld\n",
48
printf(_("%s: physical end of log at %lld\n"),
49
49
__FUNCTION__, (long long)blkno);
53
if (CYCLE_LSN(INT_GET(*(xfs_lsn_t *)buf, ARCH_CONVERT)) ==
53
if (CYCLE_LSN(be64_to_cpu(*(__be64 *)buf)) ==
54
54
XLOG_HEADER_MAGIC_NUM && !print_no_data) {
56
"%6lld HEADER Cycle %d tail %d:%06d len %6d ops %d\n",
56
"%6lld HEADER Cycle %d tail %d:%06d len %6d ops %d\n"),
58
INT_GET(hdr->h_cycle, ARCH_CONVERT),
59
CYCLE_LSN(INT_GET(hdr->h_tail_lsn, ARCH_CONVERT)),
60
BLOCK_LSN(INT_GET(hdr->h_tail_lsn, ARCH_CONVERT)),
61
INT_GET(hdr->h_len, ARCH_CONVERT),
62
INT_GET(hdr->h_num_logops, ARCH_CONVERT));
58
be32_to_cpu(hdr->h_cycle),
59
CYCLE_LSN(be64_to_cpu(hdr->h_tail_lsn)),
60
BLOCK_LSN(be64_to_cpu(hdr->h_tail_lsn)),
61
be32_to_cpu(hdr->h_len),
62
be32_to_cpu(hdr->h_num_logops));
65
if (GET_CYCLE(buf, ARCH_CONVERT) != last_cycle) {
67
"[%05lld - %05lld] Cycle 0x%08x New Cycle 0x%08x\n",
65
if (xlog_get_cycle(buf) != last_cycle) {
67
"[%05lld - %05lld] Cycle 0x%08x New Cycle 0x%08x\n"),
68
68
(long long)dupblkno, (long long)blkno,
69
last_cycle, GET_CYCLE(buf, ARCH_CONVERT));
70
last_cycle = GET_CYCLE(buf, ARCH_CONVERT);
69
last_cycle, xlog_get_cycle(buf));
70
last_cycle = xlog_get_cycle(buf);