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.
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.
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>
test/perf_local: disable tests on unsupported archs
* 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>
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.
Fixes: #12465
Backport: firefly, hammer Signed-off-by: Samuel Just <sjust@redhat.com>
John Spray [Fri, 24 Jul 2015 08:37:15 +0000 (09:37 +0100)]
mds: fix val used in inode->last_journaled
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.
radosgw init script is unable to start radosgw daemon.
as it is relies on requiretty being disabled.
once init script start this daemon with sudo it fails
to start the daemon.
changing 'sudo' to 'su', it will fix this issue and
will also help running radosgw daemon with our new
"ceph" UID project.
John Spray [Wed, 22 Jul 2015 20:57:33 +0000 (21:57 +0100)]
mds: fix crash while stopping rank
trim() was broken in: 8a91daae mds: fix mds crash when mds_max_log_events smaller
When doing a final trim in shutdown we need to trim everything,
not just all but the last segment. The previous change's intent
was to prevent badness when mds_log_max_events was too small: accomplish
the same thing here by clamping the value to something sane.
Fixes: #12355 Signed-off-by: John Spray <john.spray@redhat.com>
Both empty arguments and illegal parameters, can modify the existing configuration to none permissions.
It should be modified to:
1.empty parameter modify the existing configuration to none permissions.
2.illegal parameter return an error.
test fix:
before: subuser create or modify, illegal access parameter can modify the existing configuration.
after changes, do the same procedure, can check for illegal access parameters.
tests: robust test for the pool create crushmap test
The test that goes with f1e86be589803596e86acc964ac5c5c03b4038d8 to
verify that a bugous crush ruleset will prevent the creation of a pool
trying to use it was fragile. I depends on the implementation of the
erasure code lrc plugin and turns out to not work on i386.
The test is modified to use a fake crushtool that always returns false
and validate that it prevents the creation of a pool, which demonstrate
it is used for crushmap validation prior to the pool creation.
John Spray [Tue, 21 Jul 2015 15:09:32 +0000 (16:09 +0100)]
auth: check return value of keyring->get_secret
get_secret can fail to populate the passed CryptoKey, for
example if the entity name is not found in the keyring. In
this case, attempts to use the CryptoKey will lead to
segfaults.
Fixes: #12417 Signed-off-by: John Spray <john.spray@redhat.com>