diff options
author | Patrick McLean <chutzpah@gentoo.org> | 2017-07-31 16:06:16 -0700 |
---|---|---|
committer | Patrick McLean <chutzpah@gentoo.org> | 2017-07-31 16:06:36 -0700 |
commit | 457cc8d804957b769e7c44147a49237068351b9f (patch) | |
tree | 2033869e3c56d27a74d88edd2a98a743eedfac1f /sys-cluster/ceph/files | |
parent | app-office/scribus: restore ~ppc keywords (diff) | |
download | gentoo-457cc8d804957b769e7c44147a49237068351b9f.tar.gz gentoo-457cc8d804957b769e7c44147a49237068351b9f.tar.bz2 gentoo-457cc8d804957b769e7c44147a49237068351b9f.zip |
sys-cluster/ceph: Revision bump to 10.2.9-r2, fix bug in rbd-nbd mapping
Package-Manager: Portage-2.3.6, Repoman-2.3.3
Diffstat (limited to 'sys-cluster/ceph/files')
-rw-r--r-- | sys-cluster/ceph/files/ceph-10.2.9-rbd-nbd_relax_size_check_for_newer_kernel_versions.patch | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/sys-cluster/ceph/files/ceph-10.2.9-rbd-nbd_relax_size_check_for_newer_kernel_versions.patch b/sys-cluster/ceph/files/ceph-10.2.9-rbd-nbd_relax_size_check_for_newer_kernel_versions.patch new file mode 100644 index 000000000000..5cb89be0edf1 --- /dev/null +++ b/sys-cluster/ceph/files/ceph-10.2.9-rbd-nbd_relax_size_check_for_newer_kernel_versions.patch @@ -0,0 +1,28 @@ +diff --git a/src/tools/rbd_nbd/rbd-nbd.cc b/src/tools/rbd_nbd/rbd-nbd.cc +index 2e399ab832..88e1e0ff65 100644 +--- a/src/tools/rbd_nbd/rbd-nbd.cc ++++ b/src/tools/rbd_nbd/rbd-nbd.cc +@@ -469,6 +469,10 @@ static int open_device(const char* path, bool try_load_moudle = false) + + static int check_device_size(int nbd_index, unsigned long expected_size) + { ++ // There are bugs with some older kernel versions that result in an ++ // overflow for large image sizes. This check is to ensure we are ++ // not affected. ++ + unsigned long size = 0; + std::string path = "/sys/block/nbd" + stringify(nbd_index) + "/size"; + std::ifstream ifs; +@@ -480,6 +484,12 @@ static int check_device_size(int nbd_index, unsigned long expected_size) + ifs >> size; + size *= RBD_NBD_BLKSIZE; + ++ if (size == 0) { ++ // Newer kernel versions will report real size only after nbd ++ // connect. Assume this is the case and return success. ++ return 0; ++ } ++ + if (size != expected_size) { + cerr << "rbd-nbd: kernel reported invalid device size (" << size + << ", expected " << expected_size << ")" << std::endl; |