diff options
author | Sage Weil <sage@newdream.net> | 2010-11-09 15:40:00 -0500 |
---|---|---|
committer | Sage Weil <sage@newdream.net> | 2010-11-09 15:43:17 -0500 |
commit | c5c6b19d4b8f5431fca05f28ae9e141045022149 (patch) | |
tree | 0961d9aeee49f481134089ac5b93b7118cf3a34b /include | |
parent | b7495fc2ff941db6a118a93ab8d61149e3f4cef8 (diff) |
ceph: explicitly specify page alignment in network messages
The alignment used for reading data into or out of pages used to be taken
from the data_off field in the message header. This only worked as long
as the page alignment matched the object offset, breaking direct io to
non-page aligned offsets.
Instead, explicitly specify the page alignment next to the page vector
in the ceph_msg struct, and use that instead of the message header (which
probably shouldn't be trusted). The alloc_msg callback is responsible for
filling in this field properly when it sets up the page vector.
Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/ceph/messenger.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/ceph/messenger.h b/include/linux/ceph/messenger.h index 5956d62c3057..a108b425fee2 100644 --- a/include/linux/ceph/messenger.h +++ b/include/linux/ceph/messenger.h | |||
@@ -82,6 +82,7 @@ struct ceph_msg { | |||
82 | struct ceph_buffer *middle; | 82 | struct ceph_buffer *middle; |
83 | struct page **pages; /* data payload. NOT OWNER. */ | 83 | struct page **pages; /* data payload. NOT OWNER. */ |
84 | unsigned nr_pages; /* size of page array */ | 84 | unsigned nr_pages; /* size of page array */ |
85 | unsigned page_alignment; /* io offset in first page */ | ||
85 | struct ceph_pagelist *pagelist; /* instead of pages */ | 86 | struct ceph_pagelist *pagelist; /* instead of pages */ |
86 | struct list_head list_head; | 87 | struct list_head list_head; |
87 | struct kref kref; | 88 | struct kref kref; |