]> err.no Git - linux-2.6/blobdiff - include/linux/pipe_fs_i.h
locks: add lock cancel command
[linux-2.6] / include / linux / pipe_fs_i.h
index ba73108cbf8b038e11ed5e45e8ff54874cb2a1b7..8bcbc54e1b488213fceff419d0d364cc74b61c43 100644 (file)
@@ -5,13 +5,14 @@
 
 #define PIPE_BUFFERS (16)
 
-#define PIPE_BUF_FLAG_ATOMIC   0x01    /* was atomically mapped */
-#define PIPE_BUF_FLAG_GIFT     0x02    /* page is a gift */
+#define PIPE_BUF_FLAG_LRU      0x01    /* page is on the LRU */
+#define PIPE_BUF_FLAG_ATOMIC   0x02    /* was atomically mapped */
+#define PIPE_BUF_FLAG_GIFT     0x04    /* page is a gift */
 
 struct pipe_buffer {
        struct page *page;
        unsigned int offset, len;
-       struct pipe_buf_operations *ops;
+       const struct pipe_buf_operations *ops;
        unsigned int flags;
 };
 
@@ -40,9 +41,7 @@ struct pipe_buf_operations {
 struct pipe_inode_info {
        wait_queue_head_t wait;
        unsigned int nrbufs, curbuf;
-       struct pipe_buffer bufs[PIPE_BUFFERS];
        struct page *tmp_page;
-       unsigned int start;
        unsigned int readers;
        unsigned int writers;
        unsigned int waiting_writers;
@@ -51,6 +50,7 @@ struct pipe_inode_info {
        struct fasync_struct *fasync_readers;
        struct fasync_struct *fasync_writers;
        struct inode *inode;
+       struct pipe_buffer bufs[PIPE_BUFFERS];
 };
 
 /* Differs from PIPE_BUF in that PIPE_SIZE is the length of the actual
@@ -99,4 +99,8 @@ extern ssize_t splice_from_pipe(struct pipe_inode_info *, struct file *,
                                loff_t *, size_t, unsigned int,
                                splice_actor *);
 
+extern ssize_t __splice_from_pipe(struct pipe_inode_info *, struct file *,
+                                 loff_t *, size_t, unsigned int,
+                                 splice_actor *);
+
 #endif