summaryrefslogtreecommitdiffstats
path: root/src/tools/cephfs/TableTool.cc (follow)
Commit message (Collapse)AuthorAgeFilesLines
* common: move ConfigValues out of md_config_tKefu Chai2018-07-101-1/+1
| | | | | | | | | | | | by moving ConfigValues out of md_config_t, we are able to point md_config_t to a new ConfigValues instance at runtime, without destroying the old one. also remove ConfigReader, because all md_config_obs_t will be updated with ConfigProxy now. as md_config_t is not able to offer the *data* anymore. Signed-off-by: Kefu Chai <kchai@redhat.com>
* core: use const_iterator for decodeKefu Chai2018-05-171-1/+1
| | | | Signed-off-by: Kefu Chai <kchai@redhat.com>
* global: output usage on -h, --help, or no args before contacting monsSage Weil2018-03-151-7/+4
| | | | | | | | | | | | - when there are no arguments, print a short invitation to stderr to use -h or --help and exit with an error. - if we get -h or --help, print usage to stdout, and exit with success. - do the above *before* making any contact with the cluster. we should not fail to explain usage because the mons are down. - if there is some other error with the arguments, print an error message, but do not spam the user with usage. Try to use cerr instead of derr. Signed-off-by: Sage Weil <sage@redhat.com>
* tools: Use unqualified encode/decodeAdam C. Emerson2018-01-101-2/+2
| | | | | | | This is a portion of Part 1 of the namespace project: using ADL properly in encode and decode so we can use namespaces easily in Ceph. Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
* dout: Use dout_contextAdam C. Emerson2016-12-221-0/+1
| | | | | | | As a transition for g_ceph_context removal, make all dout macros depends on a local macro. Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
* Merge pull request #9651 from renhwztetecs/renhw-wip-mdcacheJohn Spray2016-06-141-1/+1
|\ | | | | | | | | mds: fix mdsmap->get_metadata_pool() return to int64_t Reviewed-by: John Spray <john.spray@redhat.com>
| * mds/tools: fix mds->mdsmap->get_metadata_pool() return int->int64_thuanwen ren2016-06-121-1/+1
| | | | | | | | | | | | | | mds->mdsmap->get_metadata_pool() return should be int64_t not int, fix up Signed-off-by: huanwen ren <ren.huanwen@zte.com.cn>
* | tools/cephfs: flush output before returningxie xingguo2016-06-061-1/+0
| | | | | | | | | | | | Otherwise caller won't get the output message correctly. Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
* | tools/cephfs: add sanity check for rados.connect()xie xingguo2016-06-061-3/+5
|/ | | | | | Which can fail. Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
* tools/cephfs: update for FSMapJohn Spray2016-03-101-62/+60
| | | | | | | Everywhere we used to take a rank, we now take a role (<fscid:rank>) Signed-off-by: John Spray <john.spray@redhat.com>
* make ctors with one argument explicitDanny Al-Gaaf2016-01-291-1/+1
| | | | | | | Use explicit keyword for constructors with one argument to prevent implicit usage as conversion functions. Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
* tools: add cephfs-table-tool 'take_inos'John Spray2015-11-251-128/+143
| | | | | | | | | | | | | | | | | For when your InoTable is wrong, and you want to bluntly mark all the inos up to the highest you've seen as in use. You'll waste some inos by marking in use when they're really not, but you'll guarantee that the system won't try and re-use an ino that's really already used by a file. Since this breaks the mould of the apply_rank_fn prototype, and I'm using lambdas here now, also go ahead and convert the other actions to be lambdas instead of having lots of _reset_foo_table boilerplate at class scope. Signed-off-by: John Spray <john.spray@redhat.com>
* tools: fix deprecated warningKefu Chai2015-07-011-1/+1
| | | | | | | s/set_op_flags/set_op_flags2/ Fixes: #12120 Signed-off-by: Kefu Chai <kchai@redhat.com>
* tools: fix tabletool reset of nonexistent sessionmapJohn Spray2015-05-121-0/+1
| | | | | | | | | If the object didn't exist, the omap clear was failing and preventing the subsueent omap set header from executing. Set the FAILOK flag on the omap clear sub-operation. Signed-off-by: John Spray <john.spray@redhat.com>
* tools: fix tabletool reset snapJohn Spray2015-05-121-1/+1
| | | | | | | | | SnapServer has an encode method defined that is different to encode_state, whereas in InoTable the two were synonmous. This code was working previously for inotable but not for snapserver. Signed-off-by: John Spray <john.spray@redhat.com>
* mds: new OMAP storage for sessionmapJohn Spray2015-03-061-2/+100
| | | | | Fixes: #10649 Signed-off-by: John Spray <john.spray@redhat.com>
* tools: create cephfs-table-toolJohn Spray2015-01-161-0/+306
It was unnatural to shoehorn resetting tables into the journaltool. This new tool initially can simply dump or reset the session/snap/ino tables, and would also be a place for any more complex operations in future. Signed-off-by: John Spray <john.spray@redhat.com>