[PATCH 1/3] libceph: drop mutex while allocating a message

2013-03-04 Thread Alex Elder
connections define an alloc_msg method, and then handles them all the same way. Signed-off-by: Alex Elder el...@inktank.com --- net/ceph/messenger.c | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c index 0f9933a..6ec6051 100644

[PATCH 2/3] libceph: define mds_alloc_msg() method

2013-03-04 Thread Alex Elder
://tracker.ceph.com/issues/4322 Signed-off-by: Alex Elder el...@inktank.com --- fs/ceph/mds_client.c | 23 net/ceph/messenger.c | 59 -- 2 files changed, 42 insertions(+), 40 deletions(-) diff --git a/fs/ceph/mds_client.c b/fs/ceph

[PATCH 3/3] libceph: no need for alignment for mds message

2013-03-04 Thread Alex Elder
Currently, incoming mds messages never use page data, which means there is no need to set the page_alignment field in the message. Signed-off-by: Alex Elder el...@inktank.com --- fs/ceph/mds_client.c |1 - 1 file changed, 1 deletion(-) diff --git a/fs/ceph/mds_client.c b/fs/ceph

[PATCH 0/3] ceph: assign message data fields consistently

2013-03-04 Thread Alex Elder
Rearrange code so all the fields related to message data get assigned the same way throughout the ceph code. -Alex [PATCH 1/3] ceph: use calc_pages_for() in start_read() [PATCH 2/3] ceph: simplify ceph_sync_write() page_align calculation [PATCH 3/3]

[PATCH 1/3] ceph: use calc_pages_for() in start_read()

2013-03-04 Thread Alex Elder
is duplicated. Signed-off-by: Alex Elder el...@inktank.com --- fs/ceph/addr.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c index cfef3e0..a284a1f 100644 --- a/fs/ceph/addr.c +++ b/fs/ceph/addr.c @@ -314,7 +314,7 @@ static int start_read(struct

[PATCH 2/3] ceph: simplify ceph_sync_write() page_align calculation

2013-03-04 Thread Alex Elder
of which page the offset starts in--the only thing that matters is the offset within the starting page. We will have put the proper page offset to use into page_align, so just use that in calculating num_pages. This resolves: http://tracker.ceph.com/issues/4166 Signed-off-by: Alex Elder el

[PATCH 3/3] libceph: don't assign page info in ceph_osdc_new_request()

2013-03-04 Thread Alex Elder
way), so there's no need to recompute it. Move the assignment of the page alignment down with the others there as well. This and the next few patches are preparation work for: http://tracker.ceph.com/issues/4127 Signed-off-by: Alex Elder el...@inktank.com --- fs/ceph/addr.c

[PATCH 0/3] libceph: distinguish osd request read and write data

2013-03-04 Thread Alex Elder
Encapsulate information about osd request data into a separate data structure, and define separate instances of that structure for incoming and outgoing data. -Alex [PATCH 1/3] libceph: separate osd request data info [PATCH 2/3] libceph: distinguish page

[PATCH 1/3] libceph: separate osd request data info

2013-03-04 Thread Alex Elder
Pull the fields in an osd request structure that define the data for the request out into a separate structure. Signed-off-by: Alex Elder el...@inktank.com --- drivers/block/rbd.c |8 +++--- fs/ceph/addr.c | 59 +-- fs/ceph

[PATCH 2/3] libceph: distinguish page and bio requests

2013-03-04 Thread Alex Elder
An osd request uses either pages or a bio list for its data. Use a union to record information about the two, and add a data type tag to select between them. Signed-off-by: Alex Elder el...@inktank.com --- drivers/block/rbd.c |4 +++ fs/ceph/file.c |1

[PATCH 3/3] libceph: separate read and write data

2013-03-04 Thread Alex Elder
: http://tracker.ceph.com/issues/4127 Signed-off-by: Alex Elder el...@inktank.com --- drivers/block/rbd.c | 18 + fs/ceph/addr.c | 67 --- fs/ceph/file.c | 10 ++--- include/linux/ceph/osd_client.h |5

Re: [PATCH 1/3] libceph: drop mutex while allocating a message

2013-03-04 Thread Alex Elder
On 03/04/2013 01:07 PM, Gregory Farnum wrote: On Mon, Mar 4, 2013 at 10:12 AM, Alex Elder el...@inktank.com wrote: In ceph_con_in_msg_alloc(), if no alloc_msg method is defined for a connection a new message is allocated with ceph_msg_new(). Drop the mutex before making this call, and make

Re: [PATCH 2/3] libceph: define mds_alloc_msg() method

