This changeset makes AsyncMessenger a bit smarter when it comes
to assigning worker threads to AsyncConnections. Each time a worker
is assigned, its reference count is increased. Next time when Async
Messenger needs to assign another worker to new AsyncConnection, it
picks the one with the lowest reference count. If it cannot find an
idle one, and number of currently instantiated workers is less than
specified with "ms async op max threads", the new worker is created
and returned.
Once AsyncConnection goes away, the reference count on assigned
worker is decreased.
This does not prevent, but greatly reduces chances of having a single
async worker thread doing most (or even all) of the ops, and also
removes the need to manually tune the "ms async op threads" option.
Signed-off-by: Piotr Dałek <git@predictor.org.pl>
EC objects are written sequentially and not modified.
Note: we could probably hint about write sizes here,
too...
Signed-off-by: Sage Weil <sage@redhat.com>
rbd_map_image() echoes the id of the image and is used in command
substitution:
id=$(rbd_map_image "${image}")
Output from rbd map isn't consumed and clobbers the return.
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
This is a followup to 38a572011d ("qa: rbd/map-snapshot-io.sh: don't
chown sysfs files") for the rest of the workunits:
- /sys/bus/rbd/add_single_major is used if present, so chown'ing
/sys/bus/rbd/add doesn't help. Use sudo on rbd map instead.
- Don't modprobe or udevadm settle - rbd CLI tool takes care of that.
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
These have been deprecated since hammer, and were only kept so that you
could do an offline upgrade from firefly. Bye bye!
Signed-off-by: Sage Weil <sage@redhat.com>
doc: words of caution about cache tiering
Reviewed-by: Samuel Just <sjust@redhat.com>
Reviewed-by: Nick Fisk <nick@fisk.me.uk>
Reviewed-by: Josh Durgin <jdurgin@redhat.com>
...instead of the value set via set_snap_read(). This makes
aio_sparse_read() consistent with aio_read(), which also accepts a
snapid parameter.
Signed-off-by: David Disseldorp <ddiss@suse.de>
Otherwise, if it is reaped while we are waiting, it'll be a
use-after-free.
Fixes: http://tracker.ceph.com/issues/15870
Signed-off-by: Samuel Just <sjust@redhat.com>
In `create_bucket`, we open an ioctx for domain root pool and never use
it later, removing this.
Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
For both pg_temp and primary_temp, we want to calculate what the
mapping *will* be after the inc is applied, and if the mapping is
redundant (it matches what we would have gotten anyway), remove
it. Removing the mapping might mean putting a 'remove' entry in
the inc, or it might mean removing the proposed addition in the
inc.
Update the unit test to test both cases.
Signed-off-by: Sage Weil <sage@redhat.com>