* [PATCH] libceph: drop pages parameter
@ 2013-03-13 1:02 Alex Elder
2013-03-14 19:48 ` Josh Durgin
0 siblings, 1 reply; 2+ messages in thread
From: Alex Elder @ 2013-03-13 1:02 UTC (permalink / raw)
To: ceph-devel
The "pages" parameter in read_partial_message_pages() is
unused, so get rid of it.
Signed-off-by: Alex Elder <elder@inktank.com>
---
net/ceph/messenger.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c
index 997dacc..0d54ca4 100644
--- a/net/ceph/messenger.c
+++ b/net/ceph/messenger.c
@@ -2176,10 +2176,11 @@ static int read_partial_message_section(struct
ceph_connection *con,
static int ceph_con_in_msg_alloc(struct ceph_connection *con, int *skip);
static int read_partial_message_pages(struct ceph_connection *con,
- struct page **pages,
unsigned int data_len, bool do_datacrc)
{
+ struct ceph_msg *msg = con->in_msg;
struct ceph_msg_pos *msg_pos = &con->in_msg_pos;
+ struct page **pages;
struct page *page;
size_t page_offset;
size_t length;
@@ -2187,6 +2188,7 @@ static int read_partial_message_pages(struct
ceph_connection *con,
int ret;
/* (page) data */
+ pages = msg->p.pages;
BUG_ON(pages == NULL);
page = pages[msg_pos->page];
page_offset = msg_pos->page_pos;
@@ -2258,8 +2260,8 @@ static int read_partial_msg_data(struct
ceph_connection *con)
data_len = le32_to_cpu(con->in_hdr.data_len);
while (msg_pos->data_pos < data_len) {
if (ceph_msg_has_pages(msg)) {
- ret = read_partial_message_pages(con, msg->p.pages,
- data_len, do_datacrc);
+ ret = read_partial_message_pages(con, data_len,
+ do_datacrc);
if (ret <= 0)
return ret;
#ifdef CONFIG_BLOCK
--
1.7.9.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] libceph: drop pages parameter
2013-03-13 1:02 [PATCH] libceph: drop pages parameter Alex Elder
@ 2013-03-14 19:48 ` Josh Durgin
0 siblings, 0 replies; 2+ messages in thread
From: Josh Durgin @ 2013-03-14 19:48 UTC (permalink / raw)
To: Alex Elder; +Cc: ceph-devel
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
On 03/12/2013 06:02 PM, Alex Elder wrote:
> The "pages" parameter in read_partial_message_pages() is
> unused, so get rid of it.
>
> Signed-off-by: Alex Elder <elder@inktank.com>
> ---
> net/ceph/messenger.c | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c
> index 997dacc..0d54ca4 100644
> --- a/net/ceph/messenger.c
> +++ b/net/ceph/messenger.c
> @@ -2176,10 +2176,11 @@ static int read_partial_message_section(struct
> ceph_connection *con,
> static int ceph_con_in_msg_alloc(struct ceph_connection *con, int *skip);
>
> static int read_partial_message_pages(struct ceph_connection *con,
> - struct page **pages,
> unsigned int data_len, bool do_datacrc)
> {
> + struct ceph_msg *msg = con->in_msg;
> struct ceph_msg_pos *msg_pos = &con->in_msg_pos;
> + struct page **pages;
> struct page *page;
> size_t page_offset;
> size_t length;
> @@ -2187,6 +2188,7 @@ static int read_partial_message_pages(struct
> ceph_connection *con,
> int ret;
>
> /* (page) data */
> + pages = msg->p.pages;
> BUG_ON(pages == NULL);
> page = pages[msg_pos->page];
> page_offset = msg_pos->page_pos;
> @@ -2258,8 +2260,8 @@ static int read_partial_msg_data(struct
> ceph_connection *con)
> data_len = le32_to_cpu(con->in_hdr.data_len);
> while (msg_pos->data_pos < data_len) {
> if (ceph_msg_has_pages(msg)) {
> - ret = read_partial_message_pages(con, msg->p.pages,
> - data_len, do_datacrc);
> + ret = read_partial_message_pages(con, data_len,
> + do_datacrc);
> if (ret <= 0)
> return ret;
> #ifdef CONFIG_BLOCK
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-03-14 19:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-13 1:02 [PATCH] libceph: drop pages parameter Alex Elder
2013-03-14 19:48 ` 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.