netfs, cachefiles: Pass upper bound length to allow expansion
[linux-2.6-microblaze.git] / include / linux / netfs.h
index 19a41c4..2856389 100644 (file)
@@ -261,6 +261,7 @@ struct netfs_io_request {
        atomic_t                nr_copy_ops;    /* Number of copy-to-cache ops in progress */
        size_t                  submitted;      /* Amount submitted for I/O so far */
        size_t                  len;            /* Length of the request */
+       size_t                  upper_len;      /* Length can be extended to here */
        size_t                  transferred;    /* Amount to be indicated as transferred */
        short                   error;          /* 0 or error that occurred */
        enum netfs_io_origin    origin;         /* Origin of the request */
@@ -357,8 +358,8 @@ struct netfs_cache_ops {
         * actually do.
         */
        int (*prepare_write)(struct netfs_cache_resources *cres,
-                            loff_t *_start, size_t *_len, loff_t i_size,
-                            bool no_space_allocated_yet);
+                            loff_t *_start, size_t *_len, size_t upper_len,
+                            loff_t i_size, bool no_space_allocated_yet);
 
        /* Prepare an on-demand read operation, shortening it to a cached/uncached
         * boundary as appropriate.