diff options
author | Nick Piggin <npiggin@suse.de> | 2007-10-16 04:25:01 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-16 12:42:55 -0400 |
commit | afddba49d18f346e5cc2938b6ed7c512db18ca68 (patch) | |
tree | 4726e3d3b0e9e8e5b5d3b2b0cccb36446bbdf3ca /include/linux/buffer_head.h | |
parent | 637aff46f94a754207c80c8c64bf1b74f24b967d (diff) |
fs: introduce write_begin, write_end, and perform_write aops
These are intended to replace prepare_write and commit_write with more
flexible alternatives that are also able to avoid the buffered write
deadlock problems efficiently (which prepare_write is unable to do).
[mark.fasheh@oracle.com: API design contributions, code review and fixes]
[akpm@linux-foundation.org: various fixes]
[dmonakhov@sw.ru: new aop block_write_begin fix]
Signed-off-by: Nick Piggin <npiggin@suse.de>
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
Signed-off-by: Dmitriy Monakhov <dmonakhov@openvz.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/buffer_head.h')
-rw-r--r-- | include/linux/buffer_head.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/buffer_head.h b/include/linux/buffer_head.h index 35cadad84b14..a562ecfb1a14 100644 --- a/include/linux/buffer_head.h +++ b/include/linux/buffer_head.h | |||
@@ -203,6 +203,16 @@ void block_invalidatepage(struct page *page, unsigned long offset); | |||
203 | int block_write_full_page(struct page *page, get_block_t *get_block, | 203 | int block_write_full_page(struct page *page, get_block_t *get_block, |
204 | struct writeback_control *wbc); | 204 | struct writeback_control *wbc); |
205 | int block_read_full_page(struct page*, get_block_t*); | 205 | int block_read_full_page(struct page*, get_block_t*); |
206 | int block_write_begin(struct file *, struct address_space *, | ||
207 | loff_t, unsigned, unsigned, | ||
208 | struct page **, void **, get_block_t*); | ||
209 | int block_write_end(struct file *, struct address_space *, | ||
210 | loff_t, unsigned, unsigned, | ||
211 | struct page *, void *); | ||
212 | int generic_write_end(struct file *, struct address_space *, | ||
213 | loff_t, unsigned, unsigned, | ||
214 | struct page *, void *); | ||
215 | void page_zero_new_buffers(struct page *page, unsigned from, unsigned to); | ||
206 | int block_prepare_write(struct page*, unsigned, unsigned, get_block_t*); | 216 | int block_prepare_write(struct page*, unsigned, unsigned, get_block_t*); |
207 | int cont_prepare_write(struct page*, unsigned, unsigned, get_block_t*, | 217 | int cont_prepare_write(struct page*, unsigned, unsigned, get_block_t*, |
208 | loff_t *); | 218 | loff_t *); |