diff options
author | Alex Elder <elder@inktank.com> | 2013-02-08 09:55:48 -0600 |
---|---|---|
committer | Alex Elder <elder@inktank.com> | 2013-02-19 19:14:03 -0600 |
commit | fbfab53966b279f9cdb36b96ffa1e22f042c96ff (patch) | |
tree | 4f3acf06a4dd61eeeee16119b5f65290c4200bde /net | |
parent | ef06f4d32ae5b656f17b53ee3f3c43471a11cc73 (diff) | |
download | linux-3.10-fbfab53966b279f9cdb36b96ffa1e22f042c96ff.tar.gz linux-3.10-fbfab53966b279f9cdb36b96ffa1e22f042c96ff.tar.bz2 linux-3.10-fbfab53966b279f9cdb36b96ffa1e22f042c96ff.zip |
libceph: allow STAT osd operations
Add support for CEPH_OSD_OP_STAT operations in the osd client
and in rbd.
This operation sends no data to the osd; everything required is
encoded in identity of the target object.
The result will be ENOENT if the object doesn't exist. If it does
exist and no other error occurs the server returns the size and last
modification time of the target object as output data (in little
endian format). The size is a 64 bit unsigned and the time is
ceph_timespec structure (two unsigned 32-bit integers, representing
a seconds and nanoseconds value).
This resolves:
http://tracker.ceph.com/issues/4007
Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/ceph/osd_client.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/ceph/osd_client.c b/net/ceph/osd_client.c index b58748ec405..39629b66f3b 100644 --- a/net/ceph/osd_client.c +++ b/net/ceph/osd_client.c @@ -220,6 +220,8 @@ static void osd_req_encode_op(struct ceph_osd_request *req, dst->op = cpu_to_le16(src->op); switch (src->op) { + case CEPH_OSD_OP_STAT: + break; case CEPH_OSD_OP_READ: case CEPH_OSD_OP_WRITE: dst->extent.offset = @@ -255,7 +257,6 @@ static void osd_req_encode_op(struct ceph_osd_request *req, pr_err("unrecognized osd opcode %d\n", dst->op); WARN_ON(1); break; - case CEPH_OSD_OP_STAT: case CEPH_OSD_OP_MAPEXT: case CEPH_OSD_OP_MASKTRUNC: case CEPH_OSD_OP_SPARSE_READ: |