summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorIan Campbell <ian.campbell@citrix.com>2011-10-20 04:58:32 -0400
committerDavid S. Miller <davem@davemloft.net>2011-10-20 04:58:32 -0400
commit30d3c128eafd2277ca2bb4b62845f25ad9295c12 (patch)
tree18d0323ab3280f967fa294c0c6afc327573e2ed7 /include
parent90278c9ffb8a92672d60a618a58a99e2370a98ac (diff)
downloadlinux-3.10-30d3c128eafd2277ca2bb4b62845f25ad9295c12.tar.gz
linux-3.10-30d3c128eafd2277ca2bb4b62845f25ad9295c12.tar.bz2
linux-3.10-30d3c128eafd2277ca2bb4b62845f25ad9295c12.zip
mm: add a "struct page_frag" type containing a page, offset and length
A few network drivers currently use skb_frag_struct for this purpose but I have patches which add additional fields and semantics there which these other uses do not want. A structure for reference sub-page regions seems like a generally useful thing so do so instead of adding a network subsystem specific structure. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Jens Axboe <jaxboe@fusionio.com> Acked-by: David Rientjes <rientjes@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/linux/mm_types.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h
index 774b8952deb..29971a589ff 100644
--- a/include/linux/mm_types.h
+++ b/include/linux/mm_types.h
@@ -135,6 +135,17 @@ struct page {
#endif
;
+struct page_frag {
+ struct page *page;
+#if (BITS_PER_LONG > 32) || (PAGE_SIZE >= 65536)
+ __u32 offset;
+ __u32 size;
+#else
+ __u16 offset;
+ __u16 size;
+#endif
+};
+
typedef unsigned long __nocast vm_flags_t;
/*