summaryrefslogtreecommitdiffstats
path: root/fs/ceph/mds_client.h
diff options
context:
space:
mode:
authorYan, Zheng <zyan@redhat.com>2014-09-16 13:15:28 +0200
committerSage Weil <sage@redhat.com>2014-10-14 21:56:49 +0200
commit25e6bae356502cde283f1804111b44e6fad20fc2 (patch)
tree8825e784ff921f4dd27e42b321c1a26cf26b9632 /fs/ceph/mds_client.h
parentlibceph: reference counting pagelist (diff)
downloadlinux-25e6bae356502cde283f1804111b44e6fad20fc2.tar.xz
linux-25e6bae356502cde283f1804111b44e6fad20fc2.zip
ceph: use pagelist to present MDS request data
Current code uses page array to present MDS request data. Pages in the array are allocated/freed by caller of ceph_mdsc_do_request(). If request is interrupted, the pages can be freed while they are still being used by the request message. The fix is use pagelist to present MDS request data. Pagelist is reference counted. Signed-off-by: Yan, Zheng <zyan@redhat.com> Reviewed-by: Sage Weil <sage@redhat.com>
Diffstat (limited to 'fs/ceph/mds_client.h')
-rw-r--r--fs/ceph/mds_client.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/ceph/mds_client.h b/fs/ceph/mds_client.h
index e00737cf523c..23015f747061 100644
--- a/fs/ceph/mds_client.h
+++ b/fs/ceph/mds_client.h
@@ -202,9 +202,7 @@ struct ceph_mds_request {
bool r_direct_is_hash; /* true if r_direct_hash is valid */
/* data payload is used for xattr ops */
- struct page **r_pages;
- int r_num_pages;
- int r_data_len;
+ struct ceph_pagelist *r_pagelist;
/* what caps shall we drop? */
int r_inode_drop, r_inode_unless;