]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- |
2 | // vim: ts=8 sw=2 smarttab | |
3 | /* | |
4 | * Ceph - scalable distributed file system | |
5 | * | |
6 | * Copyright (C) 2015 Red Hat | |
7 | * | |
8 | * This is free software; you can redistribute it and/or | |
9 | * modify it under the terms of the GNU Lesser General Public | |
10 | * License version 2.1, as published by the Free Software | |
11 | * Foundation. See file COPYING. | |
12 | * | |
13 | */ | |
14 | ||
15 | ||
16 | #include "SimpleLock.h" | |
17 | #include "Mutation.h" | |
18 | ||
19 | void SimpleLock::dump(Formatter *f) const { | |
20 | assert(f != NULL); | |
21 | if (is_sync_and_unlocked()) { | |
22 | return; | |
23 | } | |
24 | ||
25 | f->open_array_section("gather_set"); | |
26 | if (have_more()) { | |
27 | for(std::set<int32_t>::iterator i = more()->gather_set.begin(); | |
28 | i != more()->gather_set.end(); ++i) { | |
29 | f->dump_int("rank", *i); | |
30 | } | |
31 | } | |
32 | f->close_section(); | |
33 | ||
34 | f->dump_int("num_client_lease", num_client_lease); | |
35 | f->dump_int("num_rdlocks", get_num_rdlocks()); | |
36 | f->dump_int("num_wrlocks", get_num_wrlocks()); | |
37 | f->dump_int("num_xlocks", get_num_xlocks()); | |
38 | f->open_object_section("xlock_by"); | |
39 | if (get_xlock_by()) { | |
40 | get_xlock_by()->dump(f); | |
41 | } | |
42 | f->close_section(); | |
43 | } |