Skip to content
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

Merged
merged 1 commit into from Dec 7, 2015

Conversation

jcsp
Copy link
Contributor

@jcsp jcsp commented Nov 19, 2015

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

@jcsp jcsp added feature cephfs Ceph File System labels Nov 19, 2015
@ukernel
Copy link
Contributor

ukernel commented Nov 24, 2015

looks good

@gregsfortytwo
Copy link
Member

@jcsp, looks like we don't have any tests covering this.

Also please describe any testing you did perform when creating the PR. :)

@jcsp
Copy link
Contributor Author

jcsp commented Nov 24, 2015

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.

@gregsfortytwo
Copy link
Member

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!

@jcsp
Copy link
Contributor Author

jcsp commented Nov 24, 2015

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.

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>
@jcsp
Copy link
Contributor Author

jcsp commented Dec 1, 2015

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.

@jcsp jcsp assigned gregsfortytwo and unassigned jcsp Dec 1, 2015
gregsfortytwo added a commit that referenced this pull request Dec 7, 2015
tools: add cephfs-table-tool 'take_inos'

Reviewed-by: Yan, Zheng <zyan@redhat.com>
@gregsfortytwo gregsfortytwo merged commit 47c7893 into ceph:master Dec 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cephfs Ceph File System feature
Projects
None yet
4 participants