| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Fixes: https://tracker.ceph.com/issues/64376
Signed-off-by: Mykola Golub <mykola.golub@clyso.com>
|
|
|
| |
Signed-off-by: HuangWei <huangwei.a180285@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Windows CLI arguments use either ANSI (main()) or UTF-16 (wmain()).
Meanwhile, Ceph libraries expect UTF-8 and raise exceptions when
trying to use Unicode CLI arguments or log Unicode output:
rbd.exe create test_unicode_șțăâ --size=32M
terminate called after throwing an instance of 'std::runtime_error'
what(): invalid utf8
We'll use a Windows application manifest, setting the "activeCodePage"
property [1][2]. This enables the Windows UCRT UTF-8 mode so that
functions that receive char* arguments will expect UTF-8 instead of ANSI,
including main(). One exception is CreateProcess, which will need the
UTF-16 form (CreateProcessW).
Despite the locale being set to utf-8, we'll have to explicitly set
the console output to utf-8 using SetConsoleOutputCP(CP_UTF8).
In order to use the UTF-8 locale, we'll have to switch the mingw-llvm
runtime from msvcrt to ucrt.
This also fixes ceph-dokan crashes that currently occur when non-ANSI
paths are logged.
[1] https://learn.microsoft.com/en-us/windows/win32/sbscs/application-manifests#activecodepage
[2] https://learn.microsoft.com/en-us/windows/apps/design/globalizing/use-utf8-code-page
Signed-off-by: Lucian Petrut <lpetrut@cloudbasesolutions.com>
|
|\
| |
| |
| |
| |
| | |
rbd: add support for new device type of ubbd
Reviewed-by: Mykola Golub <mykola.golub@clyso.com>
Reviewed-by: Ilya Dryomov <idryomov@gmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
ubbd (Userspace Backend Block Device) is a method to build block device
and handle IO by process started in userspace. That means we can provide
a generic block device to user and handle IO requests by librbd
in linux.
This way, we can allow user to use rbd image as a linux block device
supporting full image features, especial the journaling feature, which
is not supported by krbd.
For more information: https://github.com/DataTravelGuide/ubbd
Signed-off-by: Dongsheng Yang <dongsheng.yang.linux@gmail.com>
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* acquire
* are
* asynchronous
* attempt
* bootstrap
* concurrent
* consume
* couldn't
* cumulative
* disable
* disabling
* disaster
* disconnected
* endianness
* entries
* exclusive
* filesystem
* flag
* generic
* github
* image
* information
* initiating
* latency
* limitations
* metadata
* modify
* namespace
* noautoconsole
* ourselves
* prefetch
* propagate
* protection
* recorder
* recover
* release
* replicated
* reserved
* selection
* sentinel
* several
* snapshot
* source
* specifying
* suppress
* synchronize
* the
* transfer
* triggering
* unknown
* validation
* version
* visible
* write log entries
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
|
|
|
|
|
|
|
| |
If no --encryption-format specified at all, default to "luks" for each
specified --encryption-passphrase-file.
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
|
|
|
|
|
|
|
|
|
| |
Since RBD_ENCRYPTION_FORMAT_LUKS1, RBD_ENCRYPTION_FORMAT_LUKS2
and RBD_ENCRYPTION_FORMAT_LUKS aren't treated the same when loading
encryption anymore, "luks1" and "luks2" formats need to be accepted
in addition to "luks" format.
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
|
|
|
|
|
|
|
|
| |
"rbd encryption format" handler sets up a scope guard to zero out
the passphrase string on return but also makes a copy of same which
isn't zeroed out.
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
One of the stated goals is compatibility with standard LUKS tools,
in particular being able to load encryption on images formatted with
cryptsetup. cryptsetup doesn't do this and this really interferes
with randomly generated (binary) passphrases.
While at it, open passphrase files as binary -- it communicates the
intent if nothing else on POSIX.
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When encryption is loaded, rbd_get_size() and Image::size() return
"effective" size, but rbd_resize() and Image::resize() continue to take
raw size. The user has to constantly keep these domains in mind.
Saying that resize must be done without encryption loaded is not an
answer because shrinking a clone that has snapshots involves copying up
objects in the affected range (identical to flattening). In addition,
even if a clone doesn't have snapshots, shrinking it to a size that
isn't an object boundary is going to involve a copyup for the victim
object as well.
To avoid subtle data corruption on shrink, treat resize operation the
same as flatten operation (including on the CLI).
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
|
|
|
|
| |
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
|
|
|
|
| |
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
|
|\
| |
| |
| |
| |
| | |
librbd: add encryption format support for clones (part 1/2)
Reviewed-by: Mykola Golub <mgolub@suse.com>
Reviewed-by: Ilya Dryomov <idryomov@gmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This commit adds the encryption format support for cloned images via the RBD cli,
making the child image be encrypted with a key different from it parent,
while keeping the child thinly-provisioned.
Additionally, other APIs are extended to support flattening of such images.
Signed-off-by: Or Ozeri <oro@il.ibm.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Right now, rbd-wnbd doesn't actually use disk path
identifiers such as "/dev/*" or "\\.\PhysicalDrive*".
So instead of accepting two arguments that are basically
handled more or less the same, we're dropping the device_name
argument and sticking to the image spec.
Signed-off-by: Stefan Chivu <schivu@cloudbasesolutions.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
At the moment, there are multiple copies of "get_image_or_snap_spec".
For this reason, we're moving it to Utils.cc so that all backends may
re-use it, also benefiting from the recent pool related fix.
We are also renaming parse_options to append_options_as_args and
changing its type to void
Signed-off-by: Stefan Chivu <schivu@cloudbasesolutions.com>
|
| |
| |
| |
| |
| |
| |
| | |
When executing rbd device unmap, an explicit namespace optarg wasn't available
Fixes: https://tracker.ceph.com/issues/57765
Signed-off-by: Stefan Chivu <schivu@cloudbasesolutions.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- std::includes() requires sorted ranges but command specs aren't
sorted
- std::includes() purpose is to check whether the second range is
a subsequence of the first range but here the size of the second
range is always equal to the size of the first range, which means
that, had the ranges been sorted, std::includes() would have checked
straight equality
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The order in which objects with static storage duration in
different TUs are initialized is undefined. If the compiler
chooses to initialize Shell::Action objects in action/Trash.cc
before Shell::Action objects in action/TrashPurgeSchedule.cc,
all "rbd trash purge schedule ..." commands get shadowed by
"rbd trash purge" command:
$ rbd trash purge schedule list
rbd: too many arguments
The confusing error arises because "rbd trash purge" takes a single
positional argument. "schedule" gets interpreted as <pool-spec> and
"list" generates an error.
Fixes: https://tracker.ceph.com/issues/57107
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
|
|
|
|
| |
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
|
|
|
|
|
|
|
|
|
|
| |
Commit 96f05a7956b3 ("rbd: delay determination of default pool name")
broke "rbd perf image iostat" and "rbd perf image iotop" GLOBAL_POOL_KEY
support (the ability to blend all rbd pools together into a single
view).
Fixes: https://tracker.ceph.com/issues/56561
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
|
|
|
|
|
|
|
|
|
|
| |
Add a flush command so that users can manually flush cache.
[ idryomov: error messages, incorporate doc and help.t hunks, drop
do_persistent_cache_flush() ]
Signed-off-by: Yin Congmin <congmin.yin@intel.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Rename command image-cache to persistent-cache. Refactoring the code
of invalidate command.
[ idryomov: error message, incorporate doc and help.t hunks, drop
do_persistent_cache_invalidate() ]
Signed-off-by: Yin Congmin <congmin.yin@intel.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
|
|
|
|
|
|
|
|
|
|
| |
librbd "internal" metadata keys was change to ".rbd" prefix. Change
peristent cache to ".rbd" too.
And the name of persistent cache key is IMAGE_CACHE_STATE. Since
this key is planned to be used outside the pwl directory, it seems
more appropriate to change it to a clear name as PERSISTENT_CACHE_STATE.
Signed-off-by: Yin Congmin <congmin.yin@intel.com>
|
|
|
|
| |
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
|
|
|
|
| |
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
|
|
|
|
| |
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
|
|
|
|
|
| |
Fixes: https://tracker.ceph.com/issues/52850
Signed-off-by: Christopher Hoffman <choffman@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently at least five commands have optional positional arguments.
Overloading po::value<std::string>()->default_value("") for this
is a bit sneaky but nothing better fits into the existing Shell.cc
framework.
Note that strictly speaking "[<interval>] [<start-time>]" should be
"[<interval> [<start-time>]]" but we aren't doing that here because
"ceph" command doesn't do it either.
Fixes: https://tracker.ceph.com/issues/54191
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
|
|
|
|
|
| |
Fixes: https://tracker.ceph.com/issues/54063
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently this
$ rbd --all children img
doesn't work, while this
$ rbd children --all img
or this
$ rbd children img --all
does. The issue is that -a/--all isn't on the list of known switch
arguments. The "rbd children" example may seem contrived but for more
complicated commands such as "rbd device map" mixing switches and
positional arguments occurs naturally:
$ rbd device --device-type nbd --options try-netlink --show-cookie map img
Fixes: https://tracker.ceph.com/issues/53935
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
|
|\
| |
| |
| |
| |
| | |
rbd: when trash mv, show expiration time if it's not now
Reviewed-by: Deepika Upadhyay <dupadhya@redhat.com>
Reviewed-by: Sunny Kumar <sunkumar@redhat.com>
|
| |
| |
| |
| | |
Signed-off-by: haoyixing <haoyixing@kuaishou.com>
|
|\ \
| | |
| | |
| | |
| | | |
tools/rbd: make rbd info display dirty-cache feature
Reviewed-by: Deepika Upadhyay <dupadhya@redhat.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Rbd info cannot show dirty-cache feature when it
is enable. So complete ImageFeatures::FEATURE_MAPPING
to show the dirty-cache feature.
Signed-off-by: Feng Hualong <hualong.feng@intel.com>
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| | |
Correct the size of `protection` field. This bug is harmless since Export/Import writes/reads
one byte for `protected` field regardless of `length` field. So the current wrong diff works
correctly by chance
Fixes: https://tracker.ceph.com/issues/53243
Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Allow user to specify cookie of choice at the time of map
$ rbd device attach rbd-pool/image --device /dev/nbd0 \
--cookie 6f85d970-10b2-456b-8baf-676aa4d782e4 --options try-netlink
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
|
|/
|
|
|
|
|
|
|
|
|
|
| |
Example:
$ rbd device map rbd-pool/image --show-cookie --try-netlink --device-type nbd
$ rbd device attach rbd-pool/image --device /dev/nbd0 \
--cookie 6f85d970-10b2-456b-8baf-676aa4d782e4 --device-type nbd
older Kernel versions can use --force to skip the cookie validation
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
|
|\
| |
| |
| |
| |
| |
| |
| | |
common: modify 'main()s' to use new argv_to_vec() signature
Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
Reviewed-by: Deepika Upadhyay <dupadhya@redhat.com>
|
| |
| |
| |
| |
| |
| |
| | |
A followup to PR #42820 that modified argv_to_vec() signature
(for style and performance).
Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
|
|/
|
|
|
|
|
|
|
| |
When doing rbd bench, we record done ios to print progress, current it's unsigned.
Suppose we do a bench of io-size 512B and io-total 4T, that means a total number of
8G ios which causes an overflow.
And we don't support io-size greater than 4G, so change help message.
Signed-off-by: haoyixing <haoyixing@kuaishou.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>
|
|
|
|
|
|
|
|
|
|
|
|
| |
replace strict_iecstrtoll(const char *str,..) with
strict_iecstrtoll(std::string_view, ..). which is more convenient.
and both of them share the same implementation:
strict_iec_cast<uint64_t>(str, err);
so they are interchangeable.
Signed-off-by: Kefu Chai <kchai@redhat.com>
|
|
|
|
|
|
|
| |
After commit 0e8aa956a3b6 ("rbd: switch thick-provision image creation
to use new write_zeroes API") it is no longer necessary.
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
|
|\
| |
| |
| |
| | |
librbd: don't stop at the first unremovable image when purging
Reviewed-by: Mykola Golub <mgolub@suse.com>
|
| |
| |
| |
| |
| |
| |
| | |
Output to stderr instead of the log where regular users wouldn't see
it given the elevated log level.
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
|
| |
| |
| |
| |
| |
| | |
Exit with respective status like other commands do.
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
I found that the difference between "rbd cp" and "rbd deep cp",
i.e. what "deep" means in this context, is documented only in
the mailing list archive and in the Mimic reelase notes.
Let's make the difference explicit in the manpage and in rbd --help.
Signed-off-by: Jan "Yenya" Kasprzak <kas@fi.muni.cz>
|
| |
| |
| |
| | |
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
|