~ubuntu-branches/ubuntu/trusty/ceph/trusty-updates

« back to all changes in this revision

Viewing changes to src/osdc/Journaler.h

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2014-04-09 11:14:03 UTC
  • mfrom: (1.1.33)
  • Revision ID: package-import@ubuntu.com-20140409111403-jlql95pa8kg1nk9a
Tags: 0.79-0ubuntu1
* New upstream release (LP: #1278466):
  - d/p/modules.patch: Refreshed.
  - d/ceph.install: Install all jerasure modules.

Show diffs side-by-side

added added

removed removed

Lines of Context:
98
98
      ::decode(write_pos, bl);
99
99
      ::decode(layout, bl);
100
100
    }
 
101
 
 
102
    void dump(Formatter *f) const {
 
103
      f->open_object_section("journal_header");
 
104
      {
 
105
        f->dump_string("magic", magic);
 
106
        f->dump_unsigned("write_pos", write_pos);
 
107
        f->dump_unsigned("expire_pos", expire_pos);
 
108
        f->dump_unsigned("trimmed_pos", trimmed_pos);
 
109
        f->open_object_section("layout");
 
110
        {
 
111
          f->dump_unsigned("stripe_unit", layout.fl_stripe_unit);
 
112
          f->dump_unsigned("stripe_count", layout.fl_stripe_unit);
 
113
          f->dump_unsigned("object_size", layout.fl_stripe_unit);
 
114
          f->dump_unsigned("cas_hash", layout.fl_stripe_unit);
 
115
          f->dump_unsigned("object_stripe_unit", layout.fl_stripe_unit);
 
116
          f->dump_unsigned("pg_pool", layout.fl_stripe_unit);
 
117
        }
 
118
        f->close_section(); // layout
 
119
      }
 
120
      f->close_section(); // journal_header
 
121
    }
 
122
 
 
123
    static void generate_test_instances(list<Header*> &ls)
 
124
    {
 
125
      ls.push_back(new Header());
 
126
      ls.push_back(new Header());
 
127
      ls.back()->trimmed_pos = 1;
 
128
      ls.back()->expire_pos = 2;
 
129
      ls.back()->unused_field = 3;
 
130
      ls.back()->write_pos = 4;
 
131
      ls.back()->magic = "magique";
 
132
    }
101
133
  } last_written, last_committed;
102
134
  WRITE_CLASS_ENCODER(Header)
103
135