Yunchuan Wen [Mon, 3 Aug 2015 13:03:47 +0000 (13:03 +0000)]
Allow do_autogen.sh to pass configure parameters
Currently do_autogen.sh does not allow to pass parameters
of configure to disable/enable components during building, which is not
flexible, this patch add the ability to it.
Signed-off-by: Yunchuan Wen <yunchuanwen@ubuntukylin.com> Reviewed-by: Li Wang <liwang@ubuntukylin.com>
os/FileStore: getattr() should return 0 if success
* fix the test of ObjectStore/StoreTest.SimpleCloneTest, the expected
return value of getattr() should be 0. otherwise it otherwise it fails
on objectstore backends of "memstore" and "keyvaluestore".
* change FileStore::getattr() to return 0 on success
* tighten related tests in ceph_test_objectstore, to test the return value
of getattr() using ASSERT_EQ(r, 0) instead of ASSERT_GE(r, 0)
rgw: skip prefetch first chunk if range get falls to shadow objects
Currently the head object will be prefetched in each GET:
a) This is unnecessary if the Range GET falls to shadow objects.
b) The GET request would be quite slow if we have a big head object
This patch adds some check on the Range. If it's not in the head
object(>=rgw_max_chunk_size) then skip the prefetch.
John Spray [Thu, 30 Jul 2015 13:20:56 +0000 (14:20 +0100)]
osd/OSDMap: handle incrementals that modify+del pool
Because new_pools was processed after old_pools, if something
was modified and then deleted in the same incremental
map, then the resulting state would be a pool in the map
that had no entry in pool_name.
Fixes: #12429 Signed-off-by: John Spray <john.spray@redhat.com>
test_librbd_fsx: invalidate before discard in krbd mode
Commit bd050240ceef ("test_librbd_fsx: flush before discard in krbd
mode") added an fsync() before BLKDISCARD. Don't know what I was
thinking at the time, but I missed the invalidate part, for which we
need to use the BLKFLSBUF ioctl.
Samuel Just [Fri, 24 Jul 2015 22:38:18 +0000 (15:38 -0700)]
Log::reopen_log_file: take m_flush_mutex
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.
the first op id was 16 by default, which is okay, but a non-zero
magic number could lead to questions. max_op was mixed up with
max_ops, and changed to 16 in 51e402e3 by mistake.
Jason Dillaman [Tue, 28 Jul 2015 19:27:24 +0000 (15:27 -0400)]
rbd: remove dependency on non-ABI controlled CephContext
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>
Jason Dillaman [Tue, 28 Jul 2015 17:14:29 +0000 (13:14 -0400)]
crypto: use NSS_InitContext/NSS_ShutdownContex to avoid memory leak
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>
John Spray [Tue, 28 Jul 2015 10:13:21 +0000 (11:13 +0100)]
mds: configurable uid/gid on new root inos
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.
Boris Ranto [Mon, 27 Jul 2015 11:14:32 +0000 (13:14 +0200)]
Anotate all the .s files
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.
rbd: rename --object-extents option to --whole-object
--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).
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
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.
rbd: import doesn't require image-spec arg, ditto for export and path
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.
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>