]> git.pld-linux.org Git - packages/ceph.git/blame - ceph-types.patch
- enhanced types patch wrt. unsigned 32-bit constant
[packages/ceph.git] / ceph-types.patch
CommitLineData
1b11728e
JB
1--- ceph-12.2.13/src/osd/PrimaryLogPG.cc.orig 2020-01-30 21:52:36.000000000 +0100
2+++ ceph-12.2.13/src/osd/PrimaryLogPG.cc 2020-05-28 12:18:59.914600378 +0200
3@@ -1582,7 +1582,7 @@
4 if (limit != eversion_t() &&
5 limit != pg_trim_to &&
6 pg_log.get_log().approx_size() > target) {
7- size_t num_to_trim = std::min(pg_log.get_log().approx_size() - target,
8+ size_t num_to_trim = std::min(static_cast<uint64_t>(pg_log.get_log().approx_size() - target),
9 cct->_conf->osd_pg_log_trim_max);
10 if (num_to_trim < cct->_conf->osd_pg_log_trim_min &&
11 cct->_conf->osd_pg_log_trim_max >= cct->_conf->osd_pg_log_trim_min) {
12@@ -1628,7 +1628,7 @@
13 pg_log.get_log().approx_size() > target) {
14 dout(10) << __func__ << " approx pg log length = "
15 << pg_log.get_log().approx_size() << dendl;
16- size_t num_to_trim = std::min(pg_log.get_log().approx_size() - target,
17+ size_t num_to_trim = std::min(static_cast<uint64_t>(pg_log.get_log().approx_size() - target),
18 cct->_conf->osd_pg_log_trim_max);
19 dout(10) << __func__ << " num_to_trim = " << num_to_trim << dendl;
20 if (num_to_trim < cct->_conf->osd_pg_log_trim_min &&
a92d2e05
JB
21--- ceph-12.2.13/src/os/filestore/FileStore.h.orig 2020-01-30 21:52:36.000000000 +0100
22+++ ceph-12.2.13/src/os/filestore/FileStore.h 2020-06-03 14:29:43.325143770 +0200
23@@ -57,7 +57,7 @@
24
25 #if defined(__linux__)
26 # ifndef BTRFS_SUPER_MAGIC
27-#define BTRFS_SUPER_MAGIC 0x9123683EL
28+#define BTRFS_SUPER_MAGIC 0x9123683EUL
29 # endif
30 # ifndef XFS_SUPER_MAGIC
31 #define XFS_SUPER_MAGIC 0x58465342L
32--- ceph-12.2.13/src/os/filestore/FileStore.cc.orig 2020-01-30 21:52:36.000000000 +0100
33+++ ceph-12.2.13/src/os/filestore/FileStore.cc 2020-06-03 21:27:26.387210803 +0200
34@@ -779,7 +779,7 @@
35
36 FileStoreBackend *FileStoreBackend::create(long f_type, FileStore *fs)
37 {
38- switch (f_type) {
39+ switch (static_cast<uint32_t>(f_type)) {
40 #if defined(__linux__)
41 case BTRFS_SUPER_MAGIC:
42 return new BtrfsFileStoreBackend(fs);
43@@ -808,7 +808,7 @@
44 << " (magic 0x" << std::hex << f_type << std::dec << ")"
45 << dendl;
46
47- switch (f_type) {
48+ switch (static_cast<uint32_t>(f_type)) {
49 #if defined(__linux__)
50 case BTRFS_SUPER_MAGIC:
51 if (!m_disable_wbthrottle){
52@@ -922,7 +922,7 @@
53 }
54
55 #if defined(__linux__)
56- if (basefs.f_type == BTRFS_SUPER_MAGIC &&
57+ if (static_cast<uint32_t>(basefs.f_type) == BTRFS_SUPER_MAGIC &&
58 !g_ceph_context->check_experimental_feature_enabled("btrfs")) {
59 derr << __FUNC__ << ": deprecated btrfs support is not enabled" << dendl;
60 goto close_fsid_fd;
61@@ -1208,7 +1208,7 @@
62 blk_size = st.f_bsize;
63
64 #if defined(__linux__)
65- if (st.f_type == BTRFS_SUPER_MAGIC &&
66+ if (static_cast<uint32_t>(st.f_type) == BTRFS_SUPER_MAGIC &&
67 !g_ceph_context->check_experimental_feature_enabled("btrfs")) {
68 derr <<__FUNC__ << ": deprecated btrfs support is not enabled" << dendl;
69 return -EPERM;
70@@ -5949,7 +5949,7 @@
71 uint32_t fs_xattrs;
72 uint32_t fs_xattr_max_value_size;
73
74- switch (m_fs_type) {
75+ switch (static_cast<uint32_t>(m_fs_type)) {
76 #if defined(__linux__)
77 case XFS_SUPER_MAGIC:
78 fs_xattr_size = cct->_conf->filestore_max_inline_xattr_size_xfs;
This page took 0.081411 seconds and 4 git commands to generate.