diff options
author | Henry C Chang <henry_c_chang@tcloudcomputing.com> | 2010-12-15 23:45:41 -0500 |
---|---|---|
committer | Sage Weil <sage@newdream.net> | 2010-12-17 12:54:40 -0500 |
commit | b6aa5901c7a2bd90d0b6b9866300d2648b2568f3 (patch) | |
tree | 1161ed9dbacb7ace73c5d48fc9acd1db0d7815d5 /include/linux/ceph | |
parent | 92cf765237e2787eb168096305c448caf25ac7f8 (diff) |
ceph: mark user pages dirty on direct-io reads
For read operation, we have to set the argument _write_ of get_user_pages
to 1 since we will write data to pages. Also, we need to SetPageDirty before
releasing these pages.
Signed-off-by: Henry C Chang <henry_c_chang@tcloudcomputing.com>
Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'include/linux/ceph')
-rw-r--r-- | include/linux/ceph/libceph.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/linux/ceph/libceph.h b/include/linux/ceph/libceph.h index 9e76d35670d2..72c72bfccb88 100644 --- a/include/linux/ceph/libceph.h +++ b/include/linux/ceph/libceph.h | |||
@@ -227,8 +227,10 @@ extern int ceph_open_session(struct ceph_client *client); | |||
227 | extern void ceph_release_page_vector(struct page **pages, int num_pages); | 227 | extern void ceph_release_page_vector(struct page **pages, int num_pages); |
228 | 228 | ||
229 | extern struct page **ceph_get_direct_page_vector(const char __user *data, | 229 | extern struct page **ceph_get_direct_page_vector(const char __user *data, |
230 | int num_pages); | 230 | int num_pages, |
231 | extern void ceph_put_page_vector(struct page **pages, int num_pages); | 231 | bool write_page); |
232 | extern void ceph_put_page_vector(struct page **pages, int num_pages, | ||
233 | bool dirty); | ||
232 | extern void ceph_release_page_vector(struct page **pages, int num_pages); | 234 | extern void ceph_release_page_vector(struct page **pages, int num_pages); |
233 | extern struct page **ceph_alloc_page_vector(int num_pages, gfp_t flags); | 235 | extern struct page **ceph_alloc_page_vector(int num_pages, gfp_t flags); |
234 | extern int ceph_copy_user_to_page_vector(struct page **pages, | 236 | extern int ceph_copy_user_to_page_vector(struct page **pages, |