]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
librbd: rename md_oid parameters to header_oid
authorJosh Durgin <josh.durgin@inktank.com>
Fri, 8 Jun 2012 14:54:02 +0000 (07:54 -0700)
committerJosh Durgin <josh.durgin@inktank.com>
Fri, 8 Jun 2012 23:38:22 +0000 (16:38 -0700)
This is more consistent with the rest of the code now,
and is a bit more clear.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
src/librbd.cc

index 5e34e1623c4dc71b647f0c62305ad4b37c45d948..ebe7db2cd912e65cd83904e8d4751f46a45c2536 100644 (file)
@@ -801,15 +801,15 @@ int rbd_assign_bid(IoCtx& io_ctx, const string& info_oid, uint64_t *id)
   return 0;
 }
 
-
-int read_header_bl(IoCtx& io_ctx, const string& md_oid, bufferlist& header, uint64_t *ver)
+int read_header_bl(IoCtx& io_ctx, const string& header_oid,
+                  bufferlist& header, uint64_t *ver)
 {
   int r;
   uint64_t off = 0;
 #define READ_SIZE 4096
   do {
     bufferlist bl;
-    r = io_ctx.read(md_oid, bl, READ_SIZE, off);
+    r = io_ctx.read(header_oid, bl, READ_SIZE, off);
     if (r < 0)
       return r;
     header.claim_append(bl);
@@ -848,10 +848,11 @@ int notify_change(IoCtx& io_ctx, const string& oid, uint64_t *pver, ImageCtx *ic
   return 0;
 }
 
-int read_header(IoCtx& io_ctx, const string& md_oid, struct rbd_obj_header_ondisk *header, uint64_t *ver)
+int read_header(IoCtx& io_ctx, const string& header_oid,
+               struct rbd_obj_header_ondisk *header, uint64_t *ver)
 {
   bufferlist header_bl;
-  int r = read_header_bl(io_ctx, md_oid, header_bl, ver);
+  int r = read_header_bl(io_ctx, header_oid, header_bl, ver);
   if (r < 0)
     return r;
   if (header_bl.length() < (int)sizeof(*header))
@@ -861,12 +862,12 @@ int read_header(IoCtx& io_ctx, const string& md_oid, struct rbd_obj_header_ondis
   return 0;
 }
 
-int write_header(IoCtx& io_ctx, const string& md_oid, bufferlist& header)
+int write_header(IoCtx& io_ctx, const string& header_oid, bufferlist& header)
 {
   bufferlist bl;
-  int r = io_ctx.write(md_oid, header, header.length(), 0);
+  int r = io_ctx.write(header_oid, header, header.length(), 0);
 
-  notify_change(io_ctx, md_oid, NULL, NULL);
+  notify_change(io_ctx, header_oid, NULL, NULL);
 
   return r;
 }