]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/rgw/rgw_file.h
update sources to v12.2.5
[ceph.git] / ceph / src / rgw / rgw_file.h
index 9c82694de76c04ff7f52fddcd2df7884b3358e19..7b7b8aa4d35278d297e9b5a89ce9afab400b29de 100644 (file)
@@ -1334,9 +1334,15 @@ public:
   }
 
   bool eof() {
-    lsubdout(cct, rgw, 15) << "READDIR offset: " << offset
-                          << " is_truncated: " << is_truncated
-                          << dendl;
+    if (unlikely(cct->_conf->subsys.should_gather(ceph_subsys_rgw, 15))) {
+      bool is_offset =
+       unlikely(! get<const char*>(&offset)) ||
+       !! get<const char*>(offset);
+      lsubdout(cct, rgw, 15) << "READDIR offset: " <<
+       ((is_offset) ? offset : "(nil)")
+                            << " is_truncated: " << is_truncated
+                            << dendl;
+    }
     return !is_truncated;
   }
 
@@ -1522,10 +1528,16 @@ public:
   }
 
   bool eof() {
-    lsubdout(cct, rgw, 15) << "READDIR offset: " << offset
-                          << " next marker: " << next_marker
-                          << " is_truncated: " << is_truncated
-                          << dendl;
+    if (unlikely(cct->_conf->subsys.should_gather(ceph_subsys_rgw, 15))) {
+      bool is_offset =
+       unlikely(! get<const char*>(&offset)) ||
+       !! get<const char*>(offset);
+      lsubdout(cct, rgw, 15) << "READDIR offset: " <<
+       ((is_offset) ? offset : "(nil)")
+                            << " next marker: " << next_marker
+                            << " is_truncated: " << is_truncated
+                            << dendl;
+    }
     return !is_truncated;
   }