The buffer provided to aio_write shouldn't be invalidated until
after aio_write has indicated that the operation has completed.
Fixes: #10590
Backport: giant
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Reviewed-by: Josh Durgin <jdurgin@redhat.com>
Automatic locking hides the ESHUTDOWN from the caller, which is how
this test detects that blacklisting works.
Fixes: #10592
Signed-off-by: Josh Durgin <jdurgin@redhat.com>
Fix the way we parse the marker. Instead of specifying whether it's a
sharded or not sharded bucket, we pass a shard_id. If string itself
points to a singe shard, we'll use the passed shard_id, otherwise we'll
parse the string and determine the shard id by that. In this way when
referencing a single shard we can get the marker with either shard id
specified or not. This works with the non-shard case too.
Adjust the bilog listing function, set it to work with the new
interface. It was broken before, and there are multiple fixes to it.
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
when config journal_zero_on_create true, osd mkfs will fail when zeroing journal.
journal open with O_DIRECT, buf should align with blocksize.
Backport: giant, firefly, dumpling
Signed-off-by: Xie Rui <875016668@qq.com>
Reviewed-by: Sage Weil <sage@redhat.com>
latest_monmap that we stash is only used locally--the encoded bl is never shared. Which means we should just use CEPH_FEATURES_ALL all of the time.
Fixes: #5203
Backport: giant, firefly
Signed-off-by: Xie Rui <875016668@qq.com>
Reviewed-by: Sage Weil <sage@redhat.com>
Reviewed-by: Joao Eduardo Luis <joao@redhat.com>
In a bucket aio operation, wait for completions only if there are no
completions available. Otherwise we might wait forever, as everything
already complete.
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
We were iterating on both completion_objs, and completions assuming that
they follow each other. They don't do it. While at it, index completions
by id, so that we could update the completed objs correctly.
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
Fixes: #10311
We're keeping track of rados objects that we've written so that we could
clean them up if needed. Earlier we weren't too accurate about it and
were also setting the head object that is yet to be written. This now
only applies to the tail data, and a bit clearer.
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
The zone config params are set in the region configuration. Also,
there's a ceph.conf configurable (rgw_override_bucket_index_max_shards)
for overriding this per rgw.
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
Need to pass the actual num shards that are going to be used for this
specific bucket. Bucket may be created by applying metadata from
different zone, so num shards might be different.
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
Instead of just having the list of oids, keep the shard ids together, so
that we can know on which shard the operation happened.
Bucket markers are just using the shard numeric id, instead of the
bucket instance shard id. This makes it easier to parse the markers
appropriately.
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
Class is no longer a template, and keeps a map of oids by shard_id. Call
issue_op() using both shard_id and oids. Shard id is used for mapping
the results in the derived classes.
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
Instead of recalculating the hash every call, do it once, and pass this
structure around. Also, will be used for logging changes into the data
log.
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
bucket shard can be specified on the bucket instance param. It can be
added like this: <bucket-instance>[:shard-id]
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
Turned the ConcurrentIO class a template, so that we could use different
kind of containers that are needed for the different operations.
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
Instead of copy pasting the same code all over again, create a base
class for the needed concurrent IO operations.
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>