- map->choose_tries is not in the kernel
- 64-bit/64-bit in the kernel needs a special helper for 32-bit
architectures, crush_compat.h provides a stub
- INT64_MIN is not in the kernel, crush_compat.h provides S64_MIN
- use dprintk inside DEBUG_INDEP sections
No functional changes.
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Move all the cruft that is necessary to compile shared files both in
kernel and userspace into a new crush_compat.h. Also add a stub for
div64_s64() and limits for linux fixed width types.
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
This reverts mapper.c hunks of 830752a528 ("doc: fix doxygen
warnings"). It is shared with the kernel and uses kernel-doc for
in-code documentation. If doxygen warnings are an issue, we should
probably just exclude the 7 shared files in Doxyfile - we don't have
@file in these files or EXTRACT_ALL/EXTRACT_STATIC in Doxyfile, which
means these files are essentially skipped as there is no C++ stuff in
them.
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Fix some recently introduced style issues in crush_ln_table.h,
crush.[ch], hash.[ch], and mapper.[ch]. These files are shared with
the kernel, so we need to at least not introduce anything new -
checkpatch is pretty unhappy as it is.
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Given that crush_{addition,multiplication}_is_unsafe() are only used
for compiling maps, they have no business in crush.c which is shared
with the kernel.
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
1. get_keys obtain header lock of oid
2. get iterator with get_iterator(oid), in get_iterator, it also want to get header lock of oid
Signed-off-by: xinxin shu <xinxin.shu@intel.com>
tools: improve the performance of rados and rest_bench
Don't delete, recreate and re-fill buffers in rados bench. Fixes the high CPU usage by rados bench on fast SSDs
and ramdisks/memstore.
Reviewed-by: Loic Dachary <ldachary@redhat.com>
VirtualBox has some files with weird
permissions in its /usr/lib, which was
tripping up this usually-safe operation
when run as an unprivileged user.
Fixes: #11959
Signed-off-by: John Spray <john.spray@redhat.com>
PGMonitor::map_pg_creates() is the only caller that passes sumonly=true,
which is necessary to avoid modifying creating_pgs while it is iterating
over it. However, everything else we *do* want to update--especially the
osd counts.
Rename the arg and skip only the creating bit.
Signed-off-by: Sage Weil <sage@redhat.com>
...for the case where someone exports a pool
with "rados export" and then tries to import
it into a PG.
Signed-off-by: John Spray <john.spray@redhat.com>
Same functionality now exposed as "rados import".
This removes objectstoretool's librados dependency.
Signed-off-by: John Spray <john.spray@redhat.com>
This is the code that used to sit behind the
old import/export commands that have been
disabled for some time.
Replaced by the new import/export commands.
Signed-off-by: John Spray <john.spray@redhat.com>
New PoolDump (export) class to dump pool contents
in format compatible with ceph-objectstore-tool,
and wire up RadosImport class (import).
Signed-off-by: John Spray <john.spray@redhat.com>
We use negative error codes everywhere else, should
use them here too. Also add a couple of strategically
placed prints.
Signed-off-by: John Spray <john.spray@redhat.com>
...to expose the definitions of the object dump
format (RadosDump) for use in rados import/export.
The serialized->RADOS code is now RadosImport, and
the serialized->ObjectStore code is ObjectStoreTool.
This is a step toward #9964, which should use the
same on serialization format as the existing
objectstore-tool dumps.
Signed-off-by: John Spray <john.spray@redhat.com>