diff options
author | David S. Miller <davem@davemloft.net> | 2010-09-09 02:49:04 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-09-09 02:49:04 -0400 |
commit | e199e6136ce6b151e6638ae93dca60748424d900 (patch) | |
tree | 0d66e0b5d227c36b005e4f5537f4bbcfc6ed4904 /include/linux/buffer_head.h | |
parent | 972c40b5bee429c84ba727f8ac0a08292bc5dc3d (diff) | |
parent | d56557af19867edb8c0e96f8e26399698a08857f (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'include/linux/buffer_head.h')
-rw-r--r-- | include/linux/buffer_head.h | 31 |
1 files changed, 8 insertions, 23 deletions
diff --git a/include/linux/buffer_head.h b/include/linux/buffer_head.h index 1b9ba193b789..ec94c12f21da 100644 --- a/include/linux/buffer_head.h +++ b/include/linux/buffer_head.h | |||
@@ -32,7 +32,6 @@ enum bh_state_bits { | |||
32 | BH_Delay, /* Buffer is not yet allocated on disk */ | 32 | BH_Delay, /* Buffer is not yet allocated on disk */ |
33 | BH_Boundary, /* Block is followed by a discontiguity */ | 33 | BH_Boundary, /* Block is followed by a discontiguity */ |
34 | BH_Write_EIO, /* I/O error on write */ | 34 | BH_Write_EIO, /* I/O error on write */ |
35 | BH_Ordered, /* ordered write */ | ||
36 | BH_Eopnotsupp, /* operation not supported (barrier) */ | 35 | BH_Eopnotsupp, /* operation not supported (barrier) */ |
37 | BH_Unwritten, /* Buffer is allocated on disk but not written */ | 36 | BH_Unwritten, /* Buffer is allocated on disk but not written */ |
38 | BH_Quiet, /* Buffer Error Prinks to be quiet */ | 37 | BH_Quiet, /* Buffer Error Prinks to be quiet */ |
@@ -125,7 +124,6 @@ BUFFER_FNS(Async_Write, async_write) | |||
125 | BUFFER_FNS(Delay, delay) | 124 | BUFFER_FNS(Delay, delay) |
126 | BUFFER_FNS(Boundary, boundary) | 125 | BUFFER_FNS(Boundary, boundary) |
127 | BUFFER_FNS(Write_EIO, write_io_error) | 126 | BUFFER_FNS(Write_EIO, write_io_error) |
128 | BUFFER_FNS(Ordered, ordered) | ||
129 | BUFFER_FNS(Eopnotsupp, eopnotsupp) | 127 | BUFFER_FNS(Eopnotsupp, eopnotsupp) |
130 | BUFFER_FNS(Unwritten, unwritten) | 128 | BUFFER_FNS(Unwritten, unwritten) |
131 | 129 | ||
@@ -183,6 +181,8 @@ void unlock_buffer(struct buffer_head *bh); | |||
183 | void __lock_buffer(struct buffer_head *bh); | 181 | void __lock_buffer(struct buffer_head *bh); |
184 | void ll_rw_block(int, int, struct buffer_head * bh[]); | 182 | void ll_rw_block(int, int, struct buffer_head * bh[]); |
185 | int sync_dirty_buffer(struct buffer_head *bh); | 183 | int sync_dirty_buffer(struct buffer_head *bh); |
184 | int __sync_dirty_buffer(struct buffer_head *bh, int rw); | ||
185 | void write_dirty_buffer(struct buffer_head *bh, int rw); | ||
186 | int submit_bh(int, struct buffer_head *); | 186 | int submit_bh(int, struct buffer_head *); |
187 | void write_boundary_block(struct block_device *bdev, | 187 | void write_boundary_block(struct block_device *bdev, |
188 | sector_t bblock, unsigned blocksize); | 188 | sector_t bblock, unsigned blocksize); |
@@ -203,12 +203,10 @@ int block_write_full_page_endio(struct page *page, get_block_t *get_block, | |||
203 | int block_read_full_page(struct page*, get_block_t*); | 203 | int block_read_full_page(struct page*, get_block_t*); |
204 | int block_is_partially_uptodate(struct page *page, read_descriptor_t *desc, | 204 | int block_is_partially_uptodate(struct page *page, read_descriptor_t *desc, |
205 | unsigned long from); | 205 | unsigned long from); |
206 | int block_write_begin_newtrunc(struct file *, struct address_space *, | 206 | int block_write_begin(struct address_space *mapping, loff_t pos, unsigned len, |
207 | loff_t, unsigned, unsigned, | 207 | unsigned flags, struct page **pagep, get_block_t *get_block); |
208 | struct page **, void **, get_block_t*); | 208 | int __block_write_begin(struct page *page, loff_t pos, unsigned len, |
209 | int block_write_begin(struct file *, struct address_space *, | 209 | get_block_t *get_block); |
210 | loff_t, unsigned, unsigned, | ||
211 | struct page **, void **, get_block_t*); | ||
212 | int block_write_end(struct file *, struct address_space *, | 210 | int block_write_end(struct file *, struct address_space *, |
213 | loff_t, unsigned, unsigned, | 211 | loff_t, unsigned, unsigned, |
214 | struct page *, void *); | 212 | struct page *, void *); |
@@ -217,9 +215,6 @@ int generic_write_end(struct file *, struct address_space *, | |||
217 | struct page *, void *); | 215 | struct page *, void *); |
218 | void page_zero_new_buffers(struct page *page, unsigned from, unsigned to); | 216 | void page_zero_new_buffers(struct page *page, unsigned from, unsigned to); |
219 | int block_prepare_write(struct page*, unsigned, unsigned, get_block_t*); | 217 | int block_prepare_write(struct page*, unsigned, unsigned, get_block_t*); |
220 | int cont_write_begin_newtrunc(struct file *, struct address_space *, loff_t, | ||
221 | unsigned, unsigned, struct page **, void **, | ||
222 | get_block_t *, loff_t *); | ||
223 | int cont_write_begin(struct file *, struct address_space *, loff_t, | 218 | int cont_write_begin(struct file *, struct address_space *, loff_t, |
224 | unsigned, unsigned, struct page **, void **, | 219 | unsigned, unsigned, struct page **, void **, |
225 | get_block_t *, loff_t *); | 220 | get_block_t *, loff_t *); |
@@ -230,12 +225,7 @@ int block_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf, | |||
230 | void block_sync_page(struct page *); | 225 | void block_sync_page(struct page *); |
231 | sector_t generic_block_bmap(struct address_space *, sector_t, get_block_t *); | 226 | sector_t generic_block_bmap(struct address_space *, sector_t, get_block_t *); |
232 | int block_truncate_page(struct address_space *, loff_t, get_block_t *); | 227 | int block_truncate_page(struct address_space *, loff_t, get_block_t *); |
233 | int file_fsync(struct file *, int); | 228 | int nobh_write_begin(struct address_space *, loff_t, unsigned, unsigned, |
234 | int nobh_write_begin_newtrunc(struct file *, struct address_space *, | ||
235 | loff_t, unsigned, unsigned, | ||
236 | struct page **, void **, get_block_t*); | ||
237 | int nobh_write_begin(struct file *, struct address_space *, | ||
238 | loff_t, unsigned, unsigned, | ||
239 | struct page **, void **, get_block_t*); | 229 | struct page **, void **, get_block_t*); |
240 | int nobh_write_end(struct file *, struct address_space *, | 230 | int nobh_write_end(struct file *, struct address_space *, |
241 | loff_t, unsigned, unsigned, | 231 | loff_t, unsigned, unsigned, |
@@ -314,15 +304,10 @@ map_bh(struct buffer_head *bh, struct super_block *sb, sector_t block) | |||
314 | bh->b_size = sb->s_blocksize; | 304 | bh->b_size = sb->s_blocksize; |
315 | } | 305 | } |
316 | 306 | ||
317 | /* | ||
318 | * Calling wait_on_buffer() for a zero-ref buffer is illegal, so we call into | ||
319 | * __wait_on_buffer() just to trip a debug check. Because debug code in inline | ||
320 | * functions is bloaty. | ||
321 | */ | ||
322 | static inline void wait_on_buffer(struct buffer_head *bh) | 307 | static inline void wait_on_buffer(struct buffer_head *bh) |
323 | { | 308 | { |
324 | might_sleep(); | 309 | might_sleep(); |
325 | if (buffer_locked(bh) || atomic_read(&bh->b_count) == 0) | 310 | if (buffer_locked(bh)) |
326 | __wait_on_buffer(bh); | 311 | __wait_on_buffer(bh); |
327 | } | 312 | } |
328 | 313 | ||