]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/spdk/ocf/src/ocf_volume_priv.h
update source to Ceph Pacific 16.2.2
[ceph.git] / ceph / src / spdk / ocf / src / ocf_volume_priv.h
index de3615388222552a7d306a40f4e6a6b0370f03f7..1e51a3763a3132b7845e7e0f39e4c1406c6cd5c7 100644 (file)
@@ -9,10 +9,15 @@
 #include "ocf_env.h"
 #include "ocf_io_priv.h"
 #include "utils/utils_refcnt.h"
+#include "utils/utils_io_allocator.h"
+
+struct ocf_volume_extended {
+       ocf_io_allocator_type_t allocator_type;
+};
 
 struct ocf_volume_type {
        const struct ocf_volume_properties *properties;
-       env_allocator *allocator;
+       struct ocf_io_allocator allocator;
 };
 
 struct ocf_volume {
@@ -31,7 +36,8 @@ struct ocf_volume {
 };
 
 int ocf_volume_type_init(struct ocf_volume_type **type,
-               const struct ocf_volume_properties *properties);
+               const struct ocf_volume_properties *properties,
+               const struct ocf_volume_extended *extended);
 
 void ocf_volume_type_deinit(struct ocf_volume_type *type);
 
@@ -42,16 +48,20 @@ void ocf_volume_set_uuid(ocf_volume_t volume,
 
 static inline void ocf_volume_submit_metadata(struct ocf_io *io)
 {
-       ENV_BUG_ON(!io->volume->type->properties->ops.submit_metadata);
+       ocf_volume_t volume = ocf_io_get_volume(io);
 
-       io->volume->type->properties->ops.submit_metadata(io);
+       ENV_BUG_ON(!volume->type->properties->ops.submit_metadata);
+
+       volume->type->properties->ops.submit_metadata(io);
 }
 
 static inline void ocf_volume_submit_write_zeroes(struct ocf_io *io)
 {
-       ENV_BUG_ON(!io->volume->type->properties->ops.submit_write_zeroes);
+       ocf_volume_t volume = ocf_io_get_volume(io);
+
+       ENV_BUG_ON(!volume->type->properties->ops.submit_write_zeroes);
 
-       io->volume->type->properties->ops.submit_write_zeroes(io);
+       volume->type->properties->ops.submit_write_zeroes(io);
 }
 
 #endif  /*__OCF_VOLUME_PRIV_H__ */