aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ceph/osd_client.h
diff options
context:
space:
mode:
authorSage Weil <sage@newdream.net>2009-12-22 13:45:45 -0500
committerSage Weil <sage@newdream.net>2009-12-23 11:17:20 -0500
commit350b1c32ea58d29e25d63fc25e92dd48f9339546 (patch)
tree4b9e8b06de8fd7e07c2292307e9a67c121f1e079 /fs/ceph/osd_client.h
parentec302645f4a9bd9ec757c30d185557e1c0972c1a (diff)
ceph: control access to page vector for incoming data
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>
Diffstat (limited to 'fs/ceph/osd_client.h')
-rw-r--r--fs/ceph/osd_client.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/ceph/osd_client.h b/fs/ceph/osd_client.h
index 2e4cfd1e9f10..8fef71cc4457 100644
--- a/fs/ceph/osd_client.h
+++ b/fs/ceph/osd_client.h
@@ -43,11 +43,13 @@ struct ceph_osd_request {
43 struct list_head r_osd_item; 43 struct list_head r_osd_item;
44 struct ceph_osd *r_osd; 44 struct ceph_osd *r_osd;
45 45
46 struct ceph_connection *r_con_filling_pages;
47
46 struct ceph_msg *r_request, *r_reply; 48 struct ceph_msg *r_request, *r_reply;
47 int r_result; 49 int r_result;
48 int r_flags; /* any additional flags for the osd */ 50 int r_flags; /* any additional flags for the osd */
49 u32 r_sent; /* >0 if r_request is sending/sent */ 51 u32 r_sent; /* >0 if r_request is sending/sent */
50 int r_prepared_pages, r_got_reply; 52 int r_got_reply;
51 int r_num_prealloc_reply; 53 int r_num_prealloc_reply;
52 54
53 struct ceph_osd_client *r_osdc; 55 struct ceph_osd_client *r_osdc;