History

[PATCH] ext3: Fix unmapped buffers in transaction's lists

Fix the problem (BUG 4964) with unmapped buffers in transaction's t_sync_data list. The problem is we need to call filesystem's own invalidatepage() from block_write_full_page(). block_write_full_page() must call filesystem's invalidatepage(). Otherwise following nasty race can happen: proc 1 proc 2 ------ ------ - write some new data to 'offset' => bh gets to the transactions data list - starts truncate => i_size set to new size - mpage_writepages() - ext3_ordered_writepage() to 'offset' - block_write_full_page() - page->index > end_index+1 - block_invalidatepage() - discard_buffer() - clear_buffer_mapped() - commit triggers and finds unmapped buffer - BOOM!

Jan Kara committed 21 years ago

Commit aaa40591 parent e812cb53 files · +12 −11Browse files

Showing the changes to include/linux/buffer_head.h (1 of 3 files). Show all

Unified · Split

include/linux/buffer_head.h+1−0
@@ -190,6 +190,7 @@ extern int buffer_heads_over_limit; · 189 unmodified lines
190 */190 */
191int try_to_release_page(struct page * page, gfp_t gfp_mask);191int try_to_release_page(struct page * page, gfp_t gfp_mask);
192int block_invalidatepage(struct page *page, unsigned long offset);192int block_invalidatepage(struct page *page, unsigned long offset);
193int do_invalidatepage(struct page *page, unsigned long offset);
193int block_write_full_page(struct page *page, get_block_t *get_block,194int block_write_full_page(struct page *page, get_block_t *get_block,
194 struct writeback_control *wbc);195 struct writeback_control *wbc);
195int block_read_full_page(struct page*, get_block_t*);196int block_read_full_page(struct page*, get_block_t*);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t