All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] rbd: rename block_name -> object_prefix
@ 2012-09-04 18:08 Alex Elder
  2012-09-04 20:57 ` Josh Durgin
  2012-09-04 20:59 ` Dan Mick
  0 siblings, 2 replies; 3+ messages in thread
From: Alex Elder @ 2012-09-04 18:08 UTC (permalink / raw)
  To: ceph-devel

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/1761

Signed-off-by: Alex Elder <elder@inktank.com>
---
 drivers/block/rbd.c       |    4 ++--
 drivers/block/rbd_types.h |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c
index fd51f9d..2b40a4a 100644
--- a/drivers/block/rbd.c
+++ b/drivers/block/rbd.c
@@ -522,11 +522,11 @@ static int rbd_header_from_disk(struct
rbd_image_header *header,

 	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);
 	if (!header->object_prefix)
 		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';

 	if (snap_count) {
diff --git a/drivers/block/rbd_types.h b/drivers/block/rbd_types.h
index 0924e9e..d9d8a77 100644
--- a/drivers/block/rbd_types.h
+++ b/drivers/block/rbd_types.h
@@ -47,7 +47,7 @@ struct rbd_image_snap_ondisk {

 struct rbd_image_header_ondisk {
 	char text[40];
-	char block_name[24];
+	char object_prefix[24];
 	char signature[4];
 	char version[8];
 	struct {
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] rbd: rename block_name -> object_prefix
  2012-09-04 18:08 [PATCH] rbd: rename block_name -> object_prefix Alex Elder
@ 2012-09-04 20:57 ` Josh Durgin
  2012-09-04 20:59 ` Dan Mick
  1 sibling, 0 replies; 3+ messages in thread
From: Josh Durgin @ 2012-09-04 20:57 UTC (permalink / raw)
  To: Alex Elder; +Cc: ceph-devel

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>

On 09/04/2012 11:08 AM, Alex Elder wrote:
> 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/1761
>
> Signed-off-by: Alex Elder <elder@inktank.com>
> ---
>   drivers/block/rbd.c       |    4 ++--
>   drivers/block/rbd_types.h |    2 +-
>   2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c
> index fd51f9d..2b40a4a 100644
> --- a/drivers/block/rbd.c
> +++ b/drivers/block/rbd.c
> @@ -522,11 +522,11 @@ static int rbd_header_from_disk(struct
> rbd_image_header *header,
>
>   	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);
>   	if (!header->object_prefix)
>   		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';
>
>   	if (snap_count) {
> diff --git a/drivers/block/rbd_types.h b/drivers/block/rbd_types.h
> index 0924e9e..d9d8a77 100644
> --- a/drivers/block/rbd_types.h
> +++ b/drivers/block/rbd_types.h
> @@ -47,7 +47,7 @@ struct rbd_image_snap_ondisk {
>
>   struct rbd_image_header_ondisk {
>   	char text[40];
> -	char block_name[24];
> +	char object_prefix[24];
>   	char signature[4];
>   	char version[8];
>   	struct {
>


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] rbd: rename block_name -> object_prefix
  2012-09-04 18:08 [PATCH] rbd: rename block_name -> object_prefix Alex Elder
  2012-09-04 20:57 ` Josh Durgin
@ 2012-09-04 20:59 ` Dan Mick
  1 sibling, 0 replies; 3+ messages in thread
From: Dan Mick @ 2012-09-04 20:59 UTC (permalink / raw)
  To: Alex Elder; +Cc: ceph-devel

Reviewed-by: Dan Mick <dan.mick@inktank.com>

On 09/04/2012 11:08 AM, Alex Elder wrote:
> 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/1761
>
> Signed-off-by: Alex Elder <elder@inktank.com>
> ---
>   drivers/block/rbd.c       |    4 ++--
>   drivers/block/rbd_types.h |    2 +-
>   2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c
> index fd51f9d..2b40a4a 100644
> --- a/drivers/block/rbd.c
> +++ b/drivers/block/rbd.c
> @@ -522,11 +522,11 @@ static int rbd_header_from_disk(struct
> rbd_image_header *header,
>
>   	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);
>   	if (!header->object_prefix)
>   		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';
>
>   	if (snap_count) {
> diff --git a/drivers/block/rbd_types.h b/drivers/block/rbd_types.h
> index 0924e9e..d9d8a77 100644
> --- a/drivers/block/rbd_types.h
> +++ b/drivers/block/rbd_types.h
> @@ -47,7 +47,7 @@ struct rbd_image_snap_ondisk {
>
>   struct rbd_image_header_ondisk {
>   	char text[40];
> -	char block_name[24];
> +	char object_prefix[24];
>   	char signature[4];
>   	char version[8];
>   	struct {
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-09-04 20:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-04 18:08 [PATCH] rbd: rename block_name -> object_prefix Alex Elder
2012-09-04 20:57 ` Josh Durgin
2012-09-04 20:59 ` Dan Mick

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.