On Fri, Mar 08, 2013 at 02:40:46PM +0800, Yan, Zheng wrote:
> On 03/08/2013 02:27 PM, Dave Chinner wrote:
> > On Fri, Mar 08, 2013 at 10:43:00AM +0800, Yan, Zheng wrote:
> >> On 03/08/2013 10:04 AM, Dave Chinner wrote:
> >>> On Thu, Mar 07, 2013 at 07:37:36PM +0800, Yan, Zheng wrote:
> From: "
This series contains a bunch of small cleanups. All of
them I've created while working on other things, and most
of them were done in order to allow upcoming work to be
easier, or easier to understand. I've moved them all to
the front of my stack of patches and now I'm posting them
as a set for r
This is probably unnecessary but the code read as if it were wrong
in read_partial_message().
Signed-off-by: Alex Elder
---
include/linux/ceph/libceph.h |1 +
net/ceph/messenger.c |2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/include/linux/ceph/libceph.h b/
Some values printed are not (necessarily) in CPU order. We already
have a copy of the converted versions, so use them.
Signed-off-by: Alex Elder
---
net/ceph/messenger.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c
index b8d0
Change the type of the "more" parameter from int to bool.
Signed-off-by: Alex Elder
---
net/ceph/messenger.c |6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c
index d9ace97..962b2cd 100644
--- a/net/ceph/messenger.c
+++ b/net
There is only one caller for read_partial_message_bio(), and it
always passes &msg->bio_iter and &bio_seg as the second and third
arguments. Furthermore, the message in question is always the
connection's in_msg, and we can get that inside the called function.
So drop those two parameters and use
Define a new function in_msg_pos_next() to match out_msg_pos_next(),
and use it in place of code at the end of read_partial_message_pages()
and read_partial_message_bio().
Signed-off-by: Alex Elder
---
net/ceph/messenger.c | 57
--
1 file changed
While processing an outgoing pagelist (either the data pagelist or
trail) in a ceph message, the messenger cycles through each of the
pages on the list. This is accomplished in out_msg_pos_next(), if
the end of the first page on the list is reached, the first page is
moved to the end of the list.
Rather than explicitly initializing many fields to 0, NULL, or false
in a newly-allocated message, just use kzalloc() for allocating new
messages. This will become a much more convenient way of doing
things anyway for upcoming patches that abstract the data field.
Signed-off-by: Alex Elder
---
Record the byte count for an osd request rather than the page count.
The number of pages can always be derived from the byte count (and
alignment/offset) but the reverse is not true.
Signed-off-by: Alex Elder
---
drivers/block/rbd.c |2 +-
fs/ceph/addr.c | 33 +
On 03/09/2013 09:11 AM, Alex Elder wrote:
> This series contains a bunch of small cleanups. All of
> them I've created while working on other things, and most
> of them were done in order to allow upcoming work to be
> easier, or easier to understand. I've moved them all to
> the front of my stac
Over half of these have been reviewed already, but I'm re-posting
them because I've rebased them to be on top of the series I just
posted (that is, these are based on branch "review/wip-cleanup"
or 60b789f libceph: record byte count not page count), and because
I've added two more patches since the
Define a function ceph_msg_data_set_pages(), which more clearly
abstracts the assignment page-related fields for data in a ceph
message structure. Use this new function in the osd client and mds
client.
Ideally, these fields would never be set more than once (with
BUG_ON() calls to guarantee that
When setting page array information for message data, provide the
byte length rather than the page count ceph_msg_data_set_pages().
Signed-off-by: Alex Elder
---
fs/ceph/mds_client.c |2 +-
include/linux/ceph/messenger.h |2 +-
net/ceph/messenger.c |4 ++--
net/ce
Define ceph_msg_data_set_pagelist(), ceph_msg_data_set_bio(), and
ceph_msg_data_set_trail() to clearly abstract the assignment the
remaining data-related fields in a ceph message structure. Use the
new functions in the osd client and mds client.
This partially resolves:
http://tracker.ceph.co
Change it so we only assign outgoing data information for
messages if there is outgoing data to send.
This then allows us to add a few more (currently commented-out)
assertions.
This is related to:
http://tracker.ceph.com/issues/4284
Signed-off-by: Alex Elder
Reviewed-by: Greg Farnum
---
Record the number of bytes of data in a page array rather than the
number of pages in the array. It can be assumed that the page array
is of sufficient size to hold the number of bytes indicated (and
offset by the indicated alignment).
Signed-off-by: Alex Elder
---
include/linux/ceph/messenger.
When an incoming message is destined for the osd client, the
messenger calls the osd client's alloc_msg method. That function
looks up which request has the tid matching the incoming message,
and returns the request message that was preallocated to receive the
response. The response message is th
The mds client no longer tries to assign zero-length message data,
and the osd client no longer sets its data info more than once.
This allows us to activate assertions in the messenger to verify
these things never happen.
This resolves both of these:
http://tracker.ceph.com/issues/4263
ht
On 03/09/2013 10:00 AM, Alex Elder wrote:
> Over half of these have been reviewed already, but I'm re-posting
> them because I've rebased them to be on top of the series I just
> posted (that is, these are based on branch "review/wip-cleanup"
> or 60b789f libceph: record byte count not page count),
This patch is available in the branch "review/wip-msgr-refactor"
(prior to 6 other patches) in the ceph-client git repository.
That branch is based on branch "review/wip-abstract-2".
-Alex
At one time it was necessary to clear a message's bio_iter field to
This series factors out blocks of common code and generally
aims to simplify and make more consistent the way the ceph
messenger processes the data portions of both incoming and
outgoing messages.
They can be found in the "review/wip-msgr-refactor" branch of
the ceph-client git repository. (That
There are several places where a message's out_msg_pos or in_msg_pos
field is used repeatedly within a function. Use a local pointer
variable for this purpose to unclutter the code.
This and the upcoming cleanup patches are related to:
http://tracker.ceph.com/issues/4403
Signed-off-by: Alex
In prepare_write_message_data(), various fields are initialized in
preparation for writing message data out. Meanwhile, in
read_partial_message(), there is essentially the same block of code,
operating on message variables associated with an incoming message.
Generalize prepare_write_message_data
Define local variables page_offset and length to represent the range
of bytes within a page that will be sent by ceph_tcp_sendpage() in
write_partial_msg_pages().
Signed-off-by: Alex Elder
---
net/ceph/messenger.c | 17 +
1 file changed, 9 insertions(+), 8 deletions(-)
diff --
Pull the code that reads the data portion into a message into
a separate function read_partial_msg_data().
Rename write_partial_msg_pages() to be write_partial_message_data()
to match its read counterpart, and to reflect its more generic
purpose.
Signed-off-by: Alex Elder
---
net/ceph/messenger
Define a new function ceph_tcp_recvpage() that behaves in a way
comparable to ceph_tcp_sendpage().
Rearrange the code in both read_partial_message_pages() and
read_partial_message_bio() so they have matching structure,
(similar to what's in write_partial_msg_pages()), and use
this new function.
S
Factor out a common block of code that updates a CRC calculation
over a range of data in a page.
This and the preceding patches are related to:
http://tracker.ceph.com/issues/4403
Signed-off-by: Alex Elder
---
net/ceph/messenger.c | 47 ---
1 fi
The previously posted edition of this patch erroneously moved the
initialization of the message position information so it happened
every time the message was read rather than just when the message
was first initialized. This one no longer does that.
Pull the code that reads the data portion into
29 matches
Mail list logo