diff options
author | Sage Weil <sage@newdream.net> | 2009-12-22 21:45:45 +0300 |
---|---|---|
committer | Sage Weil <sage@newdream.net> | 2009-12-23 19:17:20 +0300 |
commit | 350b1c32ea58d29e25d63fc25e92dd48f9339546 (patch) | |
tree | 4b9e8b06de8fd7e07c2292307e9a67c121f1e079 /fs/ceph/messenger.h | |
parent | ec302645f4a9bd9ec757c30d185557e1c0972c1a (diff) | |
download | linux-350b1c32ea58d29e25d63fc25e92dd48f9339546.tar.xz |
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/messenger.h')
-rw-r--r-- | fs/ceph/messenger.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/ceph/messenger.h b/fs/ceph/messenger.h index 94b55de90331..7e2aab1d3ce2 100644 --- a/fs/ceph/messenger.h +++ b/fs/ceph/messenger.h @@ -230,6 +230,8 @@ extern void ceph_con_open(struct ceph_connection *con, extern void ceph_con_close(struct ceph_connection *con); extern void ceph_con_send(struct ceph_connection *con, struct ceph_msg *msg); extern void ceph_con_revoke(struct ceph_connection *con, struct ceph_msg *msg); +extern void ceph_con_revoke_pages(struct ceph_connection *con, + struct page **pages); extern void ceph_con_keepalive(struct ceph_connection *con); extern struct ceph_connection *ceph_con_get(struct ceph_connection *con); extern void ceph_con_put(struct ceph_connection *con); |