| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
[ idryomov: squash test_unsupported_clone_format() into
test_clone_format() ]
Fixes: https://tracker.ceph.com/issues/65744
Signed-off-by: junxiang Mu <1948535941@qq.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Allow cloning from non-user snapshots -- namely snapshots in group
and mirror namespaces. The motivation is to provide a building block
for cloning new groups from group snapshots ("rbd group snap create").
Otherwise, group snapshots as they are today can be used only for
rolling back the group as a whole, which is very limiting.
While at it, there doesn't seem to be anything wrong with making it
possible to clone from mirror snapshots as well.
Snapshots in a trash namespace can't be cloned from since they are
considered to be deleted.
Cloning from non-user snapshots is limited to clone v2 just because
protecting/unprotecting is limited to snapshots in a user namespace.
This happens to simplify some invariants.
Fixes: https://tracker.ceph.com/issues/64662
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
|
|
|
|
|
|
|
|
| |
With an error check for p_snap_name, it doesn't make much sense to
crash if "either p_id or p_name" contract is violated. Replace the
assert with a similar error check.
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
|
|
|
|
|
|
|
|
| |
The "append to the passed list" behavior is confusing and not what the
corresponding C API (rbd_watchers_list) or other similar C++ APIs (e.g.
list_lockers) do.
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
|
|
|
|
| |
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
|
|
|
|
|
|
|
|
| |
This fixes cases where CRYPTO HEADER area is larger than DATA area.
In particular, it was effectively impossible to flatten unformatted
clones of such images.
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When encryption is loaded, rbd_get_overlap() and Image::overlap() now
return "effective" overlap, similar to rbd_get_size() and Image::size().
Previously, returned overlap could have been bigger than "effective"
size.
Note that get_effective_image_size() successor doesn't take snap_id
because passing anything but ictx->snap_id was broken. Since the size
of the crypto header is stored in the crypto header itself, image areas
are defined only for the "opened at" snap_id. Getting "effective" size
for an arbitrary snapshot requires actually opening it and loading
encryption on it.
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- DATA area is assumed at the API layer as there is no way to pass
an area
- DATA area is assumed by ImageWriteback because PWL cache persists
image extents as provided by the user without any kind of designator
and therefore can be active only in either area
- luks::FlattenRequest operates on CRYPTO_HEADER area
The passed area is acted upon in ImageDispatchSpec constructor in the
next commit.
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
|
|
|
|
|
|
|
|
|
|
| |
copy/deep_copy use object_map to judge whether object exist.
If w/ librbdo pwl cache, flush can't flush data to osd which
change objectmap state. So we should send flush w/ FLUSH_SOURCE_INTERNAL
to make data flush to osd.
Fixes:https://tracker.ceph.com/issues/53057
Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
|
|
|
|
|
|
|
|
|
|
| |
* add "std::" prefix in headers
* add "using" declarations in .cc files.
so we don't rely on "using namespace std" in one or more included
headers.
Signed-off-by: Kefu Chai <kchai@redhat.com>
|
|
|
|
|
|
| |
This commit exposes librbd encryption api
Signed-off-by: Or Ozeri <oro@il.ibm.com>
|
|
|
|
| |
Signed-off-by: Li, Xiaoyan <xiaoyan.li@intel.com>
|
|
|
|
|
|
|
| |
Read requests will always need to go via the image dispatch layer to
ensure migrations are properly handled.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
|
|
|
|
|
|
| |
Except invalidating object cache, invalidate image writeback cache.
Signed-off-by: Li, Xiaoyan <xiaoyan.li@intel.com>
|
|
|
|
|
|
| |
Move IO check to interfaces in Utils.
Signed-off-by: Li, Xiaoyan <xiaoyan.li@intel.com>
|
|
|
|
| |
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
|
|
|
|
|
|
|
| |
This allows a specific IOContext to be used regardless of the image's
current read and write snapshot state.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
|
|
|
|
|
| |
Signed-off-by: Sage Weil <sage@newdream.net>
Signed-off-by: Neha Ojha <nojha@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
The ImageCtx will contain a shared_ptr to its AsioEngine and previous
usage for get_work_queue now directly instantiate their own AsioEngine
instance.
Additionally, AsioEngine is now lighter weight by re-using the
io_context exposed via a neorados-wrapped librados API.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There are a few name collisions between Windows headers and ceph.
Where possible, we'll update Ceph code to avoid redefinitions.
The following names overlap with Windows headers:
* ERROR, NO_ERROR
* DELETE
* LocalLock
* LOCK_SHARED, LOCK_EXCLUSIVE
Signed-off-by: Lucian Petrut <lpetrut@cloudbasesolutions.com>
|
|
|
|
|
|
|
|
|
| |
The majority of usage of ContextWQ has been switched to use the
ASIO ContextWQ adapter class. The journal, RWL cache, and image update
notifications remain the only remaining use of dedicated ThreadPools in
librbd.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
|
|
|
|
|
|
|
| |
Callers have never needed the actual ThreadPool which is being
removed. Refactored into ImageCtx::get_work_queue method.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
|
|\
| |
| |
| |
| | |
librbd: replace ImageRequestWQ with pluggable ImageDispatcher
Reviewed-by: Mykola Golub <mgolub@suse.com>
|
| |
| |
| |
| |
| |
| |
| | |
This is another step in the removal of ImageRequestWQ in favor
of the new ImageDispatcher.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
|
| |
| |
| |
| |
| |
| |
| | |
This will allow re-use between the existing ObjectDispatcher and
the ImageDispatcher that will be added in a future commit.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
|
|/
|
|
|
|
|
|
|
|
| |
When copying from a v1 image, by default the new destination image
would be created using the v1 format. Since the creation of v1 images
is disallowed, this has been updated to default to using the v2
image format.
Fixes: https://tracker.ceph.com/issues/45518
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
|
|
|
|
|
|
|
| |
The librbd create API's ImageOptions parameter now supports passing
the mirror image mode.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
|
|
|
|
|
|
|
|
| |
The current boolean for skip enable mirror will be able to be changed to
a tri-state to force enable mirror (in addition to the current auto-enable
if in pool-mode).
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
|
|
|
|
|
|
|
| |
Any ".rbd"-prefixed image-meta keys will be considered RBD-internal and
will not be added to the new image when copied/cloned.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
|
|
|
|
| |
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
|
|
|
|
|
|
|
| |
It currently assumes that you can only create snapshots from user
snapshot namespaces.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
|
|
|
|
|
|
|
| |
The rbd-mirror daemon will need to be able to create images using
snapshot-based mirroring.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
|
|\
| |
| |
| |
| | |
librbd:move all snapshot API functions in internal.cc over to api/Snapshot.cc
Reviewed-by: Jason Dillaman <dillaman@redhat.com>
|
| |
| |
| |
| | |
Signed-off-by: Zheng Yin <zhengyin@cmss.chinamobile.com>
|
|\ \
| |/
|/|
| |
| | |
FIPS: audit and switch some memset & bzero users
Reviewed-by: Marcus Watts <mwatts@redhat.com>
|
| |
| |
| |
| | |
Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
|
|/
|
|
|
|
|
|
| |
.. for Journal, ExclusiveLock and ObjectMap class, and in
case that cannot be avoided, then make sure to destruct the
object by calling ->put().
Signed-off-by: Venky Shankar <vshankar@redhat.com>
|
|
|
|
| |
Signed-off-by: Mykola Golub <mgolub@suse.com>
|
|
|
|
|
|
|
|
| |
The main motivation for this change is to avoid copies due to the use of
boost::function/std::function where captures of std::unique_ptr (in
subsequent commits) would fail to compile.
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
|
|
|
|
| |
Signed-off-by: Kefu Chai <kchai@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
With the various threads and conditional IO paths within librbd, it was
possible for external AIO callbacks to be concurrently executed from
different librbd threads. These callbacks should be serialized to reduce
the unexpected potential for data corruption.
Fixes: http://tracker.ceph.com/issues/40417
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
|
|
|
|
|
|
|
|
| |
'perf' shows several percent of CPU being wasted on lock contention
in the event poll interface. The 'fio' RBD engine uses this poll
IO interface by default when available.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
|
|
|
|
|
|
|
| |
The ImageCtx parent-related data structures are now protected
by the image_lock.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
|
|
|
|
|
|
|
|
|
| |
This lock used to protect the IO pathway to prevent writes but
that is now handled by the io::ImageRequestWQ. Additional
historical uses have been temporarily moved to the
'ImageCtx::image_lock'
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
|
|
|
|
|
|
|
| |
This is the first step in consolidating multiple locks under a single
reader/writer lock for simplicity.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
|
|
|
|
|
|
| |
Add trash purge api calls and fix the docs of some other rbd trash functions
Signed-off-by: Theofilos Mouratidis <mtheofilos@gmail.com>
|
|
|
|
|
|
| |
This avoids the new v1: v2: prefixes.
Signed-off-by: Sage Weil <sage@redhat.com>
|
|
|
|
| |
Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
|
|
|
|
| |
Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
The get parent and list children methods now return a common
struct that includes the full pool details (including the
optional namespace). Additionally, a new image list method has
been added which includes both the name and id (of v2 images).
Fixes: http://tracker.ceph.com/issues/36650
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
|