summaryrefslogtreecommitdiffstats
path: root/fs/ceph/osd_client.c
Commit message (Collapse)AuthorAgeFilesLines
* ceph: include transaction id in ceph_msg_header (protocol change)Sage Weil2009-12-231-6/+3
| | | | | | | | | | Many (most?) message types include a transaction id. By including it in the fixed size header, we always have it available even when we are unable to allocate memory for the (larger, variable sized) message body. This will allow us to error out the appropriate request instead of (silently) dropping the reply. Signed-off-by: Sage Weil <sage@newdream.net>
* ceph: control access to page vector for incoming dataSage Weil2009-12-231-9/+33
| | | | | | | | | | | | | | When we issue an OSD read, we specify a vector of pages that the data is to be read into. The request may be sent multiple times, to multiple OSDs, if the osdmap changes, which means we can get more than one reply. Only read data into the page vector if the reply is coming from the OSD we last sent the request to. Keep track of which connection is using the vector by taking a reference. If another connection was already using the vector before and a new reply comes in on the right connection, revoke the pages from the other connection. Signed-off-by: Sage Weil <sage@newdream.net>
* ceph: unregister canceled/timed out osd requestsSage Weil2009-12-231-1/+2
| | | | | | | | Canceled or timed out osd requests were getting left in the request list and never deallocated (until umount). Unregister if they are canceled (control-c) or time out. Signed-off-by: Sage Weil <sage@newdream.net>
* ceph: fix error paths for corrupt osdmap messagesSage Weil2009-12-211-0/+2
| | | | | | | Both osdmap_decode() and osdmap_apply_incremental() should never return NULL. Signed-off-by: Sage Weil <sage@newdream.net>
* ceph: hex dump corrupt server data to KERN_DEBUGSage Weil2009-12-211-0/+2
| | | | | | Also, print fsid using standard format, NOT hex dump. Signed-off-by: Sage Weil <sage@newdream.net>
* ceph: fix msgpool reservation leakYehuda Sadeh2009-12-211-1/+4
| | | | Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
* ceph: use kref for ceph_osd_requestSage Weil2009-12-071-19/+18
| | | | Signed-off-by: Sage Weil <sage@newdream.net>
* ceph: whitespace cleanupSage Weil2009-12-031-2/+2
| | | | Signed-off-by: Sage Weil <sage@newdream.net>
* ceph: plug leak of request_mutexSage Weil2009-12-011-0/+1
| | | | | | Fix leak of osd client request_mutex on receiving dup ack. Signed-off-by: Sage Weil <sage@newdream.net>
* fs/ceph: Move a dereference below a NULL testJulia Lawall2009-11-211-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | If the NULL test is necessary, then the dereference should be moved below the NULL test. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/). // <smpl> @@ type T; expression E; identifier i,fld; statement S; @@ - T i = E->fld; + T i; ... when != E when != i if (E == NULL) S + i = E->fld; // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Sage Weil <sage@newdream.net>
* ceph: fix debugfs entry, simplify fsid checksSage Weil2009-11-201-10/+2
| | | | | | | | | | | We may first learn our fsid from any of the mon, osd, or mds maps (whichever the monitor sends first). Consolidate checks in a single helper. Initialize the client debugfs entry then, since we need the fsid (and global_id) for the directory name. Also remove dead mount code. Signed-off-by: Sage Weil <sage@newdream.net>
* ceph: negotiate authentication protocol; implement AUTH_NONE protocolSage Weil2009-11-181-3/+60
| | | | | | | | | | | | | | | | When we open a monitor session, we send an initial AUTH message listing the auth protocols we support, our entity name, and (possibly) a previously assigned global_id. The monitor chooses a protocol and responds with an initial message. Initially implement AUTH_NONE, a dummy protocol that provides no security, but works within the new framework. It generates 'authorizers' that are used when connecting to (mds, osd) services that simply state our entity name and global_id. This is a wire protocol change. Signed-off-by: Sage Weil <sage@newdream.net>
* ceph: handle errors during osd client initSage Weil2009-11-181-4/+11
| | | | | | Unwind initializing if we get ENOMEM during client initialization. Signed-off-by: Sage Weil <sage@newdream.net>
* ceph: remove bad calls to ceph_con_shutdownSage Weil2009-11-181-3/+1
| | | | | | | | | We want to ceph_con_close when we're done with the connection, before the ref count reaches 0. Once it does, do not call ceph_con_shutdown, as that takes the con mutex and may sleep, and besides that is unnecessary. Signed-off-by: Sage Weil <sage@newdream.net>
* ceph: fix endian conversions for ceph_pgSage Weil2009-11-041-4/+4
| | | | | | | | The endian conversions don't quite work with the old union ceph_pg. Just make it a regular struct, and make each field __le. This is simpler and it has the added bonus of actually working. Signed-off-by: Sage Weil <sage@newdream.net>
* ceph: allocate and parse mount args before client instanceSage Weil2009-10-271-3/+3
| | | | | | | | This simplifies much of the error handling during mount. It also means that we have the mount args before client creation, and we can initialize based on those options. Signed-off-by: Sage Weil <sage@newdream.net>
* ceph: warn on allocation from msgpool with larger front_lenSage Weil2009-10-151-2/+3
| | | | | | | | Pass the front_len we need when pulling a message off a msgpool, and WARN if it is greater than the pool's size. Then try to allocate a new message (to continue without failing). Signed-off-by: Sage Weil <sage@newdream.net>
* ceph: convert encode/decode macros to inlinesSage Weil2009-10-141-4/+4
| | | | | | | This avoids the fugly pass by reference and makes the code a bit easier to read. Signed-off-by: Sage Weil <sage@newdream.net>
* ceph: cancel osd requests before resending themSage Weil2009-10-091-1/+4
| | | | | | | | This ensures we don't submit the same request twice if we are kicking a specific osd (as with an osd_reset), or when we hit a transient error and resend. Signed-off-by: Sage Weil <sage@newdream.net>
* ceph: reset osd session on fault, not peer_resetSage Weil2009-10-091-5/+2
| | | | | | | The peer_reset just takes longer (until we reconnect and discover the osd dropped the session... which it will). Signed-off-by: Sage Weil <sage@newdream.net>
* ceph: revoke osd request message on request completionSage Weil2009-10-091-4/+9
| | | | | | | | | If an osd has failed or returned and a request has been sent twice, it's possible to get a reply and unregister the request while the request message is queued for delivery. Since the message references the caller's page vector, we need to revoke it before completing. Signed-off-by: Sage Weil <sage@newdream.net>
* ceph: fix osd request submission raceSage Weil2009-10-091-11/+19
| | | | | | | | | | | | The osd request submission path registers the request, drops and retakes the request_mutex, then sends it to the OSD. A racing kick_requests could sent it during that interval, causing the same msg to be sent twice and BUGing in the msgr. Fix by only sending the message if it hasn't been touched by other threads. Signed-off-by: Sage Weil <sage@newdream.net>
* ceph: OSD clientSage Weil2009-10-061-0/+1294
The OSD client is responsible for reading and writing data from/to the object storage pool. This includes determining where objects are stored in the cluster, and ensuring that requests are retried or redirected in the event of a node failure or data migration. If an OSD does not respond before a timeout expires, keepalive messages are sent across the lossless, ordered communications channel to ensure that any break in the TCP is discovered. If the session does reset, a reconnection is attempted and affected requests are resent (by the message transport layer). Signed-off-by: Sage Weil <sage@newdream.net>
OpenPOWER on IntegriCloud