2013-03-04 Thread Alex Elder
On 03/04/2013 01:05 PM, Gregory Farnum wrote: This looks like a faithful reshuffling to me. But... On Mon, Mar 4, 2013 at 10:12 AM, Alex Elder el...@inktank.com wrote: diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c index 6ec6051..c7d4278 100644 --- a/net/ceph/messenger.c +++ b

[PATCH] libceph: complete lingering requests only once

2013-02-28 Thread Alex Elder
a request--including lingering ones--will get completed (from the perspective of the user of the osd client) exactly once. This resolves: http://tracker.ceph.com/issues/3967 Signed-off-by: Alex Elder el...@inktank.com --- include/linux/ceph/osd_client.h |1 + net/ceph/osd_client.c

[PATCH] libceph: fix a osd request memory leak

2013-02-25 Thread Alex Elder
calc_layout() will return is 0, so make that explicit in the successful case. This resolves: http://tracker.ceph.com/issues/4240 Signed-off-by: Alex Elder el...@inktank.com --- net/ceph/osd_client.c |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/net/ceph/osd_client.c b

[PATCH] libceph: make ceph_msg-bio_seg be unsigned

2013-02-25 Thread Alex Elder
everywhere else. Signed-off-by: Alex Elder el...@inktank.com --- include/linux/ceph/messenger.h |2 +- net/ceph/messenger.c | 16 +--- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/include/linux/ceph/messenger.h b/include/linux/ceph/messenger.h index 60903e0

[PATCH 0/3] libceph: focus calc_layout() on filling in the osd op

2013-02-25 Thread Alex Elder
This series refactors the code involved with identifying the details of the name, offset, and length of an object involved with an osd request based on a file layout. It makes the focus of calc_layout() be filling in an osd op structure based on the file layout it is provided. The caller

[PATCH 1/3] libceph: pass object number back to calc_layout() caller

2013-02-25 Thread Alex Elder
Have calc_layout() pass the computed object number back to its caller. (This is a small step to simplify review.) Signed-off-by: Alex Elder el...@inktank.com --- net/ceph/osd_client.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/net/ceph/osd_client.c b/net

[PATCH 2/3] libceph: format target object name in caller

2013-02-25 Thread Alex Elder
Move the formatting of the object name (oid) to use for an object request into the caller of calc_layout(). This makes the vino parameter no longer necessary, so get rid of it. Signed-off-by: Alex Elder el...@inktank.com --- net/ceph/osd_client.c | 12 +--- 1 file changed, 5

[PATCH 3/3] libceph: don't pass request to calc_layout()

2013-02-25 Thread Alex Elder
, however, that the only caller is ceph_osdc_new_request(), and that immediately overwrites those fields with values based on its passed-in page offset. So the assignment inside calc_layout() was redundant anyway. This resolves: http://tracker.ceph.com/issues/4262 Signed-off-by: Alex Elder el

[PATCH 0/4] libceph: abstract setting message data info

2013-02-25 Thread Alex Elder
This series makes the fields related to the data portion of a ceph message not get manipulated by code outside the ceph messenger. It implements some interface functions that can be used to assign data-related fields. Doing this will allow the way message data is managed to be changed

[PATCH 1/4] libceph: distinguish page array and pagelist count

2013-02-25 Thread Alex Elder
Use distinct fields for tracking the number of pages in a message's page array and in a message's page list. Currently only one or the other is used at a time, but that will be changing soon. Signed-off-by: Alex Elder el...@inktank.com --- fs/ceph/mds_client.c |4 ++-- include

[PATCH 2/4] libceph: set page alignment in start_request()

2013-02-25 Thread Alex Elder
-by: Alex Elder el...@inktank.com --- net/ceph/osd_client.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/ceph/osd_client.c b/net/ceph/osd_client.c index 0a4d4a0..1bb2b59 100644 --- a/net/ceph/osd_client.c +++ b/net/ceph/osd_client.c @@ -369,7 +369,6 @@ void

[PATCH 3/4] libceph: isolate message page field manipulation

2013-02-25 Thread Alex Elder
. Rearrange the field order in a ceph_msg structure to group those that are used to define the possible data payloads. Signed-off-by: Alex Elder el...@inktank.com --- fs/ceph/mds_client.c |4 ++-- include/linux/ceph/messenger.h | 22 +- net/ceph/messenger.c

[PATCH 4/4] libceph: isolate other message data fields

2013-02-25 Thread Alex Elder
functions in the osd client and mds client. Signed-off-by: Alex Elder el...@inktank.com --- fs/ceph/mds_client.c |4 ++-- include/linux/ceph/messenger.h |6 ++ net/ceph/messenger.c | 28 net/ceph/osd_client.c |6 +++--- 4 files

