summaryrefslogtreecommitdiff
path: root/src/librbd.cc
diff options
context:
space:
mode:
authorJosh Durgin <josh.durgin@inktank.com>2012-06-08 07:54:02 -0700
committerJosh Durgin <josh.durgin@inktank.com>2012-06-08 16:38:22 -0700
commit127b42590162f5dfbedd5f20b685575e7810ae8d (patch)
treea1a0befec1b0c6c1d040e5f50294a088fc8e5c69 /src/librbd.cc
parentef38394f21805148380dda616cce6b87471cebb5 (diff)
downloadceph-127b42590162f5dfbedd5f20b685575e7810ae8d.tar.gz
librbd: rename md_oid parameters to header_oid
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>
Diffstat (limited to 'src/librbd.cc')
-rw-r--r--src/librbd.cc17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/librbd.cc b/src/librbd.cc
index 5e34e1623c4..ebe7db2cd91 100644
--- a/src/librbd.cc
+++ b/src/librbd.cc
@@ -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;
}