]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/rgw/rgw_file.h
update sources to v12.1.2
[ceph.git] / ceph / src / rgw / rgw_file.h
index 495af90e2fe2d24569cabe2aed971eff3dc17f06..34f3f0bcec8616ab4e6911b1a03138eff50a492b 100644 (file)
@@ -505,6 +505,14 @@ namespace rgw {
       return nullptr;
     }
 
+    int offset_of(const std::string& name, int64_t *offset, uint32_t flags) {
+      if (unlikely(! is_dir())) {
+       return -EINVAL;
+      }
+      *offset = XXH64(name.c_str(), name.length(), fh_key::seed);
+      return 0;
+    }
+
     bool is_open() const { return flags & FLAG_OPEN; }
     bool is_root() const { return flags & FLAG_ROOT; }
     bool is_bucket() const { return flags & FLAG_BUCKET; }