[PATCH] rbd: ignore zero-length requests

2013-02-22 Thread Alex Elder
. This resolves: http://tracker.ceph.com/issues/4237 Signed-off-by: Alex Elder el...@inktank.com --- drivers/block/rbd.c | 19 --- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c index b0eea3e..3cc003b 100644 --- a/drivers

[PATCH] rbd: barriers are hard

2013-02-22 Thread Alex Elder
barrier just to put this issue to bed. This resolves: http://tracker.ceph.com/issues/4238 Signed-off-by: Alex Elder el...@inktank.com --- drivers/block/rbd.c | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c index

[PATCH] rbd: normalize dout() calls

2013-02-22 Thread Alex Elder
. (Note that there remain some older dout() calls that are left untouched by this patch.) Issue a warning if rbd_osd_write_callback() ever gets a short write. This resolves: http://tracker.ceph.com/issues/4235 Signed-off-by: Alex Elder el...@inktank.com --- drivers/block/rbd.c | 66

[PATCH] libceph: define connection flag helpers

2013-02-22 Thread Alex Elder
Define and use functions that encapsulate operations performed on a connection's flags. This resolves: http://tracker.ceph.com/issues/4234 Signed-off-by: Alex Elder el...@inktank.com --- net/ceph/messenger.c | 107 -- 1 file changed, 78

Updated sparse warning message patches

