Whamcloud - gitweb
LUDOC-294 protocol: Bring in new connection documentation
[doc/protocol.git] / llog.txt
1 The Lustre Log Facility
2 -----------------------
3 [[llog]]
4
5 LLOG Structures
6 ~~~~~~~~~~~~~~~
7
8 LLOG Log ID
9 ^^^^^^^^^^^
10
11 ----
12 struct llog_logid {
13         struct ost_id           lgl_oi;
14         __u32                   lgl_ogen;
15 };
16 ----
17
18 LLog Information
19 ^^^^^^^^^^^^^^^^
20
21 ----
22 struct llogd_body {
23         struct llog_logid  lgd_logid;
24         __u32 lgd_ctxt_idx;
25         __u32 lgd_llh_flags;
26         __u32 lgd_index;
27         __u32 lgd_saved_index;
28         __u32 lgd_len;
29         __u64 lgd_cur_offset;
30 };
31 ----
32
33 The lgd_llh_flags are:
34 ----
35 enum llog_flag {
36         LLOG_F_ZAP_WHEN_EMPTY   = 0x1,
37         LLOG_F_IS_CAT           = 0x2,
38         LLOG_F_IS_PLAIN         = 0x4,
39 };
40 ----
41
42 LLog Record Header
43 ^^^^^^^^^^^^^^^^^^
44
45 ----
46 struct llog_rec_hdr {
47         __u32   lrh_len;
48         __u32   lrh_index;
49         __u32   lrh_type;
50         __u32   lrh_id;
51 };
52 ----
53
54 LLog Record Tail
55 ^^^^^^^^^^^^^^^^
56
57 ----
58 struct llog_rec_tail {
59         __u32   lrt_len;
60         __u32   lrt_index;
61 };
62 ----
63
64 LLog Log Header Information
65 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
66
67 ----
68 struct llog_log_hdr {
69         struct llog_rec_hdr     llh_hdr;
70         obd_time                llh_timestamp;
71         __u32                   llh_count;
72         __u32                   llh_bitmap_offset;
73         __u32                   llh_size;
74         __u32                   llh_flags;
75         __u32                   llh_cat_idx;
76         /* for a catalog the first plain slot is next to it */
77         struct obd_uuid         llh_tgtuuid;
78         __u32                   llh_reserved[LLOG_HEADER_SIZE/sizeof(__u32) - 23];
79         __u32                   llh_bitmap[LLOG_BITMAP_BYTES/sizeof(__u32)];
80         struct llog_rec_tail    llh_tail;
81 };
82 ----
83