All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] libceph: fix possible CONFIG_BLOCK build problem
@ 2013-04-05 22:17 Alex Elder
  2013-04-08 20:07 ` Josh Durgin
  0 siblings, 1 reply; 2+ messages in thread
From: Alex Elder @ 2013-04-05 22:17 UTC (permalink / raw)
  To: ceph-devel@vger.kernel.org

This patch:
    15a0d7b libceph: record message data length
did not enclose some bio-specific code inside CONFIG_BLOCK as
it should have.  Fix that.

Signed-off-by: Alex Elder <elder@inktank.com>
---
 include/linux/ceph/messenger.h |    2 ++
 net/ceph/messenger.c           |    4 +++-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/include/linux/ceph/messenger.h b/include/linux/ceph/messenger.h
index b832c0c..cdeebae 100644
--- a/include/linux/ceph/messenger.h
+++ b/include/linux/ceph/messenger.h
@@ -271,8 +271,10 @@ extern void ceph_msg_data_set_pages(struct ceph_msg
*msg, struct page **pages,
 				size_t length, size_t alignment);
 extern void ceph_msg_data_set_pagelist(struct ceph_msg *msg,
 				struct ceph_pagelist *pagelist);
+#ifdef CONFIG_BLOCK
 extern void ceph_msg_data_set_bio(struct ceph_msg *msg, struct bio *bio,
 				size_t length);
+#endif /* CONFIG_BLOCK */

 extern struct ceph_msg *ceph_msg_new(int type, int front_len, gfp_t flags,
 				     bool can_fail);
diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c
index a6fda95..994192b 100644
--- a/net/ceph/messenger.c
+++ b/net/ceph/messenger.c
@@ -817,7 +817,7 @@ static bool ceph_msg_data_bio_advance(struct
ceph_msg_data *data, size_t bytes)

 	return true;
 }
-#endif
+#endif /* CONFIG_BLOCK */

 /*
  * For a page array, a piece comes from the first page in the array
@@ -3011,6 +3011,7 @@ void ceph_msg_data_set_pagelist(struct ceph_msg *msg,
 }
 EXPORT_SYMBOL(ceph_msg_data_set_pagelist);

+#ifdef	CONFIG_BLOCK
 void ceph_msg_data_set_bio(struct ceph_msg *msg, struct bio *bio,
 		size_t length)
 {
@@ -3028,6 +3029,7 @@ void ceph_msg_data_set_bio(struct ceph_msg *msg,
struct bio *bio,
 	msg->data_length = length;
 }
 EXPORT_SYMBOL(ceph_msg_data_set_bio);
+#endif	/* CONFIG_BLOCK */

 /*
  * construct a new message with given type, size
-- 
1.7.9.5


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

* Re: [PATCH] libceph: fix possible CONFIG_BLOCK build problem
  2013-04-05 22:17 [PATCH] libceph: fix possible CONFIG_BLOCK build problem Alex Elder
@ 2013-04-08 20:07 ` Josh Durgin
  0 siblings, 0 replies; 2+ messages in thread
From: Josh Durgin @ 2013-04-08 20:07 UTC (permalink / raw)
  To: Alex Elder; +Cc: ceph-devel@vger.kernel.org

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

On 04/05/2013 03:17 PM, Alex Elder wrote:
> This patch:
>      15a0d7b libceph: record message data length
> did not enclose some bio-specific code inside CONFIG_BLOCK as
> it should have.  Fix that.
>
> Signed-off-by: Alex Elder <elder@inktank.com>
> ---
>   include/linux/ceph/messenger.h |    2 ++
>   net/ceph/messenger.c           |    4 +++-
>   2 files changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/include/linux/ceph/messenger.h b/include/linux/ceph/messenger.h
> index b832c0c..cdeebae 100644
> --- a/include/linux/ceph/messenger.h
> +++ b/include/linux/ceph/messenger.h
> @@ -271,8 +271,10 @@ extern void ceph_msg_data_set_pages(struct ceph_msg
> *msg, struct page **pages,
>   				size_t length, size_t alignment);
>   extern void ceph_msg_data_set_pagelist(struct ceph_msg *msg,
>   				struct ceph_pagelist *pagelist);
> +#ifdef CONFIG_BLOCK
>   extern void ceph_msg_data_set_bio(struct ceph_msg *msg, struct bio *bio,
>   				size_t length);
> +#endif /* CONFIG_BLOCK */
>
>   extern struct ceph_msg *ceph_msg_new(int type, int front_len, gfp_t flags,
>   				     bool can_fail);
> diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c
> index a6fda95..994192b 100644
> --- a/net/ceph/messenger.c
> +++ b/net/ceph/messenger.c
> @@ -817,7 +817,7 @@ static bool ceph_msg_data_bio_advance(struct
> ceph_msg_data *data, size_t bytes)
>
>   	return true;
>   }
> -#endif
> +#endif /* CONFIG_BLOCK */
>
>   /*
>    * For a page array, a piece comes from the first page in the array
> @@ -3011,6 +3011,7 @@ void ceph_msg_data_set_pagelist(struct ceph_msg *msg,
>   }
>   EXPORT_SYMBOL(ceph_msg_data_set_pagelist);
>
> +#ifdef	CONFIG_BLOCK
>   void ceph_msg_data_set_bio(struct ceph_msg *msg, struct bio *bio,
>   		size_t length)
>   {
> @@ -3028,6 +3029,7 @@ void ceph_msg_data_set_bio(struct ceph_msg *msg,
> struct bio *bio,
>   	msg->data_length = length;
>   }
>   EXPORT_SYMBOL(ceph_msg_data_set_bio);
> +#endif	/* CONFIG_BLOCK */
>
>   /*
>    * construct a new message with given type, size
>


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

end of thread, other threads:[~2013-04-08 20:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-05 22:17 [PATCH] libceph: fix possible CONFIG_BLOCK build problem Alex Elder
2013-04-08 20:07 ` Josh Durgin

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.