2013-02-22 Thread Alex Elder
I'm re-posting these patches because I've updated them to be based on the patches I just posted (Four miscellaneous patches). These patches are available in the branch test/wip-4184 in the ceph-client git repository. That branch is based on branch test/wip-4234,5,7,8. (Here's the original

[PATCH, v2] rbd: eliminate sparse warnings

2013-02-22 Thread Alex Elder
to rbd_request_fn(), because it releases a lock before acquiring it again. This partially resolves: http://tracker.ceph.com/issues/4184 Reported-by: Fengguang Wu fengguang...@intel.com Signed-off-by: Alex Elder el...@inktank.com --- v2: rebased drivers/block/rbd.c | 12 +++- 1 file changed

[PATCH 0/5, v2] libceph clean up con_work()

2013-02-22 Thread Alex Elder
(Re-posting because these changes have been rebased.) This series cleans up con_work() a bit. The original motivation was to get rid of a warning issued by the sparse utility, but addressing that required a little rework and it was fairly straightforward once that was done to make that function

[PATCH 2/5] libceph: separate non-locked fault handling

2013-02-22 Thread Alex Elder
Signed-off-by: Alex Elder el...@inktank.com --- v2: rebased net/ceph/messenger.c | 42 +++--- 1 file changed, 23 insertions(+), 19 deletions(-) diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c index 9a29d8a..c3b9060 100644 --- a/net/ceph/messenger.c

[PATCH 3/5, v2] libceph: use a flag to indicate a fault has occurred

2013-02-22 Thread Alex Elder
This just rearranges the logic in con_work() a little bit so that a flag is used to indicate a fault has occurred. This allows both the fault and non-fault case to be handled the same way and avoids a couple of nearly consecutive gotos. Signed-off-by: Alex Elder el...@inktank.com --- v2: rebased

[PATCH 4/5, v2] libceph: use a do..while loop in con_work()

2013-02-22 Thread Alex Elder
in two steps in order to facilitate review. The This patch will be squashed into the next one before commit. next patch simply indents the loop properly. Signed-off-by: Alex Elder el...@inktank.com --- v2: rebased net/ceph/messenger.c | 39 --- 1 file

[PATCH 5/5, v2] libceph: indent properly

2013-02-22 Thread Alex Elder
This is just the second part of a two-part patch. It simply indents a block of code. This patch is going to be merged into its predecessor following review. Signed-off-by: Alex Elder el...@inktank.com --- v2: rebased net/ceph/messenger.c | 80

Re: [PATCH 2/5] libceph: separate non-locked fault handling

2013-02-22 Thread Alex Elder
On 02/22/2013 11:26 AM, Alex Elder wrote: An error occurring on a ceph connection is treated as a fault, causing the connection to be reset. The initial part of this fault handling has to be done while holding the connection mutex, but it must then be dropped for the last part. . . . Sorry

Sparse Warning Message Patches

2013-02-19 Thread Alex Elder
What follows is a few series of patches that get rid of code issues that lead to warnings from the sparse utility. The first three patches address the warnings in the rbd, ceph file system, and libceph code respectively. After that, one warning remains in libceph, and that is addressed by a

[PATCH] rbd: eliminate sparse warnings

2013-02-19 Thread Alex Elder
to rbd_request_fn(), because it releases a lock before acquiring it again. This partially resolves: http://tracker.ceph.com/issues/4184 Reported-by: Fengguang Wu fengguang...@intel.com Signed-off-by: Alex Elder el...@inktank.com --- drivers/block/rbd.c | 12 +++- 1 file changed, 7 insertions

[PATCH] ceph: eliminate sparse warnings in fs code

2013-02-19 Thread Alex Elder
Fix the causes for sparse warnings reported in the ceph file system code. Here there are only two (and they're sort of silly but they're easy to fix). This partially resolves: http://tracker.ceph.com/issues/4184 Reported-by: Fengguang Wu fengguang...@intel.com Signed-off-by: Alex Elder el

[PATCH] libceph: eliminate sparse warnings

2013-02-19 Thread Alex Elder
resolves: http://tracker.ceph.com/issues/4184 Reported-by: Fengguang Wu fengguang...@intel.com Signed-off-by: Alex Elder el...@inktank.com --- net/ceph/crypto.c |7 --- net/ceph/messenger.c |2 +- net/ceph/mon_client.c |2 +- 3 files changed, 6 insertions(+), 5 deletions

[PATCH 0/5] libceph clean up con_work()

2013-02-19 Thread Alex Elder
This series cleans up con_work() a bit. The original motivation was to get rid of a warning issued by the sparse utility, but addressing that required a little rework and it was fairly straightforward once that was done to make that function fairly simple. The problem sparse reported was really

[PATCH 1/5] libceph: encapsulate connection backoff

2013-02-19 Thread Alex Elder
report the connection pointer like the rest. Signed-off-by: Alex Elder el...@inktank.com --- net/ceph/messenger.c | 37 - 1 file changed, 24 insertions(+), 13 deletions(-) diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c index ab702cd..686973c 100644

[PATCH 3/5] libceph: use a flag to indicate a fault has occurred

2013-02-19 Thread Alex Elder
This just rearranges the logic in con_work() a little bit so that a flag is used to indicate a fault has occurred. This allows both the fault and non-fault case to be handled the same way and avoids a couple of nearly consecutive gotos. Signed-off-by: Alex Elder el...@inktank.com --- net/ceph

[PATCH 4/5] libceph: use a do..while loop in con_work()

2013-02-19 Thread Alex Elder
will be squashed into the next one before commit. next patch simply indents the loop properly. Signed-off-by: Alex Elder el...@inktank.com --- net/ceph/messenger.c | 32 +--- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/net/ceph/messenger.c b/net/ceph

[PATCH 5/5] libceph: indent properly

2013-02-19 Thread Alex Elder
This is just the second part of a two-part patch. It simply indents a block of code. This patch is going to be merged into its predecessor following review. Signed-off-by: Alex Elder el...@inktank.com --- net/ceph/messenger.c | 80 +- 1 file

[PATCH 2/5] libceph: separate non-locked fault handling

2013-02-19 Thread Alex Elder
Signed-off-by: Alex Elder el...@inktank.com --- net/ceph/messenger.c | 42 +++--- 1 file changed, 23 insertions(+), 19 deletions(-) diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c index 686973c..0fe9cbd 100644 --- a/net/ceph/messenger.c +++ b/net/ceph

[PATCH 0/4] libceph: get rid of some unneeded function parameters

2013-02-16 Thread Alex Elder
This series eliminates some unneeded parameters from functions in the osd client. -Alex [PATCH 1/4] ceph: kill ceph_osdc_writepages() nofail parameter [PATCH 2/4] ceph: kill ceph_osdc_writepages() dosync parameter [PATCH 3/4] ceph: kill

[PATCH 1/4] ceph: kill ceph_osdc_writepages() nofail parameter

2013-02-16 Thread Alex Elder
://tracker.ceph.com/issues/4126 Signed-off-by: Alex Elder el...@inktank.com --- fs/ceph/addr.c |2 +- include/linux/ceph/osd_client.h |2 +- net/ceph/osd_client.c |6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c index

[PATCH 2/4] ceph: kill ceph_osdc_writepages() dosync parameter

2013-02-16 Thread Alex Elder
There is only one caller of ceph_osdc_writepages(), and it always passes 0 as its dosync argument. Get rid of that argument and replace its use in ceph_osdc_writepages() with 0. Signed-off-by: Alex Elder el...@inktank.com --- fs/ceph/addr.c |2 +- include/linux/ceph

[PATCH 4/4] ceph: kill ceph_osdc_new_request() num_reply

2013-02-16 Thread Alex Elder
-by: Alex Elder el...@inktank.com --- fs/ceph/addr.c |4 ++-- fs/ceph/file.c |2 +- include/linux/ceph/osd_client.h |3 +-- net/ceph/osd_client.c |6 +++--- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/fs/ceph/addr.c b/fs/ceph

[PATCH 1/3] libceph: lock outside send_queued()

2013-02-16 Thread Alex Elder
in the file with respect to the lock. Signed-off-by: Alex Elder el...@inktank.com --- net/ceph/osd_client.c | 19 +-- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/net/ceph/osd_client.c b/net/ceph/osd_client.c index d3e7513..edda070 100644 --- a/net/ceph

[PATCH 0/2] libceph: get rid of unused one shot event support

2013-02-16 Thread Alex Elder
The osd client supports a one shot event, but nobody ever uses it. It probably works right, but it's effectively dead code, so just get rid of it. Get rid of ceph_osd_wait_event() as well, because whatever purpose it served was probably related to using a one shot event.

[PATCH 3/4] ceph: kill ceph_osdc_writepages() flags parameter

2013-02-16 Thread Alex Elder
There is only one caller of ceph_osdc_writepages(), and it always passes 0 as its flags argument. Get rid of that argument and replace its use in ceph_osdc_writepages() with 0. Signed-off-by: Alex Elder el...@inktank.com --- fs/ceph/addr.c |3 +-- include/linux/ceph

[PATCH 0/3] libceph: update rados.h and related code

2013-02-16 Thread Alex Elder
The ceph kernel and user space code bases have a few header files in common, but because they're maintained separately they sometimes diverge. This series updates include/linux/ceph/rados.h to nearly match its user space counterpart in src/include/rados.h. There are still a few things that

[PATCH 2/3] libceph: add ceph_osd_state_name()

2013-02-16 Thread Alex Elder
Add the definition of ceph_osd_state_name(), to match its counterpart in user space. Signed-off-by: Alex Elder el...@inktank.com --- include/linux/ceph/rados.h |2 ++ net/ceph/ceph_strings.c| 15 +++ 2 files changed, 17 insertions(+) diff --git a/include/linux/ceph/rados.h

[PATCH 3/3] libceph: update ceph_osd_op_name()

2013-02-16 Thread Alex Elder
Update ceph_osd_op_name() to include the newly-added definitions in rados.h, and to match its counterpart in the user space code. Signed-off-by: Alex Elder el...@inktank.com --- net/ceph/ceph_strings.c | 24 1 file changed, 24 insertions(+) diff --git a/net/ceph

[PATCH 0/2] libceph: update osd_req_encode_op()

2013-02-16 Thread Alex Elder
This series just modifies osd_req_encode_op so it is more informative, distinguishing between defined but not supported opcodes and garbage opcodes. -Alex [PATCH 1/2] libceph: report defined but unsupported osd ops [PATCH 2/2] libceph: remove dead code in

[PATCH 2/2] libceph: remove dead code in osd_req_encode_op()

2013-02-16 Thread Alex Elder
this effectively dead code, and report uses of the previously handled cases as unsupported. Signed-off-by: Alex Elder el...@inktank.com --- net/ceph/osd_client.c | 31 +-- 1 file changed, 5 insertions(+), 26 deletions(-) diff --git a/net/ceph/osd_client.c b/net/ceph

[PATCH 0/3] libceph: update ceph_fs.h and related code

2013-02-16 Thread Alex Elder
This series updates include/linux/ceph/ceph_fs.h to nearly match its user space counterpart in src/include/ceph_fs.h. There are still a few things that should be reconciled by updating that user space code; that work is covered by: http://tracker.ceph.com/issues/4168

[PATCH 1/2] libceph: update ceph_fs.h

2013-02-16 Thread Alex Elder
unused symbols - added or revised comments There were some differences between the struct definitions for ceph_mon_subscribe_item and the open field of ceph_mds_request_args; those differences remain. This and the next commit resolve: http://tracker.ceph.com/issues/4165 Signed-off-by: Alex

[PATCH 2/2] libceph: update ceph_mds_state_name() and ceph_mds_op_name()

2013-02-16 Thread Alex Elder
Update ceph_mds_state_name() and ceph_mds_op_name() to include the newly-added definitions in ceph_fs.h, and to match its counterpart in the user space code. Signed-off-by: Alex Elder el...@inktank.com --- fs/ceph/strings.c |4 1 file changed, 4 insertions(+) diff --git a/fs/ceph

[PATCH] ceph: simplify ceph_sync_write() page_align, calculation

2013-02-16 Thread Alex Elder
put the proper page offset to use into page_align, so just use that in calculating num_pages. This resolves: http://tracker.ceph.com/issues/4166 Signed-off-by: Alex Elder el...@inktank.com --- fs/ceph/file.c | 18 +- 1 file changed, 5 insertions(+), 13 deletions(-) diff

[PATCH] rbd: add parentheses to object request iterator macros

2013-02-08 Thread Alex Elder
The for_each_obj_request*() macros should parenthesize their uses of the ireq parameter. Signed-off-by: Alex Elder el...@inktank.com --- drivers/block/rbd.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c index 982963e

[PATCH] libceph: allow STAT osd operations

2013-02-08 Thread Alex Elder
/4007 Signed-off-by: Alex Elder el...@inktank.com --- drivers/block/rbd.c | 15 +++ net/ceph/osd_client.c |3 ++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c index 6e9e2c2..37361bd 100644 --- a/drivers/block/rbd.c

[PATCH 0/5] ceph: cleanup ceph page vector functions

2013-02-08 Thread Alex Elder
This series does some cleanup related to some functions that implement ceph page vectors. Together, these resolve: http://tracker.ceph.com/issues/4053 -Alex [PATCH 1/5] ceph: remove a few bogus declarations [PATCH 2/5] libceph: use void pointers in

[PATCH 1/5] ceph: remove a few bogus declarations

2013-02-08 Thread Alex Elder
There are three ceph page vector functions declared in fs/ceph/super.h that don't belong there. They're probably left over from some long-ago code reorganization. They're properly declared in include/linux/ceph/libceph.h so just delete the ones in super.h. Signed-off-by: Alex Elder el

[PATCH 2/5] libceph: use void pointers in page vector functions

2013-02-08 Thread Alex Elder
arithmetic on char pointers.) Signed-off-by: Alex Elder el...@inktank.com --- include/linux/ceph/libceph.h | 10 +- net/ceph/pagevec.c | 10 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/include/linux/ceph/libceph.h b/include/linux/ceph/libceph.h index

