Commit 843a0d08 authored by Alex Elder's avatar Alex Elder

rbd: rename block_name -> object_prefix

In the on-disk image header structure there is a field "block_name"
which represents what we now call the "object prefix" for an rbd
image.  Rename this field "object_prefix" to be consistent with
modern usage.

This appears to be the only remaining vestige of the use of "block"
in symbols that represent objects in the rbd code.

This addresses http://tracker.newdream.net/issues/1761Signed-off-by: default avatarAlex Elder <elder@inktank.com>
Reviewed-by: default avatarJosh Durgin <josh.durgin@inktank.com>
Reviewed-by: default avatarDan Mick <dan.mick@inktank.com>
parent 7698f2f5
...@@ -522,11 +522,11 @@ static int rbd_header_from_disk(struct rbd_image_header *header, ...@@ -522,11 +522,11 @@ static int rbd_header_from_disk(struct rbd_image_header *header,
snap_count = le32_to_cpu(ondisk->snap_count); snap_count = le32_to_cpu(ondisk->snap_count);
size = sizeof (ondisk->block_name) + 1; size = sizeof (ondisk->object_prefix) + 1;
header->object_prefix = kmalloc(size, GFP_KERNEL); header->object_prefix = kmalloc(size, GFP_KERNEL);
if (!header->object_prefix) if (!header->object_prefix)
return -ENOMEM; return -ENOMEM;
memcpy(header->object_prefix, ondisk->block_name, size - 1); memcpy(header->object_prefix, ondisk->object_prefix, size - 1);
header->object_prefix[size - 1] = '\0'; header->object_prefix[size - 1] = '\0';
if (snap_count) { if (snap_count) {
......
...@@ -47,7 +47,7 @@ struct rbd_image_snap_ondisk { ...@@ -47,7 +47,7 @@ struct rbd_image_snap_ondisk {
struct rbd_image_header_ondisk { struct rbd_image_header_ondisk {
char text[40]; char text[40];
char block_name[24]; char object_prefix[24];
char signature[4]; char signature[4];
char version[8]; char version[8];
struct { struct {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment