]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
hammer: osd: provide some contents on ObjectExtent usage in testing
authorGreg Farnum <gfarnum@redhat.com>
Thu, 23 Jun 2016 21:23:51 +0000 (14:23 -0700)
committerAlexey Sheplyakov <asheplyakov@mirantis.com>
Mon, 21 Nov 2016 15:37:26 +0000 (18:37 +0300)
Signed-off-by: Greg Farnum <gfarnum@redhat.com>
(cherry picked from commit a555d9a0c7d3b6c2206520cf78445234b0834639)

src/osd/osd_types.h

index 92f616324335aba08a7450e5fb14848c5e6bb54a..d1547e66352deeb42064b7d88767d2c80e49e148 100644 (file)
@@ -2668,6 +2668,25 @@ ostream& operator<<(ostream& out, const osd_peer_stat_t &stat);
 // -----------------------------------------
 
 class ObjectExtent {
+  /**
+   * ObjectExtents are used for specifying IO behavior against RADOS
+   * objects when one is using the ObjectCacher.
+   *
+   * To use this in a real system, *every member* must be filled
+   * out correctly. In particular, make sure to initialize the
+   * oloc correctly, as its default values are deliberate poison
+   * and will cause internal ObjectCacher asserts.
+   *
+   * Similarly, your buffer_extents vector *must* specify a total
+   * size equal to your length. If the buffer_extents inadvertently
+   * contain less space than the length member specifies, you
+   * will get unintelligible asserts deep in the ObjectCacher.
+   *
+   * If you are trying to do testing and don't care about actual
+   * RADOS function, the simplest thing to do is to initialize
+   * the ObjectExtent (truncate_size can be 0), create a single entry
+   * in buffer_extents matching the length, and set oloc.pool to 0.
+   */
  public:
   object_t    oid;       // object id
   uint64_t    objectno;