[PATCH 3/5] rbd: prevent bytes transferred overflow

2013-02-08 Thread Alex Elder
In rbd_obj_read_sync(), verify the number of bytes transferred won't exceed what can be represented by a size_t before using it to indicate the number of bytes to copy to the result buffer. (The real motivation for this is to prepare for the next patch.) Signed-off-by: Alex Elder el

[PATCH 4/5] rbd: ignore result of ceph_copy_from_page_vector()

2013-02-08 Thread Alex Elder
ceph_copy_from_page_vector() provides. Signed-off-by: Alex Elder el...@inktank.com --- drivers/block/rbd.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c index 99f1a29..958e733 100644 --- a/drivers/block/rbd.c +++ b/drivers/block

[PATCH 5/5] libceph: drop return value from page vector copy routines

2013-02-08 Thread Alex Elder
The return values provided for ceph_copy_to_page_vector() and ceph_copy_from_page_vector() serve no purpose, so get rid of them. Signed-off-by: Alex Elder el...@inktank.com --- drivers/block/rbd.c |5 ++--- include/linux/ceph/libceph.h |4 ++-- net/ceph/pagevec.c

[PATCH] rbd: add barriers near done flag operations

2013-02-06 Thread Alex Elder
Somehow, I missed this little item in Documentation/atomic_ops.txt: *** WARNING: atomic_read() and atomic_set() DO NOT IMPLY BARRIERS! *** Create and use some helper functions that include the proper memory barriers for manipulating the done field. Signed-off-by: Alex Elder el...@inktank.com

