All of lore.kernel.org
 help / color / mirror / Atom feed
From: Josh Durgin <josh.durgin@inktank.com>
To: Alex Elder <elder@inktank.com>
Cc: "ceph-devel@vger.kernel.org" <ceph-devel@vger.kernel.org>
Subject: Re: [PATCH] ceph: move max constant definitions
Date: Wed, 03 Apr 2013 11:38:46 -0700	[thread overview]
Message-ID: <515C7736.30203@inktank.com> (raw)
In-Reply-To: <5156067F.7070404@inktank.com>

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

On 03/29/2013 02:24 PM, Alex Elder wrote:
> Move some definitions for max integer values out of the rbd code and
> into the more central "decode.h" header file.  These really belong
> in a Linux (or libc) header somewhere, but I haven't gotten around
> to proposing that yet.
>
> This is in preparation for moving some code out of rbd.c and into
> the osd client.
>
> Signed-off-by: Alex Elder <elder@inktank.com>
> ---
>   drivers/block/rbd.c         |    7 -------
>   include/linux/ceph/decode.h |    7 +++++++
>   2 files changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c
> index d54a045..9c97204 100644
> --- a/drivers/block/rbd.c
> +++ b/drivers/block/rbd.c
> @@ -52,13 +52,6 @@
>   #define	SECTOR_SHIFT	9
>   #define	SECTOR_SIZE	(1ULL << SECTOR_SHIFT)
>
> -/* It might be useful to have these defined elsewhere */
> -
> -#define	U8_MAX	((u8)	(~0U))
> -#define	U16_MAX	((u16)	(~0U))
> -#define	U32_MAX	((u32)	(~0U))
> -#define	U64_MAX	((u64)	(~0ULL))
> -
>   #define RBD_DRV_NAME "rbd"
>   #define RBD_DRV_NAME_LONG "rbd (rados block device)"
>
> diff --git a/include/linux/ceph/decode.h b/include/linux/ceph/decode.h
> index 360d9d0..689f1df 100644
> --- a/include/linux/ceph/decode.h
> +++ b/include/linux/ceph/decode.h
> @@ -8,6 +8,13 @@
>
>   #include <linux/ceph/types.h>
>
> +/* This seemed to be the easiest place to define these */
> +
> +#define	U8_MAX	((u8)  (~0U))
> +#define	U16_MAX	((u16) (~0U))
> +#define	U32_MAX	((u32) (~0U))
> +#define	U64_MAX	((u64) (~0ULL))
> +
>   /*
>    * in all cases,
>    *   void **p     pointer to position pointer
>


      reply	other threads:[~2013-04-03 18:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-29 21:24 [PATCH] ceph: move max constant definitions Alex Elder
2013-04-03 18:38 ` Josh Durgin [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=515C7736.30203@inktank.com \
    --to=josh.durgin@inktank.com \
    --cc=ceph-devel@vger.kernel.org \
    --cc=elder@inktank.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.