aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorCurt Wohlgemuth <curtw@google.com>2012-03-05 10:40:22 -0500
committerTheodore Ts'o <tytso@mit.edu>2012-03-05 10:40:22 -0500
commit4188188bdc3aed29eb41fb1537305cff7431d062 (patch)
tree8068d261bb142eeb6b5c443db23baf1dca77b09e /fs
parentb43d17f319f2c502b17139d1cf70731b2b62c644 (diff)
ext4: add comments to definition of ext4_io_end_t
This should make it more clear what this structure is used for, and how some of the (mutually exclusive) fields are used to keep page cache references. Signed-off-by: Curt Wohlgemuth <curtw@google.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs')
-rw-r--r--fs/ext4/ext4.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
index 37e7d8b66c99..26ee54b2ce82 100644
--- a/fs/ext4/ext4.h
+++ b/fs/ext4/ext4.h
@@ -194,18 +194,25 @@ struct ext4_io_page {
194 194
195#define MAX_IO_PAGES 128 195#define MAX_IO_PAGES 128
196 196
197/*
198 * For converting uninitialized extents on a work queue.
199 *
200 * 'page' is only used from the writepage() path; 'pages' is only used for
201 * buffered writes; they are used to keep page references until conversion
202 * takes place. For AIO/DIO, neither field is filled in.
203 */
197typedef struct ext4_io_end { 204typedef struct ext4_io_end {
198 struct list_head list; /* per-file finished IO list */ 205 struct list_head list; /* per-file finished IO list */
199 struct inode *inode; /* file being written to */ 206 struct inode *inode; /* file being written to */
200 unsigned int flag; /* unwritten or not */ 207 unsigned int flag; /* unwritten or not */
201 struct page *page; /* page struct for buffer write */ 208 struct page *page; /* for writepage() path */
202 loff_t offset; /* offset in the file */ 209 loff_t offset; /* offset in the file */
203 ssize_t size; /* size of the extent */ 210 ssize_t size; /* size of the extent */
204 struct work_struct work; /* data work queue */ 211 struct work_struct work; /* data work queue */
205 struct kiocb *iocb; /* iocb struct for AIO */ 212 struct kiocb *iocb; /* iocb struct for AIO */
206 int result; /* error value for AIO */ 213 int result; /* error value for AIO */
207 int num_io_pages; 214 int num_io_pages; /* for writepages() */
208 struct ext4_io_page *pages[MAX_IO_PAGES]; 215 struct ext4_io_page *pages[MAX_IO_PAGES]; /* for writepages() */
209} ext4_io_end_t; 216} ext4_io_end_t;
210 217
211struct ext4_io_submit { 218struct ext4_io_submit {