[PATCH] rbd: turn off interrupts for open/remove locking

2013-02-05 Thread Alex Elder
of the spinlocks. Fix that. Signed-off-by: Alex Elder el...@inktank.com --- drivers/block/rbd.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c index 14a6967..91983a60 100644 --- a/drivers/block/rbd.c +++ b/drivers/block/rbd.c

Re: [PATCH 2/2] rbd: don't take extra bio reference for osd client

2013-01-31 Thread Alex Elder
a lot. -Alex On 01/30/2013 12:49 PM, Alex Elder wrote: Currently, if the OSD client finds an osd request has had a bio list attached to it, it drops a reference to it (or rather, to the first entry on that list) when the request is released. The code

[PATCH] libceph: don't require r_num_pages for bio requests

2013-01-31 Thread Alex Elder
r_pages in a debug message inappropriately, and also invalidate the r_con_filling_msg pointer after dropping a reference to it. This resolves: http://tracker.ceph.com/issues/3875 Signed-off-by: Alex Elder el...@inktank.com --- drivers/block/rbd.c |2 -- net/ceph/osd_client.c |7

[PATCH] libceph: fix messenger CONFIG_BLOCK dependencies

2013-01-31 Thread Alex Elder
://tracker.ceph.com/issues/3976 Signed-off-by: Alex Elder el...@inktank.com --- include/linux/ceph/messenger.h |2 ++ net/ceph/messenger.c |5 - 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/include/linux/ceph/messenger.h b/include/linux/ceph/messenger.h index

