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