The rbd CLI tool no longer attempts to initialize a CephContext
and pass said context to librados since it's possible that the
structure will not be ABI compatible between rbd and librados.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Switched to context-aware NSS init/shutdown functions to avoid conflicts
with parent application. Use a reference counter to properly shutdown the
NSS crypto library when the last CephContext is destroyed. This avoids
memory leaks with the NSS library from users of librados.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
...while injecting inodes. So that if you're a cephfs
admin but not uid=0 on the client, you can get things
injected as your choice of uid/gid.
Definitely useful for dev/test, potentially useful
elsewhere too.
Signed-off-by: John Spray <john.spray@redhat.com>
This is to deal with the slightly perverse situation
where a user might have all the permissions they need
to create a filesystem and mount it with fuse, but then
be unable to do anything inside the mount because
we default to creating a root-owned "/" inode.
This is immediatley useful for dev/test environments without
root, but also potentially in production environments
where the filesystem configuration/mounting is done by
someone less privileged than root.
Signed-off-by: John Spray <john.spray@redhat.com>
Recent update to erasure code library in 59aa6700 caused a regression
where .s files are no longer properly anotated and yasm sets the exec
stack for them. This patch brings back the anotations as was done before
by Dan Mick, see Bug #10114.
Signed-off-by: Boris Ranto <branto@redhat.com>
--object-extents is a bit confusing - extent is generally something of
a varying length and here the meaning is "diff whole objects". Rename
it to --whole-object (the name of diff_iterate() parameter).
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Change du to take <image-spec> | <snap-spec> as an argument instead of
going through --image option. The new synopsis is
(du | disk-usage) [<image-spec> | <snap-spec>]
This is to make it look more like the rest of the commands: the only
other command that takes pool as an argument is ls and it can't really
serve as a prototype for du, because the latter has to work on images
and snapshots as well.
Examples:
# stats for pool rbd
$ rbd du
$ rbd -p rbd du
# stats for pool foo
$ rbd -p foo du
# stats for snapshot mysnap of image baz in pool rbd
$ rbd du baz@mysnap
# stats for image bar in pool foo
$ rbd du foo/bar
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
- import-diff needs image-spec, yet OPT_IMPORT_DIFF was in the list of
commands that don't need imgname
- check for lock id after imgname, so that if imgname isn't specified
we fail with imgname rather than lock id error message
- error out if locker isn't specified
- move feature-name validity check after imgname checks so that if
imgname is malformed we fail with imgname rather than feature error
message
- error out if image-meta key or value isn't specified
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
No command uses it as of now, but only clone command fails; cp, mv and
import simply ignore it. Check if it's set and exit with a generic
error message.
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Mark those as such in help and clarify what image-spec defaults to.
Related, all command args in our man page are enclosed into brackets.
I suppose the reason is that they are optional in the sense that you
can have commands like
$ rbd clone --pool a --image b --snap -c --dest-pool d --dest e
with no args. Given that we are trying to push people towards
$ rbd clone a/b@c d/e
undo that so that real optional arguments can be marked optional.
While at it, add synopsis for each command and use backticks for
denoting commands more consistently.
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
This patch changes image-name instances to image-spec and snap-name
instances to snap-spec to try to clarify usage for some commands and
disambiguate the term {image,snap}-name, which has been used to denote
both simple names and compound names (specs).
<image-spec> is [<pool-name>]/<image-name>
<snap-spec> is [<pool-name>]/<image-name>@<snap-name>
This patch also removes duplicate checks for image-name and snap-name.
Signed-off-by: Vikhyat Umrao <vumrao@redhat.com>
[idryomov@gmail.com: some commands take either image-spec or snap-spec,
other fixes, formatting, changelog]
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
"fault" will transmit state to exception state or STATE_CONNECTING, all
transmitted states don't need to check right now.
Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
* maybe we can have div32 tests on aarch64, but i don't
think "udiv|sdiv" supports 64bits numerator. probably
we can use float divde for the benchmark...
* disable cpuid test on non-intel archs.
Fixes: #12453
Reported-by: Tom Deneau <tom.deneau@amd.com>
Signed-off-by: Kefu Chai <kchai@redhat.com>
Otherwise, _flush() might continue to write to m_fd after it's closed.
This might cause log data to go to a data object if the filestore then
reuses the fd during that time.
Fixes: #12465
Backport: firefly, hammer
Signed-off-by: Samuel Just <sjust@redhat.com>
This was getting assigned with LogEvent::get_start_offset
on an uncommitted LogEvent, which is junk. During replay
last_journaled is compared with the metablob's event_seq,
so that's what should be used here.
This change just from code inspection -- haven't seen this
manifest as an actual misbehaviour.
Signed-off-by: John Spray <john.spray@redhat.com>