New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tools: add cephfs-table-tool 'take_inos' #6655
Conversation
looks good |
@jcsp, looks like we don't have any tests covering this. Also please describe any testing you did perform when creating the PR. :) |
I tested this by using it on a development cluster, and dumping the inotable to see that the expected results had happened. It's pretty fringe so for me it's not a priority for writing an automated test for right now. |
We've done reasonably well with testing in general, but I'd like to make a line for the new tools to make sure all our new functionality has decent test coverage. This is definitely part of that — we don't want to need this on a user site and suddenly discover it was broken on the version they had installed! |
Let's make this some sort of official policy so that we can point contributors at it -- we shouldn't be establishing this kind of thing in PR comments. |
d1cbebd
to
445f5f9
Compare
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>
445f5f9
to
7a8fd0e
Compare
See http://pulpito.ceph.com/jspray-2015-11-30_02:06:10-fs-wip-testing-jcsp---basic-multi/1163847 where the new test ceph/ceph-qa-suite#744 is passing. Merge the test at the same time as this. |
tools: add cephfs-table-tool 'take_inos' Reviewed-by: Yan, Zheng <zyan@redhat.com>
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