Re: [PATCH 4/4] rbd: don't drop watch requests on completion

2013-01-30 Thread Alex Elder
On 01/30/2013 01:43 PM, Josh Durgin wrote: On 01/26/2013 12:41 PM, Alex Elder wrote: The new request code arranges to get a callback for every osd request we submit (this was not the case previously). We register a lingering object watch request for the header object for each mapped rbd

[PATCH 0/2] libceph: osd_client should not take bio reference

2013-01-30 Thread Alex Elder
Currently when the osd client gets a request that involves a bio list, it assumes the initiator (the rbd client) has taken an extra reference to the first bio on that list. When the request is done, the initiator calls ceph_osdc_release_request() and at that time the osd client drops that

[PATCH 1/2] libceph: add a compatibility check interface

2013-01-30 Thread Alex Elder
://tracker.ceph.com/issues/3800 Signed-off-by: Alex Elder el...@inktank.com --- include/linux/ceph/libceph.h |2 ++ net/ceph/ceph_common.c | 16 2 files changed, 18 insertions(+) diff --git a/include/linux/ceph/libceph.h b/include/linux/ceph/libceph.h index 084d3c6

[PATCH 2/2] rbd: don't take extra bio reference for osd client

2013-01-30 Thread Alex Elder
in rbd_osd_req_create(). This change could lead to a crash if old libceph.ko was used with new rbd.ko. Add a compatibility check at rbd initialization time to avoid this possibilty. This resolves: http://tracker.ceph.com/issues/3798and http://tracker.ceph.com/issues/3799 Signed-off-by: Alex Elder

Re: [PATCH 2/2] rbd: prevent open for image being removed

2013-01-30 Thread Alex Elder
On 01/30/2013 01:52 PM, Josh Durgin wrote: Enums should be capitalized according to Documentation/CodingStyle. I already updated that in my own copy after last time... Thanks. -Alex Other than that, looks good. Reviewed-by: Josh Durgin

Re: [PATCH 4/4] rbd: don't drop watch requests on completion

2013-01-30 Thread Alex Elder
On 01/30/2013 02:39 PM, Josh Durgin wrote: On 01/30/2013 12:38 PM, Alex Elder wrote: On 01/30/2013 01:43 PM, Josh Durgin wrote: On 01/26/2013 12:41 PM, Alex Elder wrote: The new request code arranges to get a callback for every osd request we submit (this was not the case previously). We

Re: [PATCH 01/12, v2] rbd: new request tracking code

2013-01-29 Thread Alex Elder
On 01/29/2013 04:43 AM, Josh Durgin wrote: On 01/24/2013 06:08 AM, Alex Elder wrote: This is an update of the first patch in my request tracking code series. After posting it the other day I identified some problems related to reference counting of image and object requests. I also am

[PATCH 0/2] rbd: manage racing opens/removes

2013-01-28 Thread Alex Elder
A recent change to rbd prevented rbd devices from being unmapped when they were in use. However that change did not address a different, but related problem. It is possible for an open (the one that would bump the open count from 0 to 1) to begin after a request to remove the rbd device has

[PATCH 1/2] rbd: define flags field, use it for exists flag

2013-01-28 Thread Alex Elder
Define a new rbd device flags field, manipulated using bit operations. Replace the use of the current exists flag with a bit in this new flags field. Add a little commentary about the exists flag, which does not need to be manipulated atomically. Signed-off-by: Alex Elder el...@inktank.com

[PATCH 2/2] rbd: prevent open for image being removed

2013-01-28 Thread Alex Elder
/issues/3427 Reported-by: Maciej Galkiewicz maciejgalkiew...@ragnarson.com Signed-off-by: Alex Elder el...@inktank.com --- drivers/block/rbd.c | 42 +- 1 file changed, 33 insertions(+), 9 deletions(-) diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c

[PATCH 0/4] rbd: keep reference to lingering object requests

2013-01-26 Thread Alex Elder
This series applies on top of the new rbd request code. When an osd request is marked to linger the osd client will keep a copy of the request, and will resubmit it if necessary. If it gets resubmitted, it will also call the completion routine again, and because of that we need to make sure the

[PATCH 1/4] rbd: unregister linger in watch sync routine

2013-01-26 Thread Alex Elder
Move the code that unregisters an rbd device's lingering header object watch request into rbd_dev_header_watch_sync(), so it occurs in the same function that originally sets up that request. Signed-off-by: Alex Elder el...@inktank.com --- drivers/block/rbd.c | 10 -- 1 file changed, 4

[PATCH 4/4] rbd: don't drop watch requests on completion

2013-01-26 Thread Alex Elder
the pointer once it's been torn down. Signed-off-by: Alex Elder el...@inktank.com --- drivers/block/rbd.c | 31 ++- 1 file changed, 22 insertions(+), 9 deletions(-) diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c index 340773f..177ba0c 100644 --- a/drivers

[PATCH 01/12, v2] rbd: new request tracking code

2013-01-24 Thread Alex Elder
/issues/3741 Signed-off-by: Alex Elder el...@inktank.com --- v2: - fixed reference counting - image request callback support - image/object connection helper functions - distinct BAD_WHICH value for non-image object requests drivers/block/rbd.c | 622

Re: [PATCH 01/12, v2] rbd: new request tracking code

2013-01-24 Thread Alex Elder
On 01/24/2013 08:08 AM, Alex Elder wrote: The remaining patches in the series have changed accordingly, but they have not really changed substantively, so I am not re-posting those (but will if it's requested). This was requested. So I'm going to re-post the remainder of the series. They'll

[PATCH 02/12, v2] rbd: kill rbd_rq_fn() and all other related code

2013-01-24 Thread Alex Elder
Now that the request function has been replaced by one using the new request management data structures the old one can go away. Deleting it makes rbd_dev_do_request() no longer needed, and deleting that makes other functions unneeded, and so on. Signed-off-by: Alex Elder el...@inktank.com

[PATCH 03/12, v2] rbd: kill rbd_req_coll and rbd_request

2013-01-24 Thread Alex Elder
for the callback function. And since that's the only use of *that* structure, it too can be eliminated. Signed-off-by: Alex Elder el...@inktank.com --- drivers/block/rbd.c | 58 +++ 1 file changed, 3 insertions(+), 55 deletions(-) diff --git a/drivers/block

[PATCH 04/12, v2] rbd: implement sync object read with new code

2013-01-24 Thread Alex Elder
type. This implements a new mechanism to allow the caller to wait for completion for an rbd_obj_request by calling rbd_obj_request_wait(). This partially resolves: http://tracker.newdream.net/issues/3755 Signed-off-by: Alex Elder el...@inktank.com --- drivers/block/rbd.c | 96

[PATCH 05/12, v2] rbd: get rid of rbd_req_sync_read()

2013-01-24 Thread Alex Elder
Delete rbd_req_sync_read() is no longer used, so get rid of it. Signed-off-by: Alex Elder el...@inktank.com --- drivers/block/rbd.c | 24 1 file changed, 24 deletions(-) diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c index 742236b..750fc73 100644 --- a/drivers

[PATCH 06/12, v2] rbd: implement watch/unwatch with new code

2013-01-24 Thread Alex Elder
Implement a new function to set up or tear down a watch event for an mapped rbd image header using the new request code. Create a new object request type nodata to handle this. And define rbd_osd_trivial_callback() which simply marks a request done. Signed-off-by: Alex Elder el...@inktank.com

[PATCH 07/12, v2] rbd: get rid of rbd_req_sync_watch()

2013-01-24 Thread Alex Elder
Get rid of rbd_req_sync_watch(), because it is no longer used. Signed-off-by: Alex Elder el...@inktank.com --- drivers/block/rbd.c | 42 -- 1 file changed, 42 deletions(-) diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c index 7b1eddc..8f659f3

[PATCH 08/12, v2] rbd: use new code for notify ack

2013-01-24 Thread Alex Elder
Use the new object request tracking mechanism for handling a notify_ack request. Move the callback function below the definition of this so we don't have to do a pre-declaration. This resolves: http://tracker.newdream.net/issues/3754 Signed-off-by: Alex Elder el...@inktank.com --- drivers

[PATCH 09/12, v2] rbd: get rid of rbd_req_sync_notify_ack()

2013-01-24 Thread Alex Elder
Get rid rbd_req_sync_notify_ack() because it is no longer used. As a result rbd_simple_req_cb() becomes unreferenced, so get rid of that too. Signed-off-by: Alex Elder el...@inktank.com --- drivers/block/rbd.c | 33 - 1 file changed, 33 deletions(-) diff --git

[PATCH 10/12, v2] rbd: send notify ack asynchronously

2013-01-24 Thread Alex Elder
, but there's really no need to wait for it to complete. Change it so the caller doesn't wait for the notify acknowledgement request to complete. And change the name to reflect it's no longer synchronous. This resolves: http://tracker.newdream.net/issues/3877 Signed-off-by: Alex Elder el

<    2   3   4   5   6   7   8   9   10   11   >