diff options
author | Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> | 2009-11-24 11:04:21 -0500 |
---|---|---|
committer | Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> | 2009-11-30 07:05:57 -0500 |
commit | 9284ad2a9016ad631460caf8fd01fc21d84f118c (patch) | |
tree | 6ef77d51ca75017a1632bf215703ed9ee12feade /fs/nilfs2/segbuf.h | |
parent | 5f1586d0dd8f6eeecf6c0d35cbca6291afd6f1cc (diff) |
nilfs2: relocate io status variables to segment buffer
This moves io status variables in nilfs_write_info struct to
nilfs_segment_buffer struct.
This is a preparation to hide nilfs_write_info in segment buffer code.
Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Diffstat (limited to 'fs/nilfs2/segbuf.h')
-rw-r--r-- | fs/nilfs2/segbuf.h | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/fs/nilfs2/segbuf.h b/fs/nilfs2/segbuf.h index 0c3076f4e592..bd076cca37a8 100644 --- a/fs/nilfs2/segbuf.h +++ b/fs/nilfs2/segbuf.h | |||
@@ -77,7 +77,9 @@ struct nilfs_segsum_info { | |||
77 | * @sb_rest_blocks: Number of residual blocks in the current segment | 77 | * @sb_rest_blocks: Number of residual blocks in the current segment |
78 | * @sb_segsum_buffers: List of buffers for segment summaries | 78 | * @sb_segsum_buffers: List of buffers for segment summaries |
79 | * @sb_payload_buffers: List of buffers for segment payload | 79 | * @sb_payload_buffers: List of buffers for segment payload |
80 | * @sb_io_error: I/O error status | 80 | * @sb_nbio: Number of flying bio requests |
81 | * @sb_err: I/O error status | ||
82 | * @sb_bio_event: Completion event of log writing | ||
81 | */ | 83 | */ |
82 | struct nilfs_segment_buffer { | 84 | struct nilfs_segment_buffer { |
83 | struct super_block *sb_super; | 85 | struct super_block *sb_super; |
@@ -96,7 +98,9 @@ struct nilfs_segment_buffer { | |||
96 | struct list_head sb_payload_buffers; /* including super root */ | 98 | struct list_head sb_payload_buffers; /* including super root */ |
97 | 99 | ||
98 | /* io status */ | 100 | /* io status */ |
99 | int sb_io_error; | 101 | int sb_nbio; |
102 | atomic_t sb_err; | ||
103 | struct completion sb_bio_event; | ||
100 | }; | 104 | }; |
101 | 105 | ||
102 | #define NILFS_LIST_SEGBUF(head) \ | 106 | #define NILFS_LIST_SEGBUF(head) \ |
@@ -177,11 +181,6 @@ struct nilfs_write_info { | |||
177 | int nr_vecs; | 181 | int nr_vecs; |
178 | sector_t blocknr; | 182 | sector_t blocknr; |
179 | 183 | ||
180 | int nbio; | ||
181 | atomic_t err; | ||
182 | struct completion bio_event; | ||
183 | /* completion event of segment write */ | ||
184 | |||
185 | /* | 184 | /* |
186 | * The following fields must be set explicitly | 185 | * The following fields must be set explicitly |
187 | */ | 186 | */ |
@@ -195,7 +194,6 @@ void nilfs_segbuf_prepare_write(struct nilfs_segment_buffer *, | |||
195 | struct nilfs_write_info *); | 194 | struct nilfs_write_info *); |
196 | int nilfs_segbuf_write(struct nilfs_segment_buffer *, | 195 | int nilfs_segbuf_write(struct nilfs_segment_buffer *, |
197 | struct nilfs_write_info *); | 196 | struct nilfs_write_info *); |
198 | int nilfs_segbuf_wait(struct nilfs_segment_buffer *, | 197 | int nilfs_segbuf_wait(struct nilfs_segment_buffer *segbuf); |
199 | struct nilfs_write_info *); | ||
200 | 198 | ||
201 | #endif /* _NILFS_SEGBUF_H */ | 199 | #endif /* _NILFS_SEGBUF_H */ |