Skip to contentSkip to conversation

libceph: fix possible CONFIG_BLOCK build problem

PATCH In review Alex Elder 2 participants 2 messages Apr 5, 2013 – Apr 8, 2013 Ceph common code (libceph)

lore
Share & tools
lore

Alex Elder

author
#0 lore raw

PATCH 1/1 libceph: fix possible CONFIG_BLOCK build problem

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

---
 include/linux/ceph/messenger.h |    2 ++
 net/ceph/messenger.c           |    4 +++-
 2 files changed, 5 insertions(+), 1 deletion(-)
include/linux/ceph/messenger.h +0 -0
index b832c0c..cdeebae 100644
@@ -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);

net/ceph/messenger.c +0 -0
index a6fda95..994192b 100644
@@ -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

Signature · 1 line
1.7.9.5
Reviewed-by on v1 1/1
#1 lore raw
Quoted 59 lines · Alex Elder

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

---
  include/linux/ceph/messenger.h |    2 ++
  net/ceph/messenger.c           |    4 +++-
  2 files changed, 5 insertions(+), 1 deletion(-)
include/linux/ceph/messenger.h +2 -0
index b832c0c..cdeebae 100644
@@ -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);

net/ceph/messenger.c +1 -1
index a6fda95..994192b 100644
@@ -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

net/ceph/messenger.c +2 -0
@@ -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