diff options
author | Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> | 2009-11-28 11:17:31 -0500 |
---|---|---|
committer | Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> | 2009-11-30 07:06:35 -0500 |
commit | 9c965bac169f786cc6cca8ff81d3b636e923c960 (patch) | |
tree | 71c05d6e981e2b2c5c3797cbcf8b8e619b48e966 /fs/nilfs2/segbuf.h | |
parent | 9284ad2a9016ad631460caf8fd01fc21d84f118c (diff) |
nilfs2: hide nilfs_write_info struct in segment buffer code
Hides nilfs_write_info struct and nilfs_segbuf_prepare_write function
in segbuf.c to simplify the interface of nilfs_segbuf_write function.
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 | 24 |
1 files changed, 2 insertions, 22 deletions
diff --git a/fs/nilfs2/segbuf.h b/fs/nilfs2/segbuf.h index bd076cca37a8..241a00dc4988 100644 --- a/fs/nilfs2/segbuf.h +++ b/fs/nilfs2/segbuf.h | |||
@@ -27,7 +27,6 @@ | |||
27 | #include <linux/buffer_head.h> | 27 | #include <linux/buffer_head.h> |
28 | #include <linux/bio.h> | 28 | #include <linux/bio.h> |
29 | #include <linux/completion.h> | 29 | #include <linux/completion.h> |
30 | #include <linux/backing-dev.h> | ||
31 | 30 | ||
32 | /** | 31 | /** |
33 | * struct nilfs_segsum_info - On-memory segment summary | 32 | * struct nilfs_segsum_info - On-memory segment summary |
@@ -173,27 +172,8 @@ static inline void nilfs_segbuf_clear(struct nilfs_segment_buffer *segbuf) | |||
173 | nilfs_release_buffers(&segbuf->sb_payload_buffers); | 172 | nilfs_release_buffers(&segbuf->sb_payload_buffers); |
174 | } | 173 | } |
175 | 174 | ||
176 | struct nilfs_write_info { | 175 | int nilfs_segbuf_write(struct nilfs_segment_buffer *segbuf, |
177 | struct bio *bio; | 176 | struct the_nilfs *nilfs); |
178 | int start, end; /* The region to be submitted */ | ||
179 | int rest_blocks; | ||
180 | int max_pages; | ||
181 | int nr_vecs; | ||
182 | sector_t blocknr; | ||
183 | |||
184 | /* | ||
185 | * The following fields must be set explicitly | ||
186 | */ | ||
187 | struct super_block *sb; | ||
188 | struct backing_dev_info *bdi; /* backing dev info */ | ||
189 | struct buffer_head *bh_sr; | ||
190 | }; | ||
191 | |||
192 | |||
193 | void nilfs_segbuf_prepare_write(struct nilfs_segment_buffer *, | ||
194 | struct nilfs_write_info *); | ||
195 | int nilfs_segbuf_write(struct nilfs_segment_buffer *, | ||
196 | struct nilfs_write_info *); | ||
197 | int nilfs_segbuf_wait(struct nilfs_segment_buffer *segbuf); | 177 | int nilfs_segbuf_wait(struct nilfs_segment_buffer *segbuf); |
198 | 178 | ||
199 | #endif /* _NILFS_SEGBUF_H */ | 179 | #endif /* _NILFS_SEGBUF_H */ |