Commit d211a934 authored by Vladimir Bashkirtsev's avatar Vladimir Bashkirtsev

Updated ceph to 15.2.15

parent aa54b94e
...@@ -22,7 +22,7 @@ all: ceph-config ceph-sudoer ...@@ -22,7 +22,7 @@ all: ceph-config ceph-sudoer
mv -v /etc/gshadow /data/etc/gshadow mv -v /etc/gshadow /data/etc/gshadow
ln -sv /data/etc/gshadow /etc/gshadow ln -sv /data/etc/gshadow /etc/gshadow
dd if=/dev/zero of=swap bs=1048576 count=9216 dd if=/dev/zero of=swap bs=1048576 count=10240
chmod 600 swap chmod 600 swap
mkswap swap mkswap swap
swapon swap swapon swap
...@@ -30,29 +30,26 @@ all: ceph-config ceph-sudoer ...@@ -30,29 +30,26 @@ all: ceph-config ceph-sudoer
mount --bind tmp /tmp mount --bind tmp /tmp
ln -s /lib /lib64 ln -s /lib /lib64
tar xf ceph-15.2.4.tar.gz tar xf ceph-15.2.15.tar.gz
patch -Np1 -d ceph-15.2.4 < ceph-15.2.4-fix_v2_frame.patch patch -Np1 -d ceph-15.2.15 < ceph-15.2.15-fix_v2_frame.patch
patch -Np1 -d ceph-15.2.4 < ceph-15.2.4-fix_cpu_detection.patch patch -Np1 -d ceph-15.2.15 < ceph-15.2.15-fix_cpu_detection.patch
patch -Np1 -d ceph-15.2.4 < ceph-15.2.4-fix_tests.patch patch -Np1 -d ceph-15.2.15 < ceph-15.2.15-fix_tests.patch
patch -Np1 -d ceph-15.2.4 < ceph-15.2.4-fix_ceph-volume_systemd_unit.patch patch -Np1 -d ceph-15.2.15 < ceph-15.2.15-fix_ceph-volume_systemd_unit.patch
patch -Np1 -d ceph-15.2.4 < ceph-15.2.4-no_git.patch patch -Np1 -d ceph-15.2.15 < ceph-15.2.15-no_git.patch
patch -Np1 -d ceph-15.2.4 < ceph-15.2.4-fix_librbd_duplicate.patch patch -Np1 -d ceph-15.2.15 < ceph-15.2.15-fix_librbd_duplicate.patch
patch -Np1 -d ceph-15.2.4 < ceph-15.2.4-fix_ErasureCodeShec.patch patch -Np1 -d ceph-15.2.15 < ceph-15.2.15-fix_ErasureCodeShec.patch
patch -Np1 -d ceph-15.2.4 < ceph-15.2.4-fix_ceph_thread_timeout.patch patch -Np1 -d ceph-15.2.15 < ceph-15.2.15-fix_mypy.patch
patch -Np1 -d ceph-15.2.4 < ceph-15.2.4-fix_cram.patch
patch -Np1 -d ceph-15.2.4 < ceph-15.2.4-fix_mypy.patch
cp cram-0.5.0.post20110114.tar.gz ceph-15.2.4/src/test/downloads
if [ `uname -m` = 'armv7l' ] ; then \ if [ `uname -m` = 'armv7l' ] ; then \
patch -Np1 -d ceph-15.2.4 < ceph-15.2.4-arm32_fix.patch ; \ patch -Np1 -d ceph-15.2.15 < ceph-15.2.15-arm32_fix.patch ; \
patch -Np1 -d ceph-15.2.4 < ceph-15.2.4-arm32_fix_tests.patch ; \ patch -Np1 -d ceph-15.2.15 < ceph-15.2.15-arm32_fix_tests.patch ; \
fi fi
cd ceph-15.2.4 && ./do_cmake.sh -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_SYSCONFDIR=/etc -DCMAKE_INSTALL_LIBEXECDIR=/lib -DWITH_SPDK=OFF -DWITH_RDMA=OFF -DWITH_RADOSGW_AMQP_ENDPOINT=OFF -DWITH_PYTHON2=OFF -DWITH_PYTHON3=ON -DALLOCATOR=tcmalloc_minimal cd ceph-15.2.15 && ./do_cmake.sh -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_SYSCONFDIR=/etc -DCMAKE_INSTALL_LIBEXECDIR=/lib -DWITH_SPDK=OFF -DWITH_RDMA=OFF -DWITH_RADOSGW_AMQP_ENDPOINT=OFF -DWITH_PYTHON2=OFF -DWITH_PYTHON3=ON -DALLOCATOR=tcmalloc_minimal
$(MAKE) -C ceph-15.2.4/build npm_config_cache=/build/.npm NODE_OPTIONS="--max-old-space-size=3072" $(MAKE) -C ceph-15.2.15/build npm_config_cache=/build/.npm NODE_OPTIONS="--max-old-space-size=3072"
hostname localhost hostname localhost
cd ceph-15.2.4 && tar xf ../ceph-object-corpus.tar.xz cd ceph-15.2.15 && tar xf ../ceph-object-corpus.tar.xz
cd ceph-15.2.4/build && CTEST_OUTPUT_ON_FAILURE=1 NODE_OPTIONS="--max-old-space-size=3072" VIRTUALENV_SYSTEM_SITE_PACKAGES=True SETUPTOOLS_USE_DISTUTILS=stdlib make check cd ceph-15.2.15/build && CTEST_OUTPUT_ON_FAILURE=1 NODE_OPTIONS="--max-old-space-size=3072" VIRTUALENV_SYSTEM_SITE_PACKAGES=True SETUPTOOLS_USE_DISTUTILS=stdlib make check
$(MAKE) -C ceph-15.2.4/build install $(MAKE) -C ceph-15.2.15/build install
rm /usr/bin/ceph_test* rm /usr/bin/ceph_test*
find / -name *.pyc -exec rm -f '{}' ';' find / -name *.pyc -exec rm -f '{}' ';'
find / -name *.js.map -exec rm -f '{}' ';' find / -name *.js.map -exec rm -f '{}' ';'
...@@ -99,7 +96,7 @@ all: ceph-config ceph-sudoer ...@@ -99,7 +96,7 @@ all: ceph-config ceph-sudoer
swapoff swap swapoff swap
rm -rf swap rm -rf swap
rm -rf ceph-15.2.4 rm -rf ceph-15.2.15
ceph-config: ceph-config:
define CEPH_CONFIG define CEPH_CONFIG
......
diff -uNr ceph-15.2.4/src/client/Client.cc ceph-15.2.4-arm32_fix/src/client/Client.cc diff -uNr ceph-15.2.15/src/client/Client.cc ceph-15.2.15-arm32_fix/src/client/Client.cc
--- ceph-15.2.4/src/client/Client.cc 2020-07-01 01:10:51.000000000 +0930 --- ceph-15.2.15/src/client/Client.cc 2021-10-21 00:49:57.000000000 +1030
+++ ceph-15.2.4-arm32_fix/src/client/Client.cc 2020-11-21 22:11:16.061796876 +1030 +++ ceph-15.2.15-arm32_fix/src/client/Client.cc 2022-01-19 15:17:16.401800360 +1030
@@ -10948,7 +10948,7 @@ @@ -11059,7 +11059,7 @@
ldout(cct, 20) << __func__ << " " << in << " " << in->ino << " -> " << in->ll_ref << dendl; ldout(cct, 20) << __func__ << " " << in << " " << in->ino << " -> " << in->ll_ref << dendl;
} }
...@@ -10,7 +10,7 @@ diff -uNr ceph-15.2.4/src/client/Client.cc ceph-15.2.4-arm32_fix/src/client/Clie ...@@ -10,7 +10,7 @@ diff -uNr ceph-15.2.4/src/client/Client.cc ceph-15.2.4-arm32_fix/src/client/Clie
{ {
in->ll_put(num); in->ll_put(num);
ldout(cct, 20) << __func__ << " " << in << " " << in->ino << " " << num << " -> " << in->ll_ref << dendl; ldout(cct, 20) << __func__ << " " << in << " " << in->ino << " " << num << " -> " << in->ll_ref << dendl;
@@ -10989,7 +10989,7 @@ @@ -11100,7 +11100,7 @@
} }
} }
...@@ -19,7 +19,7 @@ diff -uNr ceph-15.2.4/src/client/Client.cc ceph-15.2.4-arm32_fix/src/client/Clie ...@@ -19,7 +19,7 @@ diff -uNr ceph-15.2.4/src/client/Client.cc ceph-15.2.4-arm32_fix/src/client/Clie
{ {
inodeno_t ino = in->ino; inodeno_t ino = in->ino;
@@ -11018,7 +11018,7 @@ @@ -11129,7 +11129,7 @@
return last; return last;
} }
...@@ -28,10 +28,10 @@ diff -uNr ceph-15.2.4/src/client/Client.cc ceph-15.2.4-arm32_fix/src/client/Clie ...@@ -28,10 +28,10 @@ diff -uNr ceph-15.2.4/src/client/Client.cc ceph-15.2.4-arm32_fix/src/client/Clie
{ {
std::lock_guard lock(client_lock); std::lock_guard lock(client_lock);
return _ll_forget(in, count); return _ll_forget(in, count);
diff -uNr ceph-15.2.4/src/client/Client.h ceph-15.2.4-arm32_fix/src/client/Client.h diff -uNr ceph-15.2.15/src/client/Client.h ceph-15.2.15-arm32_fix/src/client/Client.h
--- ceph-15.2.4/src/client/Client.h 2020-07-01 01:10:51.000000000 +0930 --- ceph-15.2.15/src/client/Client.h 2021-10-21 00:49:57.000000000 +1030
+++ ceph-15.2.4-arm32_fix/src/client/Client.h 2020-11-21 22:11:16.063796882 +1030 +++ ceph-15.2.15-arm32_fix/src/client/Client.h 2022-01-19 15:19:18.126188954 +1030
@@ -482,7 +482,7 @@ @@ -484,7 +484,7 @@
int ll_lookupx(Inode *parent, const char *name, Inode **out, int ll_lookupx(Inode *parent, const char *name, Inode **out,
struct ceph_statx *stx, unsigned want, unsigned flags, struct ceph_statx *stx, unsigned want, unsigned flags,
const UserPerm& perms); const UserPerm& perms);
...@@ -40,7 +40,7 @@ diff -uNr ceph-15.2.4/src/client/Client.h ceph-15.2.4-arm32_fix/src/client/Clien ...@@ -40,7 +40,7 @@ diff -uNr ceph-15.2.4/src/client/Client.h ceph-15.2.4-arm32_fix/src/client/Clien
bool ll_put(Inode *in); bool ll_put(Inode *in);
int ll_get_snap_ref(snapid_t snap); int ll_get_snap_ref(snapid_t snap);
@@ -1028,7 +1028,7 @@ @@ -1032,7 +1032,7 @@
void _fragmap_remove_stopped_mds(Inode *in, mds_rank_t mds); void _fragmap_remove_stopped_mds(Inode *in, mds_rank_t mds);
void _ll_get(Inode *in); void _ll_get(Inode *in);
...@@ -49,19 +49,19 @@ diff -uNr ceph-15.2.4/src/client/Client.h ceph-15.2.4-arm32_fix/src/client/Clien ...@@ -49,19 +49,19 @@ diff -uNr ceph-15.2.4/src/client/Client.h ceph-15.2.4-arm32_fix/src/client/Clien
void _ll_drop_pins(); void _ll_drop_pins();
Fh *_create_fh(Inode *in, int flags, int cmode, const UserPerm& perms); Fh *_create_fh(Inode *in, int flags, int cmode, const UserPerm& perms);
@@ -1179,7 +1179,7 @@ @@ -1186,7 +1186,7 @@
int _lookup_parent(Inode *in, const UserPerm& perms, Inode **parent=NULL); int _lookup_parent(Inode *in, const UserPerm& perms, Inode **parent=NULL);
int _lookup_name(Inode *in, Inode *parent, const UserPerm& perms); int _lookup_name(Inode *in, Inode *parent, const UserPerm& perms);
int _lookup_ino(inodeno_t ino, const UserPerm& perms, Inode **inode=NULL); int _lookup_vino(vinodeno_t ino, const UserPerm& perms, Inode **inode=NULL);
- bool _ll_forget(Inode *in, uint64_t count); - bool _ll_forget(Inode *in, uint64_t count);
+ bool _ll_forget(Inode *in, size_t count); + bool _ll_forget(Inode *in, size_t count);
uint32_t deleg_timeout = 0; uint32_t deleg_timeout = 0;
diff -uNr ceph-15.2.4/src/client/fuse_ll.cc ceph-15.2.4-arm32_fix/src/client/fuse_ll.cc diff -uNr ceph-15.2.15/src/client/fuse_ll.cc ceph-15.2.15-arm32_fix/src/client/fuse_ll.cc
--- ceph-15.2.4/src/client/fuse_ll.cc 2020-07-01 01:10:51.000000000 +0930 --- ceph-15.2.15/src/client/fuse_ll.cc 2021-10-21 00:49:57.000000000 +1030
+++ ceph-15.2.4-arm32_fix/src/client/fuse_ll.cc 2020-11-21 22:11:16.064796886 +1030 +++ ceph-15.2.15-arm32_fix/src/client/fuse_ll.cc 2022-01-19 15:17:16.401800360 +1030
@@ -191,7 +191,7 @@ @@ -192,7 +192,7 @@
} }
static void fuse_ll_forget(fuse_req_t req, fuse_ino_t ino, static void fuse_ll_forget(fuse_req_t req, fuse_ino_t ino,
...@@ -70,9 +70,9 @@ diff -uNr ceph-15.2.4/src/client/fuse_ll.cc ceph-15.2.4-arm32_fix/src/client/fus ...@@ -70,9 +70,9 @@ diff -uNr ceph-15.2.4/src/client/fuse_ll.cc ceph-15.2.4-arm32_fix/src/client/fus
{ {
CephFuse::Handle *cfuse = fuse_ll_req_prepare(req); CephFuse::Handle *cfuse = fuse_ll_req_prepare(req);
cfuse->client->ll_forget(cfuse->iget(ino), nlookup+1); cfuse->client->ll_forget(cfuse->iget(ino), nlookup+1);
diff -uNr ceph-15.2.4/src/common/options.h ceph-15.2.4-arm32_fix/src/common/options.h diff -uNr ceph-15.2.15/src/common/options.h ceph-15.2.15-arm32_fix/src/common/options.h
--- ceph-15.2.4/src/common/options.h 2020-07-01 01:10:51.000000000 +0930 --- ceph-15.2.15/src/common/options.h 2021-10-21 00:49:57.000000000 +1030
+++ ceph-15.2.4-arm32_fix/src/common/options.h 2020-11-21 22:12:48.805115681 +1030 +++ ceph-15.2.15-arm32_fix/src/common/options.h 2022-01-19 15:17:16.402800363 +1030
@@ -35,7 +35,7 @@ @@ -35,7 +35,7 @@
case TYPE_ADDR: return "entity_addr_t"; case TYPE_ADDR: return "entity_addr_t";
case TYPE_ADDRVEC: return "entity_addrvec_t"; case TYPE_ADDRVEC: return "entity_addrvec_t";
...@@ -100,9 +100,9 @@ diff -uNr ceph-15.2.4/src/common/options.h ceph-15.2.4-arm32_fix/src/common/opti ...@@ -100,9 +100,9 @@ diff -uNr ceph-15.2.4/src/common/options.h ceph-15.2.4-arm32_fix/src/common/opti
case TYPE_SECS: case TYPE_SECS:
v = std::chrono::seconds{new_value}; break; v = std::chrono::seconds{new_value}; break;
default: default:
diff -uNr ceph-15.2.4/src/mds/PurgeQueue.h ceph-15.2.4-arm32_fix/src/mds/PurgeQueue.h diff -uNr ceph-15.2.15/src/mds/PurgeQueue.h ceph-15.2.15-arm32_fix/src/mds/PurgeQueue.h
--- ceph-15.2.4/src/mds/PurgeQueue.h 2020-07-01 01:10:51.000000000 +0930 --- ceph-15.2.15/src/mds/PurgeQueue.h 2021-10-21 00:49:57.000000000 +1030
+++ ceph-15.2.4-arm32_fix/src/mds/PurgeQueue.h 2020-11-21 22:11:16.065796889 +1030 +++ ceph-15.2.15-arm32_fix/src/mds/PurgeQueue.h 2022-01-19 15:17:16.402800363 +1030
@@ -219,6 +219,6 @@ @@ -219,6 +219,6 @@
size_t purge_item_journal_size; size_t purge_item_journal_size;
...@@ -111,10 +111,10 @@ diff -uNr ceph-15.2.4/src/mds/PurgeQueue.h ceph-15.2.4-arm32_fix/src/mds/PurgeQu ...@@ -111,10 +111,10 @@ diff -uNr ceph-15.2.4/src/mds/PurgeQueue.h ceph-15.2.4-arm32_fix/src/mds/PurgeQu
+ size_t files_high_water = 0; + size_t files_high_water = 0;
}; };
#endif #endif
diff -uNr ceph-15.2.4/src/pybind/mgr/cephadm/module.py ceph-15.2.4-arm32_fix/src/pybind/mgr/cephadm/module.py diff -uNr ceph-15.2.15/src/pybind/mgr/cephadm/module.py ceph-15.2.15-arm32_fix/src/pybind/mgr/cephadm/module.py
--- ceph-15.2.4/src/pybind/mgr/cephadm/module.py 2020-07-01 01:10:51.000000000 +0930 --- ceph-15.2.15/src/pybind/mgr/cephadm/module.py 2021-10-21 00:49:57.000000000 +1030
+++ ceph-15.2.4-arm32_fix/src/pybind/mgr/cephadm/module.py 2020-11-24 13:47:15.048603596 +1030 +++ ceph-15.2.15-arm32_fix/src/pybind/mgr/cephadm/module.py 2022-01-19 15:17:16.402800363 +1030
@@ -284,7 +284,7 @@ @@ -342,7 +342,7 @@
raise RuntimeError("unable to read cephadm at '%s': %s" % ( raise RuntimeError("unable to read cephadm at '%s': %s" % (
path, str(e))) path, str(e)))
...@@ -123,20 +123,20 @@ diff -uNr ceph-15.2.4/src/pybind/mgr/cephadm/module.py ceph-15.2.4-arm32_fix/src ...@@ -123,20 +123,20 @@ diff -uNr ceph-15.2.4/src/pybind/mgr/cephadm/module.py ceph-15.2.4-arm32_fix/src
self._reconfig_ssh() self._reconfig_ssh()
diff -uNr ceph-15.2.4/src/pybind/mgr/dashboard/frontend/package.json ceph-15.2.4-arm32_fix/src/pybind/mgr/dashboard/frontend/package.json diff -uNr ceph-15.2.15/src/pybind/mgr/dashboard/frontend/package.json ceph-15.2.15-arm32_fix/src/pybind/mgr/dashboard/frontend/package.json
--- ceph-15.2.4/src/pybind/mgr/dashboard/frontend/package.json 2020-07-01 01:10:51.000000000 +0930 --- ceph-15.2.15/src/pybind/mgr/dashboard/frontend/package.json 2021-10-21 00:49:57.000000000 +1030
+++ ceph-15.2.4-arm32_fix/src/pybind/mgr/dashboard/frontend/package.json 2020-11-21 22:11:16.065796889 +1030 +++ ceph-15.2.15-arm32_fix/src/pybind/mgr/dashboard/frontend/package.json 2022-01-19 15:17:16.402800363 +1030
@@ -122,7 +122,6 @@ @@ -121,7 +121,6 @@
"@types/node": "12.12.34", "@types/node": "12.12.34",
"@types/simplebar": "5.1.1", "@types/simplebar": "5.1.1",
"codelyzer": "5.2.2", "codelyzer": "5.2.2",
- "cypress": "4.4.0", - "cypress": "4.4.0",
"html-linter": "1.1.1", "html-linter": "1.1.1",
"htmllint-cli": "0.0.7", "htmllint-cli": "0.0.7",
"jest": "25.2.4", "jest": "25.5.4",
diff -uNr ceph-15.2.4/src/test/common/test_json_formattable.cc ceph-15.2.4-arm32_fix/src/test/common/test_json_formattable.cc diff -uNr ceph-15.2.15/src/test/common/test_json_formattable.cc ceph-15.2.15-arm32_fix/src/test/common/test_json_formattable.cc
--- ceph-15.2.4/src/test/common/test_json_formattable.cc 2020-07-01 01:10:51.000000000 +0930 --- ceph-15.2.15/src/test/common/test_json_formattable.cc 2021-10-21 00:49:57.000000000 +1030
+++ ceph-15.2.4-arm32_fix/src/test/common/test_json_formattable.cc 2020-11-21 22:11:16.065796889 +1030 +++ ceph-15.2.15-arm32_fix/src/test/common/test_json_formattable.cc 2022-01-19 15:17:16.402800363 +1030
@@ -371,7 +371,7 @@ @@ -371,7 +371,7 @@
struct2() { struct2() {
...@@ -146,9 +146,9 @@ diff -uNr ceph-15.2.4/src/test/common/test_json_formattable.cc ceph-15.2.4-arm32 ...@@ -146,9 +146,9 @@ diff -uNr ceph-15.2.4/src/test/common/test_json_formattable.cc ceph-15.2.4-arm32
v.resize((i >> 16) % 16 + 1); v.resize((i >> 16) % 16 + 1);
} }
diff -uNr ceph-15.2.4/src/test/libcephfs/ceph_pthread_self.h ceph-15.2.4-arm32_fix/src/test/libcephfs/ceph_pthread_self.h diff -uNr ceph-15.2.15/src/test/libcephfs/ceph_pthread_self.h ceph-15.2.15-arm32_fix/src/test/libcephfs/ceph_pthread_self.h
--- ceph-15.2.4/src/test/libcephfs/ceph_pthread_self.h 2020-07-01 01:10:51.000000000 +0930 --- ceph-15.2.15/src/test/libcephfs/ceph_pthread_self.h 2021-10-21 00:49:57.000000000 +1030
+++ ceph-15.2.4-arm32_fix/src/test/libcephfs/ceph_pthread_self.h 2020-11-21 22:11:16.066796893 +1030 +++ ceph-15.2.15-arm32_fix/src/test/libcephfs/ceph_pthread_self.h 2022-01-19 15:17:16.403800366 +1030
@@ -25,7 +25,7 @@ @@ -25,7 +25,7 @@
static_assert(std::is_convertible_v<decltype(me), uint64_t> || static_assert(std::is_convertible_v<decltype(me), uint64_t> ||
std::is_pointer_v<decltype(me)>, std::is_pointer_v<decltype(me)>,
...@@ -158,9 +158,9 @@ diff -uNr ceph-15.2.4/src/test/libcephfs/ceph_pthread_self.h ceph-15.2.4-arm32_f ...@@ -158,9 +158,9 @@ diff -uNr ceph-15.2.4/src/test/libcephfs/ceph_pthread_self.h ceph-15.2.4-arm32_f
} }
#endif #endif
diff -uNr ceph-15.2.4/src/test/rbd_mirror/image_deleter/test_mock_TrashWatcher.cc ceph-15.2.4-arm32_fix/src/test/rbd_mirror/image_deleter/test_mock_TrashWatcher.cc diff -uNr ceph-15.2.15/src/test/rbd_mirror/image_deleter/test_mock_TrashWatcher.cc ceph-15.2.15-arm32_fix/src/test/rbd_mirror/image_deleter/test_mock_TrashWatcher.cc
--- ceph-15.2.4/src/test/rbd_mirror/image_deleter/test_mock_TrashWatcher.cc 2020-07-01 01:10:51.000000000 +0930 --- ceph-15.2.15/src/test/rbd_mirror/image_deleter/test_mock_TrashWatcher.cc 2021-10-21 00:49:57.000000000 +1030
+++ ceph-15.2.4-arm32_fix/src/test/rbd_mirror/image_deleter/test_mock_TrashWatcher.cc 2020-11-21 22:11:16.066796893 +1030 +++ ceph-15.2.15-arm32_fix/src/test/rbd_mirror/image_deleter/test_mock_TrashWatcher.cc 2022-01-19 15:17:16.403800366 +1030
@@ -162,7 +162,7 @@ @@ -162,7 +162,7 @@
int r) { int r) {
bufferlist bl; bufferlist bl;
...@@ -170,10 +170,10 @@ diff -uNr ceph-15.2.4/src/test/rbd_mirror/image_deleter/test_mock_TrashWatcher.c ...@@ -170,10 +170,10 @@ diff -uNr ceph-15.2.4/src/test/rbd_mirror/image_deleter/test_mock_TrashWatcher.c
bufferlist out_bl; bufferlist out_bl;
encode(images, out_bl); encode(images, out_bl);
diff -uNr ceph-15.2.4/src/tools/rbd_mirror/image_replayer/snapshot/Replayer.cc ceph-15.2.4-arm32_fix/src/tools/rbd_mirror/image_replayer/snapshot/Replayer.cc diff -uNr ceph-15.2.15/src/tools/rbd_mirror/image_replayer/snapshot/Replayer.cc ceph-15.2.15-arm32_fix/src/tools/rbd_mirror/image_replayer/snapshot/Replayer.cc
--- ceph-15.2.4/src/tools/rbd_mirror/image_replayer/snapshot/Replayer.cc 2020-07-01 01:10:51.000000000 +0930 --- ceph-15.2.15/src/tools/rbd_mirror/image_replayer/snapshot/Replayer.cc 2021-10-21 00:49:57.000000000 +1030
+++ ceph-15.2.4-arm32_fix/src/tools/rbd_mirror/image_replayer/snapshot/Replayer.cc 2020-11-21 22:11:16.066796893 +1030 +++ ceph-15.2.15-arm32_fix/src/tools/rbd_mirror/image_replayer/snapshot/Replayer.cc 2022-01-19 15:17:16.403800366 +1030
@@ -234,7 +234,7 @@ @@ -253,7 +253,7 @@
json_spirit::mObject root_obj; json_spirit::mObject root_obj;
root_obj["replay_state"] = replay_state; root_obj["replay_state"] = replay_state;
...@@ -182,7 +182,7 @@ diff -uNr ceph-15.2.4/src/tools/rbd_mirror/image_replayer/snapshot/Replayer.cc c ...@@ -182,7 +182,7 @@ diff -uNr ceph-15.2.4/src/tools/rbd_mirror/image_replayer/snapshot/Replayer.cc c
auto matching_remote_snap_id = util::compute_remote_snap_id( auto matching_remote_snap_id = util::compute_remote_snap_id(
m_state_builder->local_image_ctx->image_lock, m_state_builder->local_image_ctx->image_lock,
@@ -249,7 +249,7 @@ @@ -268,7 +268,7 @@
// the local snapshot would just be the time the snapshot was // the local snapshot would just be the time the snapshot was
// synced and not the consistency point in time. // synced and not the consistency point in time.
root_obj["local_snapshot_timestamp"] = root_obj["local_snapshot_timestamp"] =
...@@ -191,7 +191,7 @@ diff -uNr ceph-15.2.4/src/tools/rbd_mirror/image_replayer/snapshot/Replayer.cc c ...@@ -191,7 +191,7 @@ diff -uNr ceph-15.2.4/src/tools/rbd_mirror/image_replayer/snapshot/Replayer.cc c
} }
matching_remote_snap_it = m_state_builder->remote_image_ctx->snap_info.find( matching_remote_snap_it = m_state_builder->remote_image_ctx->snap_info.find(
@@ -257,7 +257,7 @@ @@ -276,7 +276,7 @@
if (m_remote_snap_id_end != CEPH_NOSNAP && if (m_remote_snap_id_end != CEPH_NOSNAP &&
matching_remote_snap_it != matching_remote_snap_it !=
m_state_builder->remote_image_ctx->snap_info.end()) { m_state_builder->remote_image_ctx->snap_info.end()) {
......
diff -uNr ceph-15.2.4/src/test/librados_test_stub/TestIoCtxImpl.h ceph-15.2.4-arm32_fix_tests/src/test/librados_test_stub/TestIoCtxImpl.h diff -uNr ceph-15.2.15/src/test/librados_test_stub/TestIoCtxImpl.h ceph-15.2.15-arm32_fix_tests/src/test/librados_test_stub/TestIoCtxImpl.h
--- ceph-15.2.4/src/test/librados_test_stub/TestIoCtxImpl.h 2020-07-01 01:10:51.000000000 +0930 --- ceph-15.2.15/src/test/librados_test_stub/TestIoCtxImpl.h 2021-10-21 00:49:57.000000000 +1030
+++ ceph-15.2.4-arm32_fix_tests/src/test/librados_test_stub/TestIoCtxImpl.h 2021-01-04 13:34:04.620220180 +1030 +++ ceph-15.2.15-arm32_fix_tests/src/test/librados_test_stub/TestIoCtxImpl.h 2022-01-19 15:42:45.769681530 +1030
@@ -197,6 +197,9 @@ @@ -197,6 +197,9 @@
}; };
...@@ -11,9 +11,9 @@ diff -uNr ceph-15.2.4/src/test/librados_test_stub/TestIoCtxImpl.h ceph-15.2.4-ar ...@@ -11,9 +11,9 @@ diff -uNr ceph-15.2.4/src/test/librados_test_stub/TestIoCtxImpl.h ceph-15.2.4-ar
int64_t m_pool_id = 0; int64_t m_pool_id = 0;
std::string m_pool_name; std::string m_pool_name;
std::string m_namespace_name; std::string m_namespace_name;
diff -uNr ceph-15.2.4/src/test/librbd/CMakeLists.txt ceph-15.2.4-arm32_fix_tests/src/test/librbd/CMakeLists.txt diff -uNr ceph-15.2.15/src/test/librbd/CMakeLists.txt ceph-15.2.15-arm32_fix_tests/src/test/librbd/CMakeLists.txt
--- ceph-15.2.4/src/test/librbd/CMakeLists.txt 2020-07-01 01:10:51.000000000 +0930 --- ceph-15.2.15/src/test/librbd/CMakeLists.txt 2021-10-21 00:49:57.000000000 +1030
+++ ceph-15.2.4-arm32_fix_tests/src/test/librbd/CMakeLists.txt 2021-01-04 13:35:20.848449585 +1030 +++ ceph-15.2.15-arm32_fix_tests/src/test/librbd/CMakeLists.txt 2022-01-19 15:42:45.769681530 +1030
@@ -15,6 +15,7 @@ @@ -15,6 +15,7 @@
test_DeepCopy.cc test_DeepCopy.cc
test_Groups.cc test_Groups.cc
...@@ -22,9 +22,9 @@ diff -uNr ceph-15.2.4/src/test/librbd/CMakeLists.txt ceph-15.2.4-arm32_fix_tests ...@@ -22,9 +22,9 @@ diff -uNr ceph-15.2.4/src/test/librbd/CMakeLists.txt ceph-15.2.4-arm32_fix_tests
test_MirroringWatcher.cc test_MirroringWatcher.cc
test_ObjectMap.cc test_ObjectMap.cc
test_Operations.cc test_Operations.cc
diff -uNr ceph-15.2.4/src/test/librbd/test_DeepCopy.cc ceph-15.2.4-arm32_fix_tests/src/test/librbd/test_DeepCopy.cc diff -uNr ceph-15.2.15/src/test/librbd/test_DeepCopy.cc ceph-15.2.15-arm32_fix_tests/src/test/librbd/test_DeepCopy.cc
--- ceph-15.2.4/src/test/librbd/test_DeepCopy.cc 2020-07-01 01:10:51.000000000 +0930 --- ceph-15.2.15/src/test/librbd/test_DeepCopy.cc 2021-10-21 00:49:57.000000000 +1030
+++ ceph-15.2.4-arm32_fix_tests/src/test/librbd/test_DeepCopy.cc 2021-01-04 13:35:20.848449585 +1030 +++ ceph-15.2.15-arm32_fix_tests/src/test/librbd/test_DeepCopy.cc 2022-01-19 15:42:45.770681533 +1030
@@ -362,14 +362,14 @@ @@ -362,14 +362,14 @@
size = initial_size = m_src_ictx->get_image_size(CEPH_NOSNAP); size = initial_size = m_src_ictx->get_image_size(CEPH_NOSNAP);
} }
...@@ -42,9 +42,9 @@ diff -uNr ceph-15.2.4/src/test/librbd/test_DeepCopy.cc ceph-15.2.4-arm32_fix_tes ...@@ -42,9 +42,9 @@ diff -uNr ceph-15.2.4/src/test/librbd/test_DeepCopy.cc ceph-15.2.4-arm32_fix_tes
c = getenv("TEST_RBD_DEEPCOPY_STRESS_NWRITES"); c = getenv("TEST_RBD_DEEPCOPY_STRESS_NWRITES");
if (c != NULL) { if (c != NULL) {
std::stringstream ss(c); std::stringstream ss(c);
diff -uNr ceph-15.2.4/src/test/librbd/test_main.cc ceph-15.2.4-arm32_fix_tests/src/test/librbd/test_main.cc diff -uNr ceph-15.2.15/src/test/librbd/test_main.cc ceph-15.2.15-arm32_fix_tests/src/test/librbd/test_main.cc
--- ceph-15.2.4/src/test/librbd/test_main.cc 2020-07-01 01:10:51.000000000 +0930 --- ceph-15.2.15/src/test/librbd/test_main.cc 2021-10-21 00:49:57.000000000 +1030
+++ ceph-15.2.4-arm32_fix_tests/src/test/librbd/test_main.cc 2021-01-04 13:35:20.848449585 +1030 +++ ceph-15.2.15-arm32_fix_tests/src/test/librbd/test_main.cc 2022-01-19 15:42:45.770681533 +1030
@@ -18,6 +18,7 @@ @@ -18,6 +18,7 @@
extern void register_test_journal_entries(); extern void register_test_journal_entries();
extern void register_test_journal_replay(); extern void register_test_journal_replay();
...@@ -61,10 +61,10 @@ diff -uNr ceph-15.2.4/src/test/librbd/test_main.cc ceph-15.2.4-arm32_fix_tests/s ...@@ -61,10 +61,10 @@ diff -uNr ceph-15.2.4/src/test/librbd/test_main.cc ceph-15.2.4-arm32_fix_tests/s
register_test_mirroring(); register_test_mirroring();
register_test_mirroring_watcher(); register_test_mirroring_watcher();
register_test_object_map(); register_test_object_map();
diff -uNr ceph-15.2.4/src/test/librbd/test_Migration.cc ceph-15.2.4-arm32_fix_tests/src/test/librbd/test_Migration.cc diff -uNr ceph-15.2.15/src/test/librbd/test_Migration.cc ceph-15.2.15-arm32_fix_tests/src/test/librbd/test_Migration.cc
--- ceph-15.2.4/src/test/librbd/test_Migration.cc 2020-07-01 01:10:51.000000000 +0930 --- ceph-15.2.15/src/test/librbd/test_Migration.cc 2021-10-21 00:49:57.000000000 +1030
+++ ceph-15.2.4-arm32_fix_tests/src/test/librbd/test_Migration.cc 2021-01-04 13:35:20.849449588 +1030 +++ ceph-15.2.15-arm32_fix_tests/src/test/librbd/test_Migration.cc 2022-01-19 15:42:45.770681533 +1030
@@ -432,94 +432,6 @@ @@ -427,94 +427,6 @@
close_image(child_ictx); close_image(child_ictx);
} }
...@@ -159,7 +159,7 @@ diff -uNr ceph-15.2.4/src/test/librbd/test_Migration.cc ceph-15.2.4-arm32_fix_te ...@@ -159,7 +159,7 @@ diff -uNr ceph-15.2.4/src/test/librbd/test_Migration.cc ceph-15.2.4-arm32_fix_te
static std::string _other_pool_name; static std::string _other_pool_name;
static librados::IoCtx _other_pool_ioctx; static librados::IoCtx _other_pool_ioctx;
@@ -1300,27 +1212,3 @@ @@ -1326,27 +1238,3 @@
migration_abort(m_ioctx, m_image_name); migration_abort(m_ioctx, m_image_name);
}); });
} }
...@@ -187,9 +187,9 @@ diff -uNr ceph-15.2.4/src/test/librbd/test_Migration.cc ceph-15.2.4-arm32_fix_te ...@@ -187,9 +187,9 @@ diff -uNr ceph-15.2.4/src/test/librbd/test_Migration.cc ceph-15.2.4-arm32_fix_te
-{ -{
- test_stress2(true); - test_stress2(true);
-} -}
diff -uNr ceph-15.2.4/src/test/librbd/test_MigrationStress.cc ceph-15.2.4-arm32_fix_tests/src/test/librbd/test_MigrationStress.cc diff -uNr ceph-15.2.15/src/test/librbd/test_MigrationStress.cc ceph-15.2.15-arm32_fix_tests/src/test/librbd/test_MigrationStress.cc
--- ceph-15.2.4/src/test/librbd/test_MigrationStress.cc 1970-01-01 09:30:00.000000000 +0930 --- ceph-15.2.15/src/test/librbd/test_MigrationStress.cc 1970-01-01 09:30:00.000000000 +0930
+++ ceph-15.2.4-arm32_fix_tests/src/test/librbd/test_MigrationStress.cc 2021-01-04 13:35:20.849449588 +1030 +++ ceph-15.2.15-arm32_fix_tests/src/test/librbd/test_MigrationStress.cc 2022-01-19 15:42:45.770681533 +1030
@@ -0,0 +1,456 @@ @@ -0,0 +1,456 @@
+// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- +// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
+// vim: ts=8 sw=2 smarttab +// vim: ts=8 sw=2 smarttab
...@@ -647,9 +647,9 @@ diff -uNr ceph-15.2.4/src/test/librbd/test_MigrationStress.cc ceph-15.2.4-arm32_ ...@@ -647,9 +647,9 @@ diff -uNr ceph-15.2.4/src/test/librbd/test_MigrationStress.cc ceph-15.2.4-arm32_
+{ +{
+ test_stress2(true); + test_stress2(true);
+} +}
diff -uNr ceph-15.2.4/src/test/objectstore/test_bdev.cc ceph-15.2.4-arm32_fix_tests/src/test/objectstore/test_bdev.cc diff -uNr ceph-15.2.15/src/test/objectstore/test_bdev.cc ceph-15.2.15-arm32_fix_tests/src/test/objectstore/test_bdev.cc
--- ceph-15.2.4/src/test/objectstore/test_bdev.cc 2020-07-01 01:10:51.000000000 +0930 --- ceph-15.2.15/src/test/objectstore/test_bdev.cc 2021-10-21 00:49:57.000000000 +1030
+++ ceph-15.2.4-arm32_fix_tests/src/test/objectstore/test_bdev.cc 2021-01-04 13:34:04.621220183 +1030 +++ ceph-15.2.15-arm32_fix_tests/src/test/objectstore/test_bdev.cc 2022-01-19 15:42:45.770681533 +1030
@@ -54,8 +54,8 @@ @@ -54,8 +54,8 @@
BlockDevice::create(g_ceph_context, bdev.path, NULL, NULL, BlockDevice::create(g_ceph_context, bdev.path, NULL, NULL,
[](void* handle, void* aio) {}, NULL)); [](void* handle, void* aio) {}, NULL));
...@@ -661,33 +661,30 @@ diff -uNr ceph-15.2.4/src/test/objectstore/test_bdev.cc ceph-15.2.4-arm32_fix_te ...@@ -661,33 +661,30 @@ diff -uNr ceph-15.2.4/src/test/objectstore/test_bdev.cc ceph-15.2.4-arm32_fix_te
string s(1048576, 'a' + (i % 28)); string s(1048576, 'a' + (i % 28));
bl.append(s); bl.append(s);
} }
diff -uNr ceph-15.2.4/src/test/objectstore/test_bluefs.cc ceph-15.2.4-arm32_fix_tests/src/test/objectstore/test_bluefs.cc diff -uNr ceph-15.2.15/src/test/objectstore/test_bluefs.cc ceph-15.2.15-arm32_fix_tests/src/test/objectstore/test_bluefs.cc
--- ceph-15.2.4/src/test/objectstore/test_bluefs.cc 2020-07-01 01:10:51.000000000 +0930 --- ceph-15.2.15/src/test/objectstore/test_bluefs.cc 2021-10-21 00:49:57.000000000 +1030
+++ ceph-15.2.4-arm32_fix_tests/src/test/objectstore/test_bluefs.cc 2021-01-04 13:34:04.621220183 +1030 +++ ceph-15.2.15-arm32_fix_tests/src/test/objectstore/test_bluefs.cc 2022-01-19 15:55:52.662196838 +1030
@@ -206,7 +206,7 @@ @@ -237,8 +237,8 @@
} }
TEST(BlueFS, very_large_write) { TEST(BlueFS, very_large_write) {
- // we'll write a ~3G file, so allocate more than that for the whole fs - // we'll write a ~5G file, so allocate more than that for the whole fs
- uint64_t size = 1048576 * 1024 * 6ull;
+ // we'll write a ~1G file, so allocate more than that for the whole fs + // we'll write a ~1G file, so allocate more than that for the whole fs
uint64_t size = 1048576 * 1024 * 8ull; + uint64_t size = 1048576 * 1024 * 1ull;
TempBdev bdev{size}; TempBdev bdev{size};
BlueFS fs(g_ceph_context); BlueFS fs(g_ceph_context);
@@ -228,7 +228,7 @@
BlueFS::FileWriter *h; @@ -313,9 +313,9 @@
ASSERT_EQ(0, fs.mkdir("dir"));
ASSERT_EQ(0, fs.open_for_write("dir", "bigfile", &h, false));
- for (unsigned i = 0; i < 3*1024*1048576ull / sizeof(buf); ++i) {
+ for (unsigned i = 0; i < 1*1024*1048576ull / sizeof(buf); ++i) {
h->append(buf, sizeof(buf));
} }
fs.fsync(h);
@@ -239,7 +239,7 @@ TEST(BlueFS, very_large_write2) {
ASSERT_EQ(0, fs.open_for_read("dir", "bigfile", &h)); - // we'll write a ~5G file, so allocate more than that for the whole fs
bufferlist bl; - uint64_t size_full = 1048576 * 1024 * 6ull;
BlueFS::FileReaderBuffer readbuf(10485760); - uint64_t size = 1048576 * 1024 * 5ull;
- for (unsigned i = 0; i < 3*1024*1048576ull / sizeof(buf); ++i) { + // we'll write a ~1G file, so allocate more than that for the whole fs
+ for (unsigned i = 0; i < 1*1024*1048576ull / sizeof(buf); ++i) { + uint64_t size_full = 1048576 * 1024 * 1ull + 1048576 * 256 * 1ull;
bl.clear(); + uint64_t size = 1048576 * 1024 * 1ull;
fs.read(h, &readbuf, i * sizeof(buf), sizeof(buf), &bl, NULL); TempBdev bdev{ size_full };
int r = memcmp(buf, bl.c_str(), sizeof(buf)); BlueFS fs(g_ceph_context);
diff -uNr ceph-15.2.4/src/erasure-code/shec/ErasureCodeShec.cc ceph-15.2.4-fix_ErasureCodeShec/src/erasure-code/shec/ErasureCodeShec.cc diff -uNr ceph-15.2.15/src/erasure-code/shec/ErasureCodeShec.cc ceph-15.2.15-fix_ErasureCodeShec/src/erasure-code/shec/ErasureCodeShec.cc
--- ceph-15.2.4/src/erasure-code/shec/ErasureCodeShec.cc 2020-07-01 01:10:51.000000000 +0930 --- ceph-15.2.15/src/erasure-code/shec/ErasureCodeShec.cc 2021-10-21 00:49:57.000000000 +1030
+++ ceph-15.2.4-fix_ErasureCodeShec/src/erasure-code/shec/ErasureCodeShec.cc 2020-12-27 14:09:11.480903740 +1030 +++ ceph-15.2.15-fix_ErasureCodeShec/src/erasure-code/shec/ErasureCodeShec.cc 2022-01-19 16:17:29.215308480 +1030
@@ -179,6 +179,10 @@ @@ -179,6 +179,10 @@
if (!decoded || !decoded->empty()){ if (!decoded || !decoded->empty()){
return -EINVAL; return -EINVAL;
...@@ -12,9 +12,9 @@ diff -uNr ceph-15.2.4/src/erasure-code/shec/ErasureCodeShec.cc ceph-15.2.4-fix_E ...@@ -12,9 +12,9 @@ diff -uNr ceph-15.2.4/src/erasure-code/shec/ErasureCodeShec.cc ceph-15.2.4-fix_E
have.reserve(chunks.size()); have.reserve(chunks.size());
for (map<int, bufferlist>::const_iterator i = chunks.begin(); for (map<int, bufferlist>::const_iterator i = chunks.begin();
diff -uNr ceph-15.2.4/src/test/erasure-code/TestErasureCodeShec_arguments.cc ceph-15.2.4-fix_ErasureCodeShec/src/test/erasure-code/TestErasureCodeShec_arguments.cc diff -uNr ceph-15.2.15/src/test/erasure-code/TestErasureCodeShec_arguments.cc ceph-15.2.15-fix_ErasureCodeShec/src/test/erasure-code/TestErasureCodeShec_arguments.cc
--- ceph-15.2.4/src/test/erasure-code/TestErasureCodeShec_arguments.cc 2020-07-01 01:10:51.000000000 +0930 --- ceph-15.2.15/src/test/erasure-code/TestErasureCodeShec_arguments.cc 2021-10-21 00:49:57.000000000 +1030
+++ ceph-15.2.4-fix_ErasureCodeShec/src/test/erasure-code/TestErasureCodeShec_arguments.cc 2020-12-27 14:09:11.480903740 +1030 +++ ceph-15.2.15-fix_ErasureCodeShec/src/test/erasure-code/TestErasureCodeShec_arguments.cc 2022-01-19 16:17:29.215308480 +1030
@@ -323,7 +323,6 @@ @@ -323,7 +323,6 @@
EXPECT_EQ(-EIO, result); EXPECT_EQ(-EIO, result);
EXPECT_EQ(0u, minimum_chunks.size()); EXPECT_EQ(0u, minimum_chunks.size());
......
diff -uNr ceph-15.2.4/cmake/modules/Distutils.cmake ceph-15.2.4-fix_ceph-volume_systemd_unit/cmake/modules/Distutils.cmake diff -uNr ceph-15.2.15/cmake/modules/Distutils.cmake ceph-15.2.15-fix_ceph-volume_systemd_unit/cmake/modules/Distutils.cmake
--- ceph-15.2.4/cmake/modules/Distutils.cmake 2020-07-01 01:10:51.000000000 +0930 --- ceph-15.2.15/cmake/modules/Distutils.cmake 2021-10-21 00:49:57.000000000 +1030
+++ ceph-15.2.4-fix_ceph-volume_systemd_unit/cmake/modules/Distutils.cmake 2020-12-07 09:34:12.979605660 +1030 +++ ceph-15.2.15-fix_ceph-volume_systemd_unit/cmake/modules/Distutils.cmake 2022-01-19 16:32:53.117200509 +1030
@@ -25,9 +25,9 @@ @@ -25,9 +25,9 @@
list(APPEND options list(APPEND options
--root=\$ENV{DESTDIR} --root=\$ENV{DESTDIR}
......
diff -uNr ceph-15.2.4/src/test/test_arch.cc ceph-15.2.4-fix_cpu_detection/src/test/test_arch.cc diff -uNr ceph-15.2.15/src/test/test_arch.cc ceph-15.2.15-fix_cpu_detection/src/test/test_arch.cc
--- ceph-15.2.4/src/test/test_arch.cc 2020-07-01 01:10:51.000000000 +0930 --- ceph-15.2.15/src/test/test_arch.cc 2021-10-21 00:49:57.000000000 +1030
+++ ceph-15.2.4-fix_cpu_detection/src/test/test_arch.cc 2020-07-07 11:30:28.239565039 +0930 +++ ceph-15.2.15-fix_cpu_detection/src/test/test_arch.cc 2022-01-19 16:38:25.602238282 +1030
@@ -69,7 +69,7 @@ @@ -69,7 +69,7 @@
expected = strstr(flags, " sse4_1 ") ? 1 : 0; expected = strstr(flags, " sse4_1 ") ? 1 : 0;
EXPECT_EQ(expected, ceph_arch_intel_sse41); EXPECT_EQ(expected, ceph_arch_intel_sse41);
......
diff -uNr ceph-15.2.15/src/librbd/image/OpenRequest.cc ceph-15.2.15-fix_librbd_duplicate/src/librbd/image/OpenRequest.cc
--- ceph-15.2.15/src/librbd/image/OpenRequest.cc 2021-10-21 00:49:57.000000000 +1030
+++ ceph-15.2.15-fix_librbd_duplicate/src/librbd/image/OpenRequest.cc 2022-01-19 16:42:03.300887319 +1030
@@ -10,7 +10,7 @@
#include "librbd/Utils.h"
#include "librbd/cache/ObjectCacherObjectDispatch.h"
#include "librbd/cache/WriteAroundObjectDispatch.h"
-#include "librbd/cache/ParentCacheObjectDispatch.cc"
+#include "librbd/cache/ParentCacheObjectDispatch.h"
#include "librbd/image/CloseRequest.h"
#include "librbd/image/RefreshRequest.h"
#include "librbd/image/SetSnapRequest.h"
diff -uNr ceph-15.2.15/src/librbd/image/OpenRequest.cc.orig ceph-15.2.15-fix_librbd_duplicate/src/librbd/image/OpenRequest.cc.orig
--- ceph-15.2.15/src/librbd/image/OpenRequest.cc.orig 1970-01-01 09:30:00.000000000 +0930
+++ ceph-15.2.15-fix_librbd_duplicate/src/librbd/image/OpenRequest.cc.orig 2021-10-21 00:49:57.000000000 +1030
@@ -0,0 +1,734 @@
+// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
+// vim: ts=8 sw=2 smarttab
+
+#include "librbd/image/OpenRequest.h"
+#include "common/dout.h"
+#include "common/errno.h"
+#include "cls/rbd/cls_rbd_client.h"
+#include "librbd/ConfigWatcher.h"
+#include "librbd/ImageCtx.h"
+#include "librbd/Utils.h"
+#include "librbd/cache/ObjectCacherObjectDispatch.h"
+#include "librbd/cache/WriteAroundObjectDispatch.h"
+#include "librbd/cache/ParentCacheObjectDispatch.cc"
+#include "librbd/image/CloseRequest.h"
+#include "librbd/image/RefreshRequest.h"
+#include "librbd/image/SetSnapRequest.h"
+#include "librbd/io/SimpleSchedulerObjectDispatch.h"
+#include <boost/algorithm/string/predicate.hpp>
+#include "include/ceph_assert.h"
+
+#define dout_subsys ceph_subsys_rbd
+#undef dout_prefix
+#define dout_prefix *_dout << "librbd::image::OpenRequest: "
+
+namespace librbd {
+namespace image {
+
+using util::create_context_callback;
+using util::create_rados_callback;
+
+template <typename I>
+OpenRequest<I>::OpenRequest(I *image_ctx, uint64_t flags,
+ Context *on_finish)
+ : m_image_ctx(image_ctx),
+ m_skip_open_parent_image(flags & OPEN_FLAG_SKIP_OPEN_PARENT),
+ m_on_finish(on_finish), m_error_result(0) {
+ if ((flags & OPEN_FLAG_OLD_FORMAT) != 0) {
+ m_image_ctx->old_format = true;
+ }
+ if ((flags & OPEN_FLAG_IGNORE_MIGRATING) != 0) {
+ m_image_ctx->ignore_migrating = true;
+ }
+}
+
+template <typename I>
+void OpenRequest<I>::send() {
+ if (m_image_ctx->old_format) {
+ send_v1_detect_header();
+ } else {
+ send_v2_detect_header();
+ }
+}
+
+template <typename I>
+void OpenRequest<I>::send_v1_detect_header() {
+ librados::ObjectReadOperation op;
+ op.stat(NULL, NULL, NULL);
+
+ using klass = OpenRequest<I>;
+ librados::AioCompletion *comp =
+ create_rados_callback<klass, &klass::handle_v1_detect_header>(this);
+ m_out_bl.clear();
+ m_image_ctx->md_ctx.aio_operate(util::old_header_name(m_image_ctx->name),
+ comp, &op, &m_out_bl);
+ comp->release();
+}
+
+template <typename I>
+Context *OpenRequest<I>::handle_v1_detect_header(int *result) {
+ CephContext *cct = m_image_ctx->cct;
+ ldout(cct, 10) << __func__ << ": r=" << *result << dendl;
+
+ if (*result < 0) {
+ if (*result != -ENOENT) {
+ lderr(cct) << "failed to stat image header: " << cpp_strerror(*result)
+ << dendl;
+ }
+ send_close_image(*result);
+ } else {
+ ldout(cct, 1) << "RBD image format 1 is deprecated. "
+ << "Please copy this image to image format 2." << dendl;
+
+ m_image_ctx->old_format = true;
+ m_image_ctx->header_oid = util::old_header_name(m_image_ctx->name);
+ m_image_ctx->apply_metadata({}, true);
+
+ send_refresh();
+ }
+ return nullptr;
+}
+
+template <typename I>
+void OpenRequest<I>::send_v2_detect_header() {
+ if (m_image_ctx->id.empty()) {
+ CephContext *cct = m_image_ctx->cct;
+ ldout(cct, 10) << this << " " << __func__ << dendl;
+
+ librados::ObjectReadOperation op;
+ op.stat(NULL, NULL, NULL);
+
+ using klass = OpenRequest<I>;
+ librados::AioCompletion *comp =
+ create_rados_callback<klass, &klass::handle_v2_detect_header>(this);
+ m_out_bl.clear();
+ m_image_ctx->md_ctx.aio_operate(util::id_obj_name(m_image_ctx->name),
+ comp, &op, &m_out_bl);
+ comp->release();
+ } else {
+ send_v2_get_name();
+ }
+}
+
+template <typename I>
+Context *OpenRequest<I>::handle_v2_detect_header(int *result) {
+ CephContext *cct = m_image_ctx->cct;
+ ldout(cct, 10) << __func__ << ": r=" << *result << dendl;
+
+ if (*result == -ENOENT) {
+ send_v1_detect_header();
+ } else if (*result < 0) {
+ lderr(cct) << "failed to stat v2 image header: " << cpp_strerror(*result)
+ << dendl;
+ send_close_image(*result);
+ } else {
+ m_image_ctx->old_format = false;
+ send_v2_get_id();
+ }
+ return nullptr;
+}
+
+template <typename I>
+void OpenRequest<I>::send_v2_get_id() {
+ CephContext *cct = m_image_ctx->cct;
+ ldout(cct, 10) << this << " " << __func__ << dendl;
+
+ librados::ObjectReadOperation op;
+ cls_client::get_id_start(&op);
+
+ using klass = OpenRequest<I>;
+ librados::AioCompletion *comp =
+ create_rados_callback<klass, &klass::handle_v2_get_id>(this);
+ m_out_bl.clear();
+ m_image_ctx->md_ctx.aio_operate(util::id_obj_name(m_image_ctx->name),
+ comp, &op, &m_out_bl);
+ comp->release();
+}
+
+template <typename I>
+Context *OpenRequest<I>::handle_v2_get_id(int *result) {
+ CephContext *cct = m_image_ctx->cct;
+ ldout(cct, 10) << __func__ << ": r=" << *result << dendl;
+
+ if (*result == 0) {
+ auto it = m_out_bl.cbegin();
+ *result = cls_client::get_id_finish(&it, &m_image_ctx->id);
+ }
+ if (*result < 0) {
+ lderr(cct) << "failed to retrieve image id: " << cpp_strerror(*result)
+ << dendl;
+ send_close_image(*result);
+ } else {
+ send_v2_get_initial_metadata();
+ }
+ return nullptr;
+}
+
+template <typename I>
+void OpenRequest<I>::send_v2_get_name() {
+ CephContext *cct = m_image_ctx->cct;
+ ldout(cct, 10) << this << " " << __func__ << dendl;
+
+ librados::ObjectReadOperation op;
+ cls_client::dir_get_name_start(&op, m_image_ctx->id);
+
+ using klass = OpenRequest<I>;
+ librados::AioCompletion *comp = create_rados_callback<
+ klass, &klass::handle_v2_get_name>(this);
+ m_out_bl.clear();
+ m_image_ctx->md_ctx.aio_operate(RBD_DIRECTORY, comp, &op, &m_out_bl);
+ comp->release();
+}
+
+template <typename I>
+Context *OpenRequest<I>::handle_v2_get_name(int *result) {
+ CephContext *cct = m_image_ctx->cct;
+ ldout(cct, 10) << __func__ << ": r=" << *result << dendl;
+
+ if (*result == 0) {
+ auto it = m_out_bl.cbegin();
+ *result = cls_client::dir_get_name_finish(&it, &m_image_ctx->name);
+ }
+ if (*result < 0 && *result != -ENOENT) {
+ lderr(cct) << "failed to retrieve name: "
+ << cpp_strerror(*result) << dendl;
+ send_close_image(*result);
+ } else if (*result == -ENOENT) {
+ // image does not exist in directory, look in the trash bin
+ ldout(cct, 10) << "image id " << m_image_ctx->id << " does not exist in "
+ << "rbd directory, searching in rbd trash..." << dendl;
+ send_v2_get_name_from_trash();
+ } else {
+ send_v2_get_initial_metadata();
+ }
+ return nullptr;
+}
+
+template <typename I>
+void OpenRequest<I>::send_v2_get_name_from_trash() {
+ CephContext *cct = m_image_ctx->cct;
+ ldout(cct, 10) << this << " " << __func__ << dendl;
+
+ librados::ObjectReadOperation op;
+ cls_client::trash_get_start(&op, m_image_ctx->id);
+
+ using klass = OpenRequest<I>;
+ librados::AioCompletion *comp = create_rados_callback<
+ klass, &klass::handle_v2_get_name_from_trash>(this);
+ m_out_bl.clear();
+ m_image_ctx->md_ctx.aio_operate(RBD_TRASH, comp, &op, &m_out_bl);
+ comp->release();
+}
+
+template <typename I>
+Context *OpenRequest<I>::handle_v2_get_name_from_trash(int *result) {
+ CephContext *cct = m_image_ctx->cct;
+ ldout(cct, 10) << __func__ << ": r=" << *result << dendl;
+
+ cls::rbd::TrashImageSpec trash_spec;
+ if (*result == 0) {
+ auto it = m_out_bl.cbegin();
+ *result = cls_client::trash_get_finish(&it, &trash_spec);
+ m_image_ctx->name = trash_spec.name;
+ }
+ if (*result < 0) {
+ if (*result == -EOPNOTSUPP) {
+ *result = -ENOENT;
+ }
+ if (*result == -ENOENT) {
+ ldout(cct, 5) << "failed to retrieve name for image id "
+ << m_image_ctx->id << dendl;
+ } else {
+ lderr(cct) << "failed to retrieve name from trash: "
+ << cpp_strerror(*result) << dendl;
+ }
+ send_close_image(*result);
+ } else {
+ send_v2_get_initial_metadata();
+ }
+
+ return nullptr;
+}
+
+template <typename I>
+void OpenRequest<I>::send_v2_get_initial_metadata() {
+ CephContext *cct = m_image_ctx->cct;
+ ldout(cct, 10) << this << " " << __func__ << dendl;
+
+ m_image_ctx->old_format = false;
+ m_image_ctx->header_oid = util::header_name(m_image_ctx->id);
+
+ librados::ObjectReadOperation op;
+ cls_client::get_size_start(&op, CEPH_NOSNAP);
+ cls_client::get_object_prefix_start(&op);
+ cls_client::get_features_start(&op, true);
+
+ using klass = OpenRequest<I>;
+ librados::AioCompletion *comp = create_rados_callback<
+ klass, &klass::handle_v2_get_initial_metadata>(this);
+ m_out_bl.clear();
+ m_image_ctx->md_ctx.aio_operate(m_image_ctx->header_oid, comp, &op,
+ &m_out_bl);
+ comp->release();
+}
+
+template <typename I>
+Context *OpenRequest<I>::handle_v2_get_initial_metadata(int *result) {
+ CephContext *cct = m_image_ctx->cct;
+ ldout(cct, 10) << __func__ << ": r=" << *result << dendl;
+
+ auto it = m_out_bl.cbegin();
+ if (*result >= 0) {
+ uint64_t size;
+ *result = cls_client::get_size_finish(&it, &size, &m_image_ctx->order);
+ }
+
+ if (*result >= 0) {
+ *result = cls_client::get_object_prefix_finish(&it,
+ &m_image_ctx->object_prefix);
+ }
+
+ if (*result >= 0) {
+ uint64_t incompatible_features;
+ *result = cls_client::get_features_finish(&it, &m_image_ctx->features,
+ &incompatible_features);
+ }
+
+ if (*result < 0) {
+ lderr(cct) << "failed to retrieve initial metadata: "
+ << cpp_strerror(*result) << dendl;
+ send_close_image(*result);
+ return nullptr;
+ }
+
+ if (m_image_ctx->test_features(RBD_FEATURE_STRIPINGV2)) {
+ send_v2_get_stripe_unit_count();
+ } else {
+ send_v2_get_create_timestamp();
+ }
+
+ return nullptr;
+}
+
+template <typename I>
+void OpenRequest<I>::send_v2_get_stripe_unit_count() {
+ CephContext *cct = m_image_ctx->cct;
+ ldout(cct, 10) << this << " " << __func__ << dendl;
+
+ librados::ObjectReadOperation op;
+ cls_client::get_stripe_unit_count_start(&op);
+
+ using klass = OpenRequest<I>;
+ librados::AioCompletion *comp = create_rados_callback<
+ klass, &klass::handle_v2_get_stripe_unit_count>(this);
+ m_out_bl.clear();
+ m_image_ctx->md_ctx.aio_operate(m_image_ctx->header_oid, comp, &op,
+ &m_out_bl);
+ comp->release();
+}
+
+template <typename I>
+Context *OpenRequest<I>::handle_v2_get_stripe_unit_count(int *result) {
+ CephContext *cct = m_image_ctx->cct;
+ ldout(cct, 10) << __func__ << ": r=" << *result << dendl;
+
+ if (*result == 0) {
+ auto it = m_out_bl.cbegin();
+ *result = cls_client::get_stripe_unit_count_finish(
+ &it, &m_image_ctx->stripe_unit, &m_image_ctx->stripe_count);
+ }
+
+ if (*result == -ENOEXEC || *result == -EINVAL) {
+ *result = 0;
+ }
+
+ if (*result < 0) {
+ lderr(cct) << "failed to read striping metadata: " << cpp_strerror(*result)
+ << dendl;
+ send_close_image(*result);
+ return nullptr;
+ }
+
+ send_v2_get_create_timestamp();
+ return nullptr;
+}
+
+template <typename I>
+void OpenRequest<I>::send_v2_get_create_timestamp() {
+ CephContext *cct = m_image_ctx->cct;
+ ldout(cct, 10) << this << " " << __func__ << dendl;
+
+ librados::ObjectReadOperation op;
+ cls_client::get_create_timestamp_start(&op);
+
+ using klass = OpenRequest<I>;
+ librados::AioCompletion *comp = create_rados_callback<
+ klass, &klass::handle_v2_get_create_timestamp>(this);
+ m_out_bl.clear();
+ m_image_ctx->md_ctx.aio_operate(m_image_ctx->header_oid, comp, &op,
+ &m_out_bl);
+ comp->release();
+}
+
+template <typename I>
+Context *OpenRequest<I>::handle_v2_get_create_timestamp(int *result) {
+ CephContext *cct = m_image_ctx->cct;
+ ldout(cct, 10) << this << " " << __func__ << ": r=" << *result << dendl;
+
+ if (*result == 0) {
+ auto it = m_out_bl.cbegin();
+ *result = cls_client::get_create_timestamp_finish(&it,
+ &m_image_ctx->create_timestamp);
+ }
+ if (*result < 0 && *result != -EOPNOTSUPP) {
+ lderr(cct) << "failed to retrieve create_timestamp: "
+ << cpp_strerror(*result)
+ << dendl;
+ send_close_image(*result);
+ return nullptr;
+ }
+
+ send_v2_get_access_modify_timestamp();
+ return nullptr;
+}
+
+template <typename I>
+void OpenRequest<I>::send_v2_get_access_modify_timestamp() {
+ CephContext *cct = m_image_ctx->cct;
+ ldout(cct, 10) << this << " " << __func__ << dendl;
+
+ librados::ObjectReadOperation op;
+ cls_client::get_access_timestamp_start(&op);
+ cls_client::get_modify_timestamp_start(&op);
+ //TODO: merge w/ create timestamp query after luminous EOLed
+
+ using klass = OpenRequest<I>;
+ librados::AioCompletion *comp = create_rados_callback<
+ klass, &klass::handle_v2_get_access_modify_timestamp>(this);
+ m_out_bl.clear();
+ m_image_ctx->md_ctx.aio_operate(m_image_ctx->header_oid, comp, &op,
+ &m_out_bl);
+ comp->release();
+}
+
+template <typename I>
+Context *OpenRequest<I>::handle_v2_get_access_modify_timestamp(int *result) {
+ CephContext *cct = m_image_ctx->cct;
+ ldout(cct, 10) << this << " " << __func__ << ": r=" << *result << dendl;
+
+ if (*result == 0) {
+ auto it = m_out_bl.cbegin();
+ *result = cls_client::get_access_timestamp_finish(&it,
+ &m_image_ctx->access_timestamp);
+ if (*result == 0)
+ *result = cls_client::get_modify_timestamp_finish(&it,
+ &m_image_ctx->modify_timestamp);
+ }
+ if (*result < 0 && *result != -EOPNOTSUPP) {
+ lderr(cct) << "failed to retrieve access/modify_timestamp: "
+ << cpp_strerror(*result)
+ << dendl;
+ send_close_image(*result);
+ return nullptr;
+ }
+
+ send_v2_get_data_pool();
+ return nullptr;
+}
+
+template <typename I>
+void OpenRequest<I>::send_v2_get_data_pool() {
+ CephContext *cct = m_image_ctx->cct;
+ ldout(cct, 10) << this << " " << __func__ << dendl;
+
+ librados::ObjectReadOperation op;
+ cls_client::get_data_pool_start(&op);
+
+ using klass = OpenRequest<I>;
+ librados::AioCompletion *comp = create_rados_callback<
+ klass, &klass::handle_v2_get_data_pool>(this);
+ m_out_bl.clear();
+ m_image_ctx->md_ctx.aio_operate(m_image_ctx->header_oid, comp, &op,
+ &m_out_bl);
+ comp->release();
+}
+
+template <typename I>
+Context *OpenRequest<I>::handle_v2_get_data_pool(int *result) {
+ CephContext *cct = m_image_ctx->cct;
+ ldout(cct, 10) << this << " " << __func__ << ": r=" << *result << dendl;
+
+ int64_t data_pool_id = -1;
+ if (*result == 0) {
+ auto it = m_out_bl.cbegin();
+ *result = cls_client::get_data_pool_finish(&it, &data_pool_id);
+ } else if (*result == -EOPNOTSUPP) {
+ *result = 0;
+ }
+
+ if (*result < 0) {
+ lderr(cct) << "failed to read data pool: " << cpp_strerror(*result)
+ << dendl;
+ send_close_image(*result);
+ return nullptr;
+ }
+
+ if (data_pool_id != -1) {
+ *result = util::create_ioctx(m_image_ctx->md_ctx, "data pool", data_pool_id,
+ {}, &m_image_ctx->data_ctx);
+ if (*result < 0) {
+ if (*result != -ENOENT) {
+ send_close_image(*result);
+ return nullptr;
+ }
+ m_image_ctx->data_ctx.close();
+ } else {
+ m_image_ctx->data_ctx.set_namespace(m_image_ctx->md_ctx.get_namespace());
+ }
+ } else {
+ data_pool_id = m_image_ctx->md_ctx.get_id();
+ }
+
+ m_image_ctx->init_layout(data_pool_id);
+ send_refresh();
+ return nullptr;
+}
+
+template <typename I>
+void OpenRequest<I>::send_refresh() {
+ m_image_ctx->init();
+
+ CephContext *cct = m_image_ctx->cct;
+ ldout(cct, 10) << this << " " << __func__ << dendl;
+
+ m_image_ctx->config_watcher = ConfigWatcher<I>::create(*m_image_ctx);
+ m_image_ctx->config_watcher->init();
+
+ using klass = OpenRequest<I>;
+ RefreshRequest<I> *req = RefreshRequest<I>::create(
+ *m_image_ctx, false, m_skip_open_parent_image,
+ create_context_callback<klass, &klass::handle_refresh>(this));
+ req->send();
+}
+
+template <typename I>
+Context *OpenRequest<I>::handle_refresh(int *result) {
+ CephContext *cct = m_image_ctx->cct;
+ ldout(cct, 10) << __func__ << ": r=" << *result << dendl;
+
+ if (*result < 0) {
+ lderr(cct) << "failed to refresh image: " << cpp_strerror(*result)
+ << dendl;
+ send_close_image(*result);
+ return nullptr;
+ }
+
+ return send_parent_cache(result);
+}
+
+template <typename I>
+Context* OpenRequest<I>::send_parent_cache(int *result) {
+ CephContext *cct = m_image_ctx->cct;
+ ldout(cct, 10) << __func__ << ": r=" << *result << dendl;
+
+ bool parent_cache_enabled = m_image_ctx->config.template get_val<bool>(
+ "rbd_parent_cache_enabled");
+
+ if (m_image_ctx->child == nullptr || !parent_cache_enabled ||
+ !m_image_ctx->data_ctx.is_valid()) {
+ return send_init_cache(result);
+ }
+
+ auto parent_cache = cache::ParentCacheObjectDispatch<I>::create(m_image_ctx);
+ using klass = OpenRequest<I>;
+ Context *ctx = create_context_callback<
+ klass, &klass::handle_parent_cache>(this);
+
+ parent_cache->init(ctx);
+ return nullptr;
+}
+
+template <typename I>
+Context* OpenRequest<I>::handle_parent_cache(int* result) {
+ CephContext *cct = m_image_ctx->cct;
+ ldout(cct, 10) << __func__ << ": r=" << *result << dendl;
+
+ if (*result < 0) {
+ lderr(cct) << "failed to parent cache " << dendl;
+ send_close_image(*result);
+ return nullptr;
+ }
+
+ return send_init_cache(result);
+}
+
+template <typename I>
+Context *OpenRequest<I>::send_init_cache(int *result) {
+ if (!m_image_ctx->cache || m_image_ctx->child != nullptr ||
+ !m_image_ctx->data_ctx.is_valid()) {
+ return send_register_watch(result);
+ }
+
+ CephContext *cct = m_image_ctx->cct;
+ ldout(cct, 10) << this << " " << __func__ << dendl;
+
+ size_t max_dirty = m_image_ctx->config.template get_val<Option::size_t>(
+ "rbd_cache_max_dirty");
+ auto writethrough_until_flush = m_image_ctx->config.template get_val<bool>(
+ "rbd_cache_writethrough_until_flush");
+ auto cache_policy = m_image_ctx->config.template get_val<std::string>(
+ "rbd_cache_policy");
+ if (cache_policy == "writearound") {
+ auto cache = cache::WriteAroundObjectDispatch<I>::create(
+ m_image_ctx, max_dirty, writethrough_until_flush);
+ cache->init();
+
+ m_image_ctx->readahead.set_max_readahead_size(0);
+ } else if (cache_policy == "writethrough" || cache_policy == "writeback") {
+ if (cache_policy == "writethrough") {
+ max_dirty = 0;
+ }
+
+ auto cache = cache::ObjectCacherObjectDispatch<I>::create(
+ m_image_ctx, max_dirty, writethrough_until_flush);
+ cache->init();
+
+ // readahead requires the object cacher cache
+ m_image_ctx->readahead.set_trigger_requests(
+ m_image_ctx->config.template get_val<uint64_t>("rbd_readahead_trigger_requests"));
+ m_image_ctx->readahead.set_max_readahead_size(
+ m_image_ctx->config.template get_val<Option::size_t>("rbd_readahead_max_bytes"));
+ }
+ return send_register_watch(result);
+}
+
+template <typename I>
+Context *OpenRequest<I>::send_register_watch(int *result) {
+ if ((m_image_ctx->read_only_flags & IMAGE_READ_ONLY_FLAG_USER) != 0U) {
+ return send_set_snap(result);
+ }
+
+ CephContext *cct = m_image_ctx->cct;
+ ldout(cct, 10) << this << " " << __func__ << dendl;
+
+ using klass = OpenRequest<I>;
+ Context *ctx = create_context_callback<
+ klass, &klass::handle_register_watch>(this);
+ m_image_ctx->register_watch(ctx);
+ return nullptr;
+}
+
+template <typename I>
+Context *OpenRequest<I>::handle_register_watch(int *result) {
+ CephContext *cct = m_image_ctx->cct;
+ ldout(cct, 10) << this << " " << __func__ << ": r=" << *result << dendl;
+
+ if (*result == -EPERM) {
+ ldout(cct, 5) << "user does not have write permission" << dendl;
+ send_close_image(*result);
+ return nullptr;
+ } else if (*result < 0) {
+ lderr(cct) << "failed to register watch: " << cpp_strerror(*result)
+ << dendl;
+ send_close_image(*result);
+ return nullptr;
+ }
+
+ return send_set_snap(result);
+}
+
+template <typename I>
+Context *OpenRequest<I>::send_set_snap(int *result) {
+ if (m_image_ctx->snap_name.empty() &&
+ m_image_ctx->open_snap_id == CEPH_NOSNAP) {
+ *result = 0;
+ return finalize(*result);
+ }
+
+ CephContext *cct = m_image_ctx->cct;
+ ldout(cct, 10) << this << " " << __func__ << dendl;
+
+ uint64_t snap_id = CEPH_NOSNAP;
+ std::swap(m_image_ctx->open_snap_id, snap_id);
+ if (snap_id == CEPH_NOSNAP) {
+ std::shared_lock image_locker{m_image_ctx->image_lock};
+ snap_id = m_image_ctx->get_snap_id(m_image_ctx->snap_namespace,
+ m_image_ctx->snap_name);
+ }
+ if (snap_id == CEPH_NOSNAP) {
+ lderr(cct) << "failed to find snapshot " << m_image_ctx->snap_name << dendl;
+ send_close_image(-ENOENT);
+ return nullptr;
+ }
+
+ using klass = OpenRequest<I>;
+ SetSnapRequest<I> *req = SetSnapRequest<I>::create(
+ *m_image_ctx, snap_id,
+ create_context_callback<klass, &klass::handle_set_snap>(this));
+ req->send();
+ return nullptr;
+}
+
+template <typename I>
+Context *OpenRequest<I>::handle_set_snap(int *result) {
+ CephContext *cct = m_image_ctx->cct;
+ ldout(cct, 10) << __func__ << ": r=" << *result << dendl;
+
+ if (*result < 0) {
+ lderr(cct) << "failed to set image snapshot: " << cpp_strerror(*result)
+ << dendl;
+ send_close_image(*result);
+ return nullptr;
+ }
+
+ return finalize(*result);
+}
+
+template <typename I>
+Context *OpenRequest<I>::finalize(int r) {
+ if (r == 0) {
+ auto io_scheduler_cfg =
+ m_image_ctx->config.template get_val<std::string>("rbd_io_scheduler");
+
+ if (io_scheduler_cfg == "simple" && !m_image_ctx->read_only) {
+ auto io_scheduler =
+ io::SimpleSchedulerObjectDispatch<I>::create(m_image_ctx);
+ io_scheduler->init();
+ }
+ }
+
+ return m_on_finish;
+}
+
+template <typename I>
+void OpenRequest<I>::send_close_image(int error_result) {
+ CephContext *cct = m_image_ctx->cct;
+ ldout(cct, 10) << this << " " << __func__ << dendl;
+
+ m_error_result = error_result;
+
+ using klass = OpenRequest<I>;
+ Context *ctx = create_context_callback<klass, &klass::handle_close_image>(
+ this);
+ CloseRequest<I> *req = CloseRequest<I>::create(m_image_ctx, ctx);
+ req->send();
+}
+
+template <typename I>
+Context *OpenRequest<I>::handle_close_image(int *result) {
+ CephContext *cct = m_image_ctx->cct;
+ ldout(cct, 10) << __func__ << ": r=" << *result << dendl;
+
+ if (*result < 0) {
+ lderr(cct) << "failed to close image: " << cpp_strerror(*result) << dendl;
+ }
+ if (m_error_result < 0) {
+ *result = m_error_result;
+ }
+ return m_on_finish;
+}
+
+} // namespace image
+} // namespace librbd
+
+template class librbd::image::OpenRequest<librbd::ImageCtx>;
diff -uNr ceph-15.2.4/src/pybind/mgr/dashboard/cherrypy_backports.py ceph-15.2.4-fix_mypy/src/pybind/mgr/dashboard/cherrypy_backports.py diff -uNr ceph-15.2.15/src/pybind/mgr/dashboard/cherrypy_backports.py ceph-15.2.15-fix_mypy/src/pybind/mgr/dashboard/cherrypy_backports.py
--- ceph-15.2.4/src/pybind/mgr/dashboard/cherrypy_backports.py 2020-07-01 01:10:51.000000000 +0930 --- ceph-15.2.15/src/pybind/mgr/dashboard/cherrypy_backports.py 2021-10-21 00:49:57.000000000 +1030
+++ ceph-15.2.4-fix_mypy/src/pybind/mgr/dashboard/cherrypy_backports.py 2022-01-23 11:51:01.356453830 +1030 +++ ceph-15.2.15-fix_mypy/src/pybind/mgr/dashboard/cherrypy_backports.py 2022-01-25 15:02:42.034121126 +1030
@@ -75,7 +75,7 @@ @@ -75,7 +75,7 @@
if v < StrictVersion("9.0.0"): if v < StrictVersion("9.0.0"):
from cherrypy.wsgiserver.ssl_builtin import BuiltinSSLAdapter as builtin_ssl from cherrypy.wsgiserver.ssl_builtin import BuiltinSSLAdapter as builtin_ssl
......
diff -uNr ceph-15.2.4/src/pybind/mgr/dashboard/requirements-lint.txt ceph-15.2.4-fix_tests/src/pybind/mgr/dashboard/requirements-lint.txt diff -uNr ceph-15.2.15/src/test/cli/ceph-conf/env-vs-args.t ceph-15.2.15-fix_tests/src/test/cli/ceph-conf/env-vs-args.t
--- ceph-15.2.4/src/pybind/mgr/dashboard/requirements-lint.txt 2020-07-01 01:10:51.000000000 +0930 --- ceph-15.2.15/src/test/cli/ceph-conf/env-vs-args.t 2021-10-21 00:49:57.000000000 +1030
+++ ceph-15.2.4-fix_tests/src/pybind/mgr/dashboard/requirements-lint.txt 2022-01-23 12:16:55.331322609 +1030 +++ ceph-15.2.15-fix_tests/src/test/cli/ceph-conf/env-vs-args.t 2022-02-07 00:15:45.649300945 +1030
@@ -1,4 +1,5 @@
pylint==2.3.1; python_version >= '3'
+astroid==2.5.8; python_version >= '3'
flake8==3.7.8; python_version >= '3'
flake8-colors==0.1.6; python_version >= '3'
#TODO: Fix docstring issues: https://tracker.ceph.com/issues/41224
diff -uNr ceph-15.2.4/src/pybind/mgr/insights/tox.ini ceph-15.2.4-fix_tests/src/pybind/mgr/insights/tox.ini
--- ceph-15.2.4/src/pybind/mgr/insights/tox.ini 2020-07-01 01:10:51.000000000 +0930
+++ ceph-15.2.4-fix_tests/src/pybind/mgr/insights/tox.ini 2022-01-23 12:16:55.370322731 +1030
@@ -8,6 +8,7 @@
deps =
pytest
mock
+ six
setenv=
UNITTEST = true
py3: PYTHONPATH = {toxinidir}/../../../../build/lib/cython_modules/lib.3
diff -uNr ceph-15.2.4/src/test/cli/ceph-conf/env-vs-args.t ceph-15.2.4-fix_tests/src/test/cli/ceph-conf/env-vs-args.t
--- ceph-15.2.4/src/test/cli/ceph-conf/env-vs-args.t 2020-07-01 01:10:51.000000000 +0930
+++ ceph-15.2.4-fix_tests/src/test/cli/ceph-conf/env-vs-args.t 2022-01-23 12:16:55.371322734 +1030
@@ -2,9 +2,9 @@ @@ -2,9 +2,9 @@
$ env CEPH_CONF=from-env ceph-conf -s foo bar $ env CEPH_CONF=from-env ceph-conf -s foo bar
did not load config file, using default settings. did not load config file, using default settings.
...@@ -33,10 +13,10 @@ diff -uNr ceph-15.2.4/src/test/cli/ceph-conf/env-vs-args.t ceph-15.2.4-fix_tests ...@@ -33,10 +13,10 @@ diff -uNr ceph-15.2.4/src/test/cli/ceph-conf/env-vs-args.t ceph-15.2.4-fix_tests
[1] [1]
# command-line arguments should override environment # command-line arguments should override environment
diff -uNr ceph-15.2.4/src/test/CMakeLists.txt ceph-15.2.4-fix_tests/src/test/CMakeLists.txt diff -uNr ceph-15.2.15/src/test/CMakeLists.txt ceph-15.2.15-fix_tests/src/test/CMakeLists.txt
--- ceph-15.2.4/src/test/CMakeLists.txt 2020-07-01 01:10:51.000000000 +0930 --- ceph-15.2.15/src/test/CMakeLists.txt 2021-10-21 00:49:57.000000000 +1030
+++ ceph-15.2.4-fix_tests/src/test/CMakeLists.txt 2022-01-23 12:16:55.371322734 +1030 +++ ceph-15.2.15-fix_tests/src/test/CMakeLists.txt 2022-02-07 00:15:45.650300949 +1030
@@ -528,11 +528,17 @@ @@ -512,11 +512,17 @@
# Run rbd-unit-tests separate so they an run in parallel # Run rbd-unit-tests separate so they an run in parallel
# For values see: src/include/rbd/features.h # For values see: src/include/rbd/features.h
add_ceph_test(run-rbd-unit-tests-N.sh ${CMAKE_CURRENT_SOURCE_DIR}/run-rbd-unit-tests.sh N) add_ceph_test(run-rbd-unit-tests-N.sh ${CMAKE_CURRENT_SOURCE_DIR}/run-rbd-unit-tests.sh N)
...@@ -54,29 +34,17 @@ diff -uNr ceph-15.2.4/src/test/CMakeLists.txt ceph-15.2.4-fix_tests/src/test/CMa ...@@ -54,29 +34,17 @@ diff -uNr ceph-15.2.4/src/test/CMakeLists.txt ceph-15.2.4-fix_tests/src/test/CMa
if(FREEBSD) if(FREEBSD)
add_ceph_test(rbd-ggate.sh ${CMAKE_CURRENT_SOURCE_DIR}/rbd-ggate.sh) add_ceph_test(rbd-ggate.sh ${CMAKE_CURRENT_SOURCE_DIR}/rbd-ggate.sh)
endif(FREEBSD) endif(FREEBSD)
@@ -546,6 +552,7 @@ @@ -530,6 +536,7 @@
#add_ceph_test(test_pidfile.sh ${CMAKE_CURRENT_SOURCE_DIR}/test_pidfile.sh) #add_ceph_test(test_pidfile.sh ${CMAKE_CURRENT_SOURCE_DIR}/test_pidfile.sh)
add_ceph_test(smoke.sh ${CMAKE_CURRENT_SOURCE_DIR}/smoke.sh) add_ceph_test(smoke.sh ${CMAKE_CURRENT_SOURCE_DIR}/smoke.sh)
+set_tests_properties(smoke.sh PROPERTIES TIMEOUT 7200) +set_tests_properties(smoke.sh PROPERTIES TIMEOUT 7200)
set_property( find_program(PROMTOOL_EXECUTABLE promtool)
TEST ${tox_tests} if(PROMTOOL_EXECUTABLE)
diff -uNr ceph-15.2.4/src/test/common/test_lockdep.cc ceph-15.2.4-fix_tests/src/test/common/test_lockdep.cc diff -uNr ceph-15.2.15/src/test/common/Throttle.cc ceph-15.2.15-fix_tests/src/test/common/Throttle.cc
--- ceph-15.2.4/src/test/common/test_lockdep.cc 2020-07-01 01:10:51.000000000 +0930 --- ceph-15.2.15/src/test/common/Throttle.cc 2021-10-21 00:49:57.000000000 +1030
+++ ceph-15.2.4-fix_tests/src/test/common/test_lockdep.cc 2022-01-23 12:16:55.371322734 +1030 +++ ceph-15.2.15-fix_tests/src/test/common/Throttle.cc 2022-02-07 00:15:45.650300949 +1030
@@ -16,7 +16,7 @@
{
protected:
void SetUp() override {
-#ifdef CEPH_DEBUG_MUTEX
+#ifndef CEPH_DEBUG_MUTEX
GTEST_SKIP() << "WARNING: CEPH_DEBUG_MUTEX is not defined, lockdep will not work";
#endif
CephInitParameters params(CEPH_ENTITY_TYPE_CLIENT);
diff -uNr ceph-15.2.4/src/test/common/Throttle.cc ceph-15.2.4-fix_tests/src/test/common/Throttle.cc
--- ceph-15.2.4/src/test/common/Throttle.cc 2020-07-01 01:10:51.000000000 +0930
+++ ceph-15.2.4-fix_tests/src/test/common/Throttle.cc 2022-01-23 12:16:55.371322734 +1030
@@ -332,7 +332,7 @@ @@ -332,7 +332,7 @@
3, 3,
6); 6);
...@@ -86,18 +54,18 @@ diff -uNr ceph-15.2.4/src/test/common/Throttle.cc ceph-15.2.4-fix_tests/src/test ...@@ -86,18 +54,18 @@ diff -uNr ceph-15.2.4/src/test/common/Throttle.cc ceph-15.2.4-fix_tests/src/test
ASSERT_LT(results.second.count(), 0.0002); ASSERT_LT(results.second.count(), 0.0002);
ASSERT_GT(results.second.count(), 0.00005); ASSERT_GT(results.second.count(), 0.00005);
} }
diff -uNr ceph-15.2.4/src/test/encoding/CMakeLists.txt ceph-15.2.4-fix_tests/src/test/encoding/CMakeLists.txt diff -uNr ceph-15.2.15/src/test/encoding/CMakeLists.txt ceph-15.2.15-fix_tests/src/test/encoding/CMakeLists.txt
--- ceph-15.2.4/src/test/encoding/CMakeLists.txt 2020-07-01 01:10:51.000000000 +0930 --- ceph-15.2.15/src/test/encoding/CMakeLists.txt 2021-10-21 00:49:57.000000000 +1030
+++ ceph-15.2.4-fix_tests/src/test/encoding/CMakeLists.txt 2022-01-23 12:16:55.371322734 +1030 +++ ceph-15.2.15-fix_tests/src/test/encoding/CMakeLists.txt 2022-02-07 00:15:45.650300949 +1030
@@ -1,3 +1,5 @@ @@ -1,3 +1,5 @@
# scripts # scripts
add_ceph_test(check-generated.sh ${CMAKE_CURRENT_SOURCE_DIR}/check-generated.sh) add_ceph_test(check-generated.sh ${CMAKE_CURRENT_SOURCE_DIR}/check-generated.sh)
+set_tests_properties(check-generated.sh PROPERTIES TIMEOUT 18000) +set_tests_properties(check-generated.sh PROPERTIES TIMEOUT 18000)
add_ceph_test(readable.sh ${CMAKE_CURRENT_SOURCE_DIR}/readable.sh) add_ceph_test(readable.sh ${CMAKE_CURRENT_SOURCE_DIR}/readable.sh)
+set_tests_properties(readable.sh PROPERTIES TIMEOUT 36000) +set_tests_properties(readable.sh PROPERTIES TIMEOUT 36000)
diff -uNr ceph-15.2.4/src/test/mgr/CMakeLists.txt ceph-15.2.4-fix_tests/src/test/mgr/CMakeLists.txt diff -uNr ceph-15.2.15/src/test/mgr/CMakeLists.txt ceph-15.2.15-fix_tests/src/test/mgr/CMakeLists.txt
--- ceph-15.2.4/src/test/mgr/CMakeLists.txt 2020-07-01 01:10:51.000000000 +0930 --- ceph-15.2.15/src/test/mgr/CMakeLists.txt 2021-10-21 00:49:57.000000000 +1030
+++ ceph-15.2.4-fix_tests/src/test/mgr/CMakeLists.txt 2022-01-23 12:16:55.371322734 +1030 +++ ceph-15.2.15-fix_tests/src/test/mgr/CMakeLists.txt 2022-02-07 00:15:45.650300949 +1030
@@ -9,6 +9,7 @@ @@ -9,6 +9,7 @@
if(WITH_MGR_DASHBOARD_FRONTEND) if(WITH_MGR_DASHBOARD_FRONTEND)
if(NOT CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64|AARCH64|arm|ARM") if(NOT CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64|AARCH64|arm|ARM")
...@@ -106,9 +74,9 @@ diff -uNr ceph-15.2.4/src/test/mgr/CMakeLists.txt ceph-15.2.4-fix_tests/src/test ...@@ -106,9 +74,9 @@ diff -uNr ceph-15.2.4/src/test/mgr/CMakeLists.txt ceph-15.2.4-fix_tests/src/test
endif(NOT CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64|AARCH64|arm|ARM") endif(NOT CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64|AARCH64|arm|ARM")
add_ceph_test(mgr-dashboard-smoke.sh ${CMAKE_CURRENT_SOURCE_DIR}/mgr-dashboard-smoke.sh) add_ceph_test(mgr-dashboard-smoke.sh ${CMAKE_CURRENT_SOURCE_DIR}/mgr-dashboard-smoke.sh)
diff -uNr ceph-15.2.4/src/test/objectstore/CMakeLists.txt ceph-15.2.4-fix_tests/src/test/objectstore/CMakeLists.txt diff -uNr ceph-15.2.15/src/test/objectstore/CMakeLists.txt ceph-15.2.15-fix_tests/src/test/objectstore/CMakeLists.txt
--- ceph-15.2.4/src/test/objectstore/CMakeLists.txt 2020-07-01 01:10:51.000000000 +0930 --- ceph-15.2.15/src/test/objectstore/CMakeLists.txt 2021-10-21 00:49:57.000000000 +1030
+++ ceph-15.2.4-fix_tests/src/test/objectstore/CMakeLists.txt 2022-01-23 12:20:34.429010487 +1030 +++ ceph-15.2.15-fix_tests/src/test/objectstore/CMakeLists.txt 2022-02-07 00:15:45.650300949 +1030
@@ -131,6 +131,7 @@ @@ -131,6 +131,7 @@
test_bluefs.cc test_bluefs.cc
) )
...@@ -125,9 +93,28 @@ diff -uNr ceph-15.2.4/src/test/objectstore/CMakeLists.txt ceph-15.2.4-fix_tests/ ...@@ -125,9 +93,28 @@ diff -uNr ceph-15.2.4/src/test/objectstore/CMakeLists.txt ceph-15.2.4-fix_tests/
target_link_libraries(unittest_bdev os global) target_link_libraries(unittest_bdev os global)
endif(WITH_BLUESTORE) endif(WITH_BLUESTORE)
diff -uNr ceph-15.2.4/src/test/osd/CMakeLists.txt ceph-15.2.4-fix_tests/src/test/osd/CMakeLists.txt diff -uNr ceph-15.2.15/src/test/objectstore/test_bluefs.cc ceph-15.2.15-fix_tests/src/test/objectstore/test_bluefs.cc
--- ceph-15.2.4/src/test/osd/CMakeLists.txt 2020-07-01 01:10:51.000000000 +0930 --- ceph-15.2.15/src/test/objectstore/test_bluefs.cc 2021-10-21 00:49:57.000000000 +1030
+++ ceph-15.2.4-fix_tests/src/test/osd/CMakeLists.txt 2022-01-23 12:16:55.371322734 +1030 +++ ceph-15.2.15-fix_tests/src/test/objectstore/test_bluefs.cc 2022-02-07 00:16:23.980424148 +1030
@@ -263,13 +263,13 @@
for (unsigned i = 0; i < 3*1024*1048576ull / sizeof(buf); ++i) {
h->append(buf, sizeof(buf));
total_written += sizeof(buf);
+ fs.fsync(h);
}
- fs.fsync(h);
for (unsigned i = 0; i < 2*1024*1048576ull / sizeof(buf); ++i) {
h->append(buf, sizeof(buf));
total_written += sizeof(buf);
+ fs.fsync(h);
}
- fs.fsync(h);
fs.close_writer(h);
}
{
diff -uNr ceph-15.2.15/src/test/osd/CMakeLists.txt ceph-15.2.15-fix_tests/src/test/osd/CMakeLists.txt
--- ceph-15.2.15/src/test/osd/CMakeLists.txt 2021-10-21 00:49:57.000000000 +1030
+++ ceph-15.2.15-fix_tests/src/test/osd/CMakeLists.txt 2022-02-07 00:15:45.650300949 +1030
@@ -35,6 +35,7 @@ @@ -35,6 +35,7 @@
# scripts # scripts
...@@ -136,9 +123,9 @@ diff -uNr ceph-15.2.4/src/test/osd/CMakeLists.txt ceph-15.2.4-fix_tests/src/test ...@@ -136,9 +123,9 @@ diff -uNr ceph-15.2.4/src/test/osd/CMakeLists.txt ceph-15.2.4-fix_tests/src/test
# unittest_osdmap # unittest_osdmap
add_executable(unittest_osdmap add_executable(unittest_osdmap
diff -uNr ceph-15.2.4/src/test/osd/TestOSDScrub.cc ceph-15.2.4-fix_tests/src/test/osd/TestOSDScrub.cc diff -uNr ceph-15.2.15/src/test/osd/TestOSDScrub.cc ceph-15.2.15-fix_tests/src/test/osd/TestOSDScrub.cc
--- ceph-15.2.4/src/test/osd/TestOSDScrub.cc 2020-07-01 01:10:51.000000000 +0930 --- ceph-15.2.15/src/test/osd/TestOSDScrub.cc 2021-10-21 00:49:57.000000000 +1030
+++ ceph-15.2.4-fix_tests/src/test/osd/TestOSDScrub.cc 2022-01-23 12:16:55.371322734 +1030 +++ ceph-15.2.15-fix_tests/src/test/osd/TestOSDScrub.cc 2022-02-07 00:15:45.650300949 +1030
@@ -70,7 +70,7 @@ @@ -70,7 +70,7 @@
g_ceph_context->_conf.set_val("osd_scrub_begin_hour", "0"); g_ceph_context->_conf.set_val("osd_scrub_begin_hour", "0");
g_ceph_context->_conf.set_val("osd_scrub_end_hour", "24"); g_ceph_context->_conf.set_val("osd_scrub_end_hour", "24");
...@@ -148,9 +135,9 @@ diff -uNr ceph-15.2.4/src/test/osd/TestOSDScrub.cc ceph-15.2.4-fix_tests/src/tes ...@@ -148,9 +135,9 @@ diff -uNr ceph-15.2.4/src/test/osd/TestOSDScrub.cc ceph-15.2.4-fix_tests/src/tes
tm.tm_isdst = -1; tm.tm_isdst = -1;
strptime("2015-01-16 12:05:13", "%Y-%m-%d %H:%M:%S", &tm); strptime("2015-01-16 12:05:13", "%Y-%m-%d %H:%M:%S", &tm);
utime_t now = utime_t(mktime(&tm), 0); utime_t now = utime_t(mktime(&tm), 0);
diff -uNr ceph-15.2.4/src/test/smoke.sh ceph-15.2.4-fix_tests/src/test/smoke.sh diff -uNr ceph-15.2.15/src/test/smoke.sh ceph-15.2.15-fix_tests/src/test/smoke.sh
--- ceph-15.2.4/src/test/smoke.sh 2020-07-01 01:10:51.000000000 +0930 --- ceph-15.2.15/src/test/smoke.sh 2021-10-21 00:49:57.000000000 +1030
+++ ceph-15.2.4-fix_tests/src/test/smoke.sh 2022-01-23 12:16:55.372322737 +1030 +++ ceph-15.2.15-fix_tests/src/test/smoke.sh 2022-02-07 00:15:45.650300949 +1030
@@ -53,7 +53,7 @@ @@ -53,7 +53,7 @@
ceph osd out 0 ceph osd out 0
wait_for_clean wait_for_clean
...@@ -160,3 +147,22 @@ diff -uNr ceph-15.2.4/src/test/smoke.sh ceph-15.2.4-fix_tests/src/test/smoke.sh ...@@ -160,3 +147,22 @@ diff -uNr ceph-15.2.4/src/test/smoke.sh ceph-15.2.4-fix_tests/src/test/smoke.sh
wait_for_clean wait_for_clean
ceph osd in 0 ceph osd in 0
diff -uNr ceph-15.2.15/src/test/test_ipaddr.cc ceph-15.2.15-fix_tests/src/test/test_ipaddr.cc
--- ceph-15.2.15/src/test/test_ipaddr.cc 2021-10-21 00:49:57.000000000 +1030
+++ ceph-15.2.15-fix_tests/src/test/test_ipaddr.cc 2022-02-07 00:15:45.651300952 +1030
@@ -186,6 +186,7 @@
struct sockaddr_in a_three;
one.ifa_next = &two;
+ one.ifa_flags &= ~IFF_UP;
one.ifa_addr = (struct sockaddr*)&a_one;
one.ifa_name = lo;
@@ -317,6 +318,7 @@
struct sockaddr_in6 a_three;
one.ifa_next = &two;
+ one.ifa_flags &= ~IFF_UP;
ipv6(&a_one, "::1");
one.ifa_addr = (struct sockaddr*)&a_one;
one.ifa_name = lo;
diff -uNr ceph-15.2.4/src/msg/async/frames_v2.h ceph-15.2.4-fix_v2_frame/src/msg/async/frames_v2.h diff -uNr ceph-15.2.15/src/msg/async/frames_v2.h ceph-15.2.15-fix_v2_frame/src/msg/async/frames_v2.h
--- ceph-15.2.4/src/msg/async/frames_v2.h 2020-07-01 01:10:51.000000000 +0930 --- ceph-15.2.15/src/msg/async/frames_v2.h 2021-10-21 00:49:57.000000000 +1030
+++ ceph-15.2.4-fix_v2_frame/src/msg/async/frames_v2.h 2021-08-14 10:06:23.517830235 +0930 +++ ceph-15.2.15-fix_v2_frame/src/msg/async/frames_v2.h 2022-01-19 16:50:18.478348557 +1030
@@ -60,7 +60,7 @@ @@ -63,7 +63,7 @@
// We need them because of the rx_buffers zero-copy optimization. // We need them because of the rx_buffers zero-copy optimization.
static constexpr __u16 PAGE_SIZE_ALIGNMENT = 4096; static constexpr __u16 PAGE_SIZE_ALIGNMENT = 4096;
......
diff -uNr ceph-15.2.4/do_cmake.sh ceph-15.2.4-no_git/do_cmake.sh diff -uNr ceph-15.2.15/do_cmake.sh ceph-15.2.15-no_git/do_cmake.sh
--- ceph-15.2.4/do_cmake.sh 2020-07-01 01:10:51.000000000 +0930 --- ceph-15.2.15/do_cmake.sh 2021-10-21 00:49:57.000000000 +1030
+++ ceph-15.2.4-no_git/do_cmake.sh 2020-07-07 11:45:30.305162268 +0930 +++ ceph-15.2.15-no_git/do_cmake.sh 2022-01-19 16:52:23.781718316 +1030
@@ -1,7 +1,9 @@ @@ -1,7 +1,9 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -ex set -ex
......
diff -uNr ceph-15.2.15/src/test/CMakeLists.txt ceph-15.2.15-skip_promtool_tests/src/test/CMakeLists.txt
--- ceph-15.2.15/src/test/CMakeLists.txt 2021-10-21 00:49:57.000000000 +1030
+++ ceph-15.2.15-skip_promtool_tests/src/test/CMakeLists.txt 2022-02-07 20:05:41.506213691 +1030
@@ -531,24 +531,6 @@
add_ceph_test(smoke.sh ${CMAKE_CURRENT_SOURCE_DIR}/smoke.sh)
-find_program(PROMTOOL_EXECUTABLE promtool)
-if(PROMTOOL_EXECUTABLE)
- execute_process(
- COMMAND ${PROMTOOL_EXECUTABLE} test rules /dev/null
- RESULT_VARIABLE rc
- OUTPUT_QUIET)
- if(NOT rc)
- add_ceph_test(run-promtool-unittests
- ${PROMTOOL_EXECUTABLE} test rules ${CMAKE_SOURCE_DIR}/monitoring/prometheus/alerts/test_alerts.yml)
- else()
- message(WARNING "'${PROMTOOL_EXECUTABLE} test rules' does not work, "
- "please use a newer prometheus")
- endif()
-else()
- add_ceph_test(run-promtool-unittests
- {CMAKE_CURRENT_SOURCE_DIR}/run-promtool-unittests.sh)
-endif()
-
set_property(
TEST ${tox_tests}
PROPERTY ENVIRONMENT ${env_vars_for_tox_tests})
diff -uNr ceph-15.2.4/src/pybind/ceph_argparse.py ceph-15.2.4-fix_ceph_thread_timeout/src/pybind/ceph_argparse.py
--- ceph-15.2.4/src/pybind/ceph_argparse.py 2020-07-01 01:10:51.000000000 +0930
+++ ceph-15.2.4-fix_ceph_thread_timeout/src/pybind/ceph_argparse.py 2020-12-27 14:15:28.161241445 +1030
@@ -1317,9 +1317,11 @@
if timeout == 0 or timeout == None:
# python threading module will just get blocked if timeout is `None`,
# otherwise it will keep polling until timeout or thread stops.
- # wait for INT32_MAX, as python 3.6.8 use int32_t to present the
- # timeout in integer when converting it to nanoseconds
- timeout = (1 << (32 - 1)) - 1
+ # timeout in integer when converting it to nanoseconds, but since
+ # python3 uses `int64_t` for the deadline before timeout expires,
+ # we have to use a safe value which does not overflow after being
+ # added to current time in microseconds.
+ timeout = 24 * 60 * 60
t = RadosThread(func, *args, **kwargs)
# allow the main thread to exit (presumably, avoid a join() on this
Binary files ceph-15.2.4/src/test/downloads/cram-0.5.0ceph.2011-01-14.tar.gz and ceph-15.2.4-fix_cram/src/test/downloads/cram-0.5.0ceph.2011-01-14.tar.gz differ
Binary files ceph-15.2.4/src/test/downloads/cram-0.5.0.post20110114.tar.gz and ceph-15.2.4-fix_cram/src/test/downloads/cram-0.5.0.post20110114.tar.gz differ
diff -uNr ceph-15.2.4/src/test/run-cli-tests ceph-15.2.4-fix_cram/src/test/run-cli-tests
--- ceph-15.2.4/src/test/run-cli-tests 2020-07-01 01:10:51.000000000 +0930
+++ ceph-15.2.4-fix_cram/src/test/run-cli-tests 2021-02-18 12:01:54.643685626 +1030
@@ -30,7 +30,7 @@
# patched cram to support that. See upstream ticket at
# https://bitbucket.org/brodie/cram/issue/9/allow-read-only-directories-for-t
# -- tv@inktank.com
- virtualenv "$VENV" && $VENV/bin/pip --log "$VENV"/log.txt install "$SRCDIR/downloads/cram-0.5.0ceph.2011-01-14.tar.gz"
+ virtualenv "$VENV" && $VENV/bin/pip --log "$VENV"/log.txt install "$SRCDIR/downloads/cram-0.5.0.post20110114.tar.gz"
fi
SRCDIR_ABS="$(readlink -f "$SRCDIR")"
diff -uNr ceph-15.2.4/src/librbd/image/OpenRequest.cc ceph-15.2.4-fix_librbd_duplicate/src/librbd/image/OpenRequest.cc
--- ceph-15.2.4/src/librbd/image/OpenRequest.cc 2020-06-30 15:40:51.000000000 +0000
+++ ceph-15.2.4-fix_librbd_duplicate/src/librbd/image/OpenRequest.cc 2020-09-30 07:58:38.979496776 +0000
@@ -9,7 +9,7 @@
#include "librbd/Utils.h"
#include "librbd/cache/ObjectCacherObjectDispatch.h"
#include "librbd/cache/WriteAroundObjectDispatch.h"
-#include "librbd/cache/ParentCacheObjectDispatch.cc"
+#include "librbd/cache/ParentCacheObjectDispatch.h"
#include "librbd/image/CloseRequest.h"
#include "librbd/image/RefreshRequest.h"
#include "librbd/image/SetSnapRequest.h"
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment