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>
This commit is contained in:
parent
b43d17f319
commit
4188188bdc
|
@ -194,18 +194,25 @@ struct ext4_io_page {
|
||||||
|
|
||||||
#define MAX_IO_PAGES 128
|
#define MAX_IO_PAGES 128
|
||||||
|
|
||||||
|
/*
|
||||||
|
* For converting uninitialized extents on a work queue.
|
||||||
|
*
|
||||||
|
* 'page' is only used from the writepage() path; 'pages' is only used for
|
||||||
|
* buffered writes; they are used to keep page references until conversion
|
||||||
|
* takes place. For AIO/DIO, neither field is filled in.
|
||||||
|
*/
|
||||||
typedef struct ext4_io_end {
|
typedef struct ext4_io_end {
|
||||||
struct list_head list; /* per-file finished IO list */
|
struct list_head list; /* per-file finished IO list */
|
||||||
struct inode *inode; /* file being written to */
|
struct inode *inode; /* file being written to */
|
||||||
unsigned int flag; /* unwritten or not */
|
unsigned int flag; /* unwritten or not */
|
||||||
struct page *page; /* page struct for buffer write */
|
struct page *page; /* for writepage() path */
|
||||||
loff_t offset; /* offset in the file */
|
loff_t offset; /* offset in the file */
|
||||||
ssize_t size; /* size of the extent */
|
ssize_t size; /* size of the extent */
|
||||||
struct work_struct work; /* data work queue */
|
struct work_struct work; /* data work queue */
|
||||||
struct kiocb *iocb; /* iocb struct for AIO */
|
struct kiocb *iocb; /* iocb struct for AIO */
|
||||||
int result; /* error value for AIO */
|
int result; /* error value for AIO */
|
||||||
int num_io_pages;
|
int num_io_pages; /* for writepages() */
|
||||||
struct ext4_io_page *pages[MAX_IO_PAGES];
|
struct ext4_io_page *pages[MAX_IO_PAGES]; /* for writepages() */
|
||||||
} ext4_io_end_t;
|
} ext4_io_end_t;
|
||||||
|
|
||||||
struct ext4_io_submit {
|
struct ext4_io_submit {
|
||||||
|
|
Loading…
Reference in a new issue