summaryrefslogtreecommitdiff
path: root/fs/nilfs2/segbuf.h
diff options
context:
space:
mode:
authorRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>2009-11-24 19:04:21 +0300
committerRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>2009-11-30 15:05:57 +0300
commit9284ad2a9016ad631460caf8fd01fc21d84f118c (patch)
tree6ef77d51ca75017a1632bf215703ed9ee12feade /fs/nilfs2/segbuf.h
parent5f1586d0dd8f6eeecf6c0d35cbca6291afd6f1cc (diff)
downloadlinux-9284ad2a9016ad631460caf8fd01fc21d84f118c.tar.xz
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.h16
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 {
* @sb_rest_blocks: Number of residual blocks in the current segment
* @sb_segsum_buffers: List of buffers for segment summaries
* @sb_payload_buffers: List of buffers for segment payload
- * @sb_io_error: I/O error status
+ * @sb_nbio: Number of flying bio requests
+ * @sb_err: I/O error status
+ * @sb_bio_event: Completion event of log writing
*/
struct nilfs_segment_buffer {
struct super_block *sb_super;
@@ -96,7 +98,9 @@ struct nilfs_segment_buffer {
struct list_head sb_payload_buffers; /* including super root */
/* io status */
- int sb_io_error;
+ int sb_nbio;
+ atomic_t sb_err;
+ struct completion sb_bio_event;
};
#define NILFS_LIST_SEGBUF(head) \
@@ -177,11 +181,6 @@ struct nilfs_write_info {
int nr_vecs;
sector_t blocknr;
- int nbio;
- atomic_t err;
- struct completion bio_event;
- /* completion event of segment write */
-
/*
* The following fields must be set explicitly
*/
@@ -195,7 +194,6 @@ void nilfs_segbuf_prepare_write(struct nilfs_segment_buffer *,
struct nilfs_write_info *);
int nilfs_segbuf_write(struct nilfs_segment_buffer *,
struct nilfs_write_info *);
-int nilfs_segbuf_wait(struct nilfs_segment_buffer *,
- struct nilfs_write_info *);
+int nilfs_segbuf_wait(struct nilfs_segment_buffer *segbuf);
#endif /* _NILFS_SEGBUF_H */