]> err.no Git - linux-2.6/blobdiff - include/linux/pipe_fs_i.h
Add unitialized_var() macro for suppressing gcc warnings
[linux-2.6] / include / linux / pipe_fs_i.h
index 4c054491e38efe5d78bdfdd2c24121fffbdc24b0..8bcbc54e1b488213fceff419d0d364cc74b61c43 100644 (file)
@@ -7,11 +7,12 @@
 
 #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
@@ -69,6 +69,7 @@ void *generic_pipe_buf_map(struct pipe_inode_info *, struct pipe_buffer *, int);
 void generic_pipe_buf_unmap(struct pipe_inode_info *, struct pipe_buffer *, void *);
 void generic_pipe_buf_get(struct pipe_inode_info *, struct pipe_buffer *);
 int generic_pipe_buf_pin(struct pipe_inode_info *, struct pipe_buffer *);
+int generic_pipe_buf_steal(struct pipe_inode_info *, struct pipe_buffer *);
 
 /*
  * splice is tied to pipes as a transport (at least for now), so we'll just
@@ -79,6 +80,7 @@ int generic_pipe_buf_pin(struct pipe_inode_info *, struct pipe_buffer *);
                                 /* we may still block on the fd we splice */
                                 /* from/to, of course */
 #define SPLICE_F_MORE  (0x04)  /* expect more data */
+#define SPLICE_F_GIFT  (0x08)  /* pages passed in are a gift */
 
 /*
  * Passed to the actors
@@ -97,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