aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ceph/messenger.c
Commit message (Collapse)AuthorAge
* ceph: allow renewal of auth credentialsSage Weil2010-02-10
| | | | | | | | | Add infrastructure to allow the mon_client to periodically renew its auth credentials. Also add a messenger callback that will force such a renewal if a peer rejects our authenticator. Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net> Signed-off-by: Sage Weil <sage@newdream.net>
* ceph: include type in ceph_entity_addr, filepathSage Weil2010-01-29
| | | | | | | Include a type/version in ceph_entity_addr and filepath. Include extra byte in filepath encoding as necessary. Signed-off-by: Sage Weil <sage@newdream.net>
* ceph: keep reserved replies on the request structureYehuda Sadeh2010-01-25
| | | | | | | | This includes treating all the data preallocation and revokation at the same place, not having to have a special case for the reserved pages. Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
* ceph: alloc message data pages and check if tid existsYehuda Sadeh2010-01-25
| | | | | | | | | | | Now doing it in the same callback that is also responsible for allocating the 'front' part of the message. If we get a message that we haven't got a corresponding tid for, mark it for skipping. Moving the mutex unlock/lock from the osd alloc_msg callback to the calling function in the messenger. Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
* ceph: refactor messages data section allocationYehuda Sadeh2010-01-25
| | | | Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
* ceph: allocate middle of message before stating to readYehuda Sadeh2010-01-25
| | | | | | | Both front and middle parts of the message are now being allocated at the ceph_alloc_msg(). Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
* ceph: remove unused erank fieldSage Weil2010-01-14
| | | | | | | The ceph_entity_addr erank field is obsolete; remove it. Get rid of trivial addr comparison helpers while we're at it. Signed-off-by: Sage Weil <sage@newdream.net>
* ceph: support ceph_pagelist for message payloadSage Weil2009-12-23
| | | | | | | | | | | The ceph_pagelist is a simple list of whole pages, strung together via their lru list_head. It facilitates encoding to a "buffer" of unknown size. Allow its use in place of the ceph_msg page vector. This will be used to fix the huge buffer preallocation woes of MDS reconnection. Signed-off-by: Sage Weil <sage@newdream.net>
* ceph: add feature bits to connection handshake (protocol change)Sage Weil2009-12-23
| | | | | | | | Define supported and required feature set. Fail connection if the server requires features we do not support (TAG_FEATURES), or if the server does not support features we require. Signed-off-by: Sage Weil <sage@newdream.net>
* ceph: control access to page vector for incoming dataSage Weil2009-12-23
| | | | | | | | | | | | | | 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: use connection mutex to protect read and write stagesSage Weil2009-12-23
| | | | | | | | | Use a single mutex (previously out_mutex) to protect both read and write activity from concurrent ceph_con_* calls. Drop the mutex when doing callbacks to avoid nested locking (the callback may need to call something like ceph_con_close). Signed-off-by: Sage Weil <sage@newdream.net>
* ceph: remove unaccessible codeYehuda Sadeh2009-12-21
| | | | Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
* ceph: plug leak of incoming message during connection fault/closeSage Weil2009-12-21
| | | | | | | If we explicitly close a connection, or there is a socket error, we need to drop any partially received message. Signed-off-by: Sage Weil <sage@newdream.net>
* ceph: hex dump corrupt server data to KERN_DEBUGSage Weil2009-12-21
| | | | | | Also, print fsid using standard format, NOT hex dump. Signed-off-by: Sage Weil <sage@newdream.net>
* ceph: don't save sent messages on lossy connectionsSage Weil2009-12-21
| | | | | | | For lossy connections we drop all state on socket errors, so there is no reason to keep sent ceph_msg's around. Signed-off-by: Sage Weil <sage@newdream.net>
* ceph: detect lossy state of connectionSage Weil2009-12-21
| | | | | | | The server indicates whether a connection is lossy; set our LOSSYTX bit appropriately. Do not set lossy bit on outgoing connections. Signed-off-by: Sage Weil <sage@newdream.net>
* ceph: plug msg leak in con_faultSage Weil2009-12-21
| | | | Signed-off-by: Sage Weil <sage@newdream.net>
* ceph: carry explicit msg reference for currently sending messageSage Weil2009-12-21
| | | | | | | Carry a ceph_msg reference for connection->out_msg. This will allow us to make out_sent optional. Signed-off-by: Sage Weil <sage@newdream.net>
* ceph: use kref for ceph_msgSage Weil2009-12-07
| | | | Signed-off-by: Sage Weil <sage@newdream.net>
* ceph: simplify ceph_buffer interfaceSage Weil2009-12-07
| | | | | | | | | We never allocate the ceph_buffer and buffer separtely, so use a single constructor. Disallow put on NULL buffer; make the caller check. Signed-off-by: Sage Weil <sage@newdream.net>
* ceph: reset msgr backoff during open, not after successful handshakeSage Weil2009-11-20
| | | | | | | | Reset the backoff delay when we reopen the connection, so that the delays for any initial connection problems are reasonable. We were resetting only after a successful handshake, which was of limited utility. Signed-off-by: Sage Weil <sage@newdream.net>
* ceph: negotiate authentication protocol; implement AUTH_NONE protocolSage Weil2009-11-18
| | | | | | | | | | | | | | | | 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: remove unnecessary ceph_con_shutdownSage Weil2009-11-18
| | | | | | | We require that ceph_con_close be called before we drop the connection, so this is unneeded. Just BUG if con->sock != NULL. Signed-off-by: Sage Weil <sage@newdream.net>
* ceph: separate banner and connect during handshake into distinct stagesSage Weil2009-11-10
| | | | | | | | We need to make sure we only swab the address during the banner once. So break process_banner out of process_connect, and clean up the surrounding code so that these are distinct phases of the handshake. Signed-off-by: Sage Weil <sage@newdream.net>
* ceph: convert port endiannessSage Weil2009-11-04
| | | | | | The port is informational only, but we should make it correct. Signed-off-by: Sage Weil <sage@newdream.net>
* ceph: use fixed endian encoding for ceph_entity_addrSage Weil2009-11-03
| | | | | | | | | We exchange struct ceph_entity_addr over the wire and store it on disk. The sockaddr_storage.ss_family field, however, is host endianness. So, fix ss_family endianness to big endian when sending/receiving over the wire. Signed-off-by: Sage Weil <sage@newdream.net>
* ceph: update to mon client protocol v15Sage Weil2009-10-09
| | | | | | | The mon request headers now include session_mon information that must be properly initialized. Signed-off-by: Sage Weil <sage@newdream.net>
* ceph: messenger librarySage Weil2009-10-06
A generic message passing library is used to communicate with all other components in the Ceph file system. The messenger library provides ordered, reliable delivery of messages between two nodes in the system. This implementation is based on TCP. Signed-off-by: Sage Weil <sage@newdream.net>