aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ceph/mdsmap.c
Commit message (Collapse)AuthorAgeFilesLines
* ceph: use fixed endian encoding for ceph_entity_addrSage Weil2009-11-031-0/+1
| | | | | | | | | 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: convert encode/decode macros to inlinesSage Weil2009-10-141-19/+19
| | | | | | | 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: fix mdsmap decoding when multiple mds's are presentSage Weil2009-10-071-5/+5
| | | | | | A misplaced sizeof() around namelen was throwing things off. Signed-off-by: Sage Weil <sage@newdream.net>
* ceph: MDS clientSage Weil2009-10-061-0/+166
The MDS (metadata server) client is responsible for submitting requests to the MDS cluster and parsing the response. We decide which MDS to submit each request to based on cached information about the current partition of the directory hierarchy across the cluster. A stateful session is opened with each MDS before we submit requests to it, and a mutex is used to control the ordering of messages within each session. An MDS request may generate two responses. The first indicates the operation was a success and returns any result. A second reply is sent when the operation commits to disk. Note that locking on the MDS ensures that the results of updates are visible only to the updating client before the operation commits. Requests are linked to the containing directory so that an fsync will wait for them to commit. If an MDS fails and/or recovers, we resubmit requests as needed. We also reconnect existing capabilities to a recovering MDS to reestablish that shared session state. Old dentry leases are invalidated. Signed-off-by: Sage Weil <sage@newdream.net>