summaryrefslogtreecommitdiffstats
path: root/fs/ceph/ceph_fs.h
AgeCommit message (Collapse)AuthorFilesLines
2010-10-20ceph: factor out libceph from Ceph file systemYehuda Sadeh1-728/+0
This factors out protocol and low-level storage parts of ceph into a separate libceph module living in net/ceph and include/linux/ceph. This is mostly a matter of moving files around. However, a few key pieces of the interface change as well: - ceph_client becomes ceph_fs_client and ceph_client, where the latter captures the mon and osd clients, and the fs_client gets the mds client and file system specific pieces. - Mount option parsing and debugfs setup is correspondingly broken into two pieces. - The mon client gets a generic handler callback for otherwise unknown messages (mds map, in this case). - The basic supported/required feature bits can be expanded (and are by ceph_fs_client). No functional change, aside from some subtle error handling cases that got cleaned up in the refactoring process. Signed-off-by: Sage Weil <sage@newdream.net>
2010-08-02ceph: define on-wire types, constants for file locking supportGreg Farnum1-2/+34
Define the MDS operations and data types for doing file advisory locking with the MDS. Signed-off-by: Greg Farnum <gregf@hq.newdream.net> Signed-off-by: Sage Weil <sage@newdream.net>
2010-08-02ceph: support v2 reconnect encodingSage Weil1-1/+10
Encode either old or v2 encoding of client_reconnect message, depending on whether the peer has the FLOCK feature bit. Signed-off-by: Sage Weil <sage@newdream.net>
2010-08-02ceph: move AES iv definition to shared headerSage Weil1-0/+2
Signed-off-by: Sage Weil <sage@newdream.net>
2010-08-01ceph: sync header defs with server codeSage Weil1-0/+1
Define ROLLBACK op, IFLOCK inode lock (for advisory file locking). Signed-off-by: Sage Weil <sage@newdream.net>
2010-08-01ceph: clean up header guardsSage Weil1-2/+2
Signed-off-by: Sage Weil <sage@newdream.net>
2010-08-01ceph: strip misleading/obsolete version, feature infoSage Weil1-26/+4
Signed-off-by: Sage Weil <sage@newdream.net>
2010-08-01ceph: request FILE_LAZYIO cap when LAZY file mode is setSage Weil1-1/+2
Also clean up the file flags -> file mode -> wanted caps functions while we're at it. This resyncs this file with userspace. Signed-off-by: Sage Weil <sage@newdream.net>
2010-05-29ceph: make lease code DN specificSage Weil1-10/+11
The lease code includes a mask in the CEPH_LOCK_* namespace, but that namespace is changing, and only one mask (formerly _DN == 1) is used, so hard code for that value for now. If we ever extend this code to handle leases over different data types we can extend it accordingly. Signed-off-by: Sage Weil <sage@newdream.net>
2010-05-17ceph: specify max_bytes on readdir repliesSage Weil1-0/+1
Specify max bytes in request to bound size of reply. Add associated mount option with default value of 512 KB. Signed-off-by: Sage Weil <sage@newdream.net>
2010-05-17ceph: resync headers with userlandSage Weil1-3/+47
Notable changes include pool op defines and types, FLOCK feature bit, and new CMPXATTR osd ops. Signed-off-by: Sage Weil <sage@newdream.net>
2010-05-17ceph: drop src address(es) from message header [new protocol feature]Sage Weil1-2/+11
The CEPH_FEATURE_NOSRCADDR protocol feature avoids putting the full source address in each message header (twice). This patch switches the client to the new scheme, and _requires_ this feature on the server. The server will support both the old and new schemes. That means an old client will work with a new server, but a new client will not work with an old server. Signed-off-by: Sage Weil <sage@newdream.net>
2010-02-17ceph: v0.19 releaseSage Weil1-1/+1
Signed-off-by: Sage Weil <sage@newdream.net>
2010-02-02ceph: always send truncation info with read and write osd opsYehuda Sadeh1-1/+1
This fixes a bug where the read/write ops arrive the osd after a following truncation request. Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net> Signed-off-by: Sage Weil <sage@newdream.net>
2010-01-25ceph: precede encoded ceph_pg_pool struct with versionSage Weil1-1/+1
Signed-off-by: Sage Weil <sage@newdream.net>
2010-01-25ceph: mark MDS CREATE as a write opSage Weil1-2/+2
CEPH_MDS_OP_CREATE was not correctly marked as a write operation. Signed-off-by: Sage Weil <sage@newdream.net>
2009-12-23ceph: use ceph_pagelist for mds reconnect message; change encoding (protocol ↵Sage Weil1-1/+1
change) Use the ceph_pagelist to encode the MDS reconnect message. We change the message encoding (protocol change!) at the same time to make our life easier (we don't know how many snaprealms we have when we start encoding). An empty message implies the session is closed/does not exist. Signed-off-by: Sage Weil <sage@newdream.net>
2009-12-23ceph: add feature bits to connection handshake (protocol change)Sage Weil1-0/+6
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>
2009-12-23ceph: include transaction id in ceph_msg_header (protocol change)Sage Weil1-6/+2
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>
2009-12-04ceph: mark v0.18 releaseSage Weil1-1/+1
Signed-off-by: Sage Weil <sage@newdream.net>
2009-12-03ceph: hide /.ceph from readdir resultsSage Weil1-0/+1
We need to skip /.ceph in (cached) readdir results, and exclude "/.ceph" from the cached ENOENT lookup check. Signed-off-by: Sage Weil <sage@newdream.net>
2009-11-20ceph: decode updated mdsmap formatSage Weil1-1/+1
The mds map now uses the global_id as the 'key' (instead of the addr, which was a poor choice). This is protocol change. Signed-off-by: Sage Weil <sage@newdream.net>
2009-11-18ceph: negotiate authentication protocol; implement AUTH_NONE protocolSage Weil1-2/+12
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>
2009-11-06ceph: make object hash a pg_pool propertySage Weil1-2/+0
The object will be hashed to a placement seed (ps) based on the pg_pool's hash function. This allows new hashes to be introduced into an existing object store, or selection of a hash appropriate to the objects that will be stored in a particular pool. Signed-off-by: Sage Weil <sage@newdream.net>
2009-11-06ceph: use strong hash function for mapping objects to pgsSage Weil1-1/+1
We were using the (weak) dcache hash function, but it was leaving lower bits consecutive for consecutive (inode) objects. We really want to make the object to pg mapping random and uniform, so use a proper hash function here. This is Robert Jenkin's public domain hash function (with some minor cleanup): http://burtleburtle.net/bob/hash/evahash.html This is a protocol revision. Signed-off-by: Sage Weil <sage@newdream.net>
2009-10-19ceph: v0.17 of clientSage Weil1-2/+2
Signed-off-by: Sage Weil <sage@newdream.net>
2009-10-19ceph: include preferred osd in placement seedSage Weil1-1/+1
Mix the preferred osd (if any) into the placement seed that is fed into the CRUSH object placement calculation. This prevents all the placement pgs from peering with the same osds. Rev the osd client protocol with this change. Signed-off-by: Sage Weil <sage@newdream.net>
2009-10-15ceph: correct subscribe_ack msgpool payload sizeSage Weil1-0/+5
Defined a struct for the SUBSCRIBE_ACK, and use that to size the msgpool. Signed-off-by: Sage Weil <sage@newdream.net>
2009-10-12ceph: remove unused CEPH_MSG_{OSD,MDS}_GETMAPSage Weil1-2/+0
Signed-off-by: Sage Weil <sage@newdream.net>
2009-10-09ceph: add file layout validationSage Weil1-0/+2
This tracks updates to code shared with userspace. Signed-off-by: Sage Weil <sage@newdream.net>
2009-10-09ceph: update to mon client protocol v15Sage Weil1-7/+12
The mon request headers now include session_mon information that must be properly initialized. Signed-off-by: Sage Weil <sage@newdream.net>
2009-10-06ceph: on-wire typesSage Weil1-0/+629
These headers describe the types used to exchange messages between the Ceph client and various servers. All types are little-endian and packed. These headers are shared between the kernel and userspace, so all types are in terms of e.g. __u32. Additionally, we define a few magic values to identify the current version of the protocol(s) in use, so that discrepancies to be detected on mount. Signed-off-by: Sage Weil <sage@newdream.net>