Changeset View
Changeset View
Standalone View
Standalone View
head/sys/geom/journal/g_journal.h
Show First 20 Lines • Show All 209 Lines • ▼ Show 20 Lines | struct g_journal_entry { | ||||
uint64_t je_joffset; | uint64_t je_joffset; | ||||
uint64_t je_offset; | uint64_t je_offset; | ||||
uint64_t je_length; | uint64_t je_length; | ||||
} __packed; | } __packed; | ||||
#define GJ_RECORD_HEADER_MAGIC "GJRHDR" | #define GJ_RECORD_HEADER_MAGIC "GJRHDR" | ||||
#define GJ_RECORD_HEADER_NENTRIES (20) | #define GJ_RECORD_HEADER_NENTRIES (20) | ||||
#define GJ_RECORD_MAX_SIZE(sc) \ | #define GJ_RECORD_MAX_SIZE(sc) \ | ||||
((sc)->sc_jprovider->sectorsize + GJ_RECORD_HEADER_NENTRIES * MAXPHYS) | ((sc)->sc_jprovider->sectorsize + GJ_RECORD_HEADER_NENTRIES * maxphys) | ||||
#define GJ_VALIDATE_OFFSET(offset, sc) do { \ | #define GJ_VALIDATE_OFFSET(offset, sc) do { \ | ||||
if ((offset) + GJ_RECORD_MAX_SIZE(sc) >= (sc)->sc_jend) { \ | if ((offset) + GJ_RECORD_MAX_SIZE(sc) >= (sc)->sc_jend) { \ | ||||
(offset) = (sc)->sc_jstart; \ | (offset) = (sc)->sc_jstart; \ | ||||
GJ_DEBUG(2, "Starting from the beginning (%s).", \ | GJ_DEBUG(2, "Starting from the beginning (%s).", \ | ||||
(sc)->sc_name); \ | (sc)->sc_name); \ | ||||
} \ | } \ | ||||
} while (0) | } while (0) | ||||
▲ Show 20 Lines • Show All 150 Lines • Show Last 20 Lines |