提交 843a0d08 编写于 作者: A 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: NAlex Elder <elder@inktank.com>
Reviewed-by: NJosh Durgin <josh.durgin@inktank.com>
Reviewed-by: NDan Mick <dan.mick@inktank.com>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册