#include <errno.h>
#include "objclass/objclass.h"
+#include "osd/osd_types.h"
#include "cls_cephfs.h"
#include <cerrno>
#include "objclass/objclass.h"
+#include "osd/osd_types.h"
using ceph::bufferlist;
using std::string;
using ceph::common::local_conf;
using ceph::os::FuturizedStore;
-PGLSFilter::PGLSFilter() : cct(nullptr)
-{
-}
-
-PGLSFilter::~PGLSFilter()
-{
-}
-
namespace ceph::osd {
OSD::OSD(int id, uint32_t nonce,
#include "include/rados/objclass.h"
struct obj_list_watch_response_t;
+class PGLSFilter;
extern "C" {
#endif
#ifdef __cplusplus
}
-class PGLSFilter {
- CephContext* cct;
-protected:
- std::string xattr;
-public:
- PGLSFilter();
- virtual ~PGLSFilter();
- virtual bool filter(const hobject_t &obj,
- const ceph::buffer::list& xattr_data) const = 0;
-
- /**
- * Arguments passed from the RADOS client. Implementations must
- * handle any encoding errors, and return an appropriate error code,
- * or 0 on valid input.
- */
- virtual int init(ceph::buffer::list::const_iterator ¶ms) = 0;
-
- /**
- * xattr key, or empty string. If non-empty, this xattr will be fetched
- * and the value passed into ::filter
- */
- virtual const std::string& get_xattr() const { return xattr; }
-
- /**
- * If true, objects without the named xattr (if xattr name is not empty)
- * will be rejected without calling ::filter
- */
- virtual bool reject_empty_xattr() const { return true; }
-};
-
// Classes expose a filter constructor that returns a subclass of PGLSFilter
typedef PGLSFilter* (*cls_cxx_filter_factory_t)();
MEMPOOL_DEFINE_OBJECT_FACTORY(PrimaryLogPG, replicatedpg, osd);
-PGLSFilter::PGLSFilter() : cct(nullptr)
-{
-}
-
-PGLSFilter::~PGLSFilter()
-{
-}
-
/**
* The CopyCallback class defines an interface for completions to the
* copy_start code. Users of the copy infrastructure must implement
encode(struct_v, values[string(infover_key)]);
t.omap_setkeys(coll, pgmeta_oid, values);
}
+
+PGLSFilter::PGLSFilter() : cct(nullptr)
+{
+}
+
+PGLSFilter::~PGLSFilter()
+{
+}
int64_t omap_keys;
};
+// filter for pg listings
+class PGLSFilter {
+ CephContext* cct;
+protected:
+ std::string xattr;
+public:
+ PGLSFilter();
+ virtual ~PGLSFilter();
+ virtual bool filter(const hobject_t &obj,
+ const ceph::buffer::list& xattr_data) const = 0;
+
+ /**
+ * Arguments passed from the RADOS client. Implementations must
+ * handle any encoding errors, and return an appropriate error code,
+ * or 0 on valid input.
+ */
+ virtual int init(ceph::buffer::list::const_iterator ¶ms) = 0;
+
+ /**
+ * xattr key, or empty string. If non-empty, this xattr will be fetched
+ * and the value passed into ::filter
+ */
+ virtual const std::string& get_xattr() const { return xattr; }
+
+ /**
+ * If true, objects without the named xattr (if xattr name is not empty)
+ * will be rejected without calling ::filter
+ */
+ virtual bool reject_empty_xattr() const { return true; }
+};
+
#endif