aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4
diff options
context:
space:
mode:
authorAndi Kleen <andi@firstfloor.org>2009-09-16 05:50:16 -0400
committerAndi Kleen <ak@linux.intel.com>2009-09-16 05:50:16 -0400
commitaa261f549d7652258331ebb12795f3bc4395d213 (patch)
tree0ca807db32a6e3f213fa52b5a053d2b27e5e6bac /fs/ext4
parent6a46079cf57a7f7758e8b926980a4f852f89b34d (diff)
HWPOISON: Enable .remove_error_page for migration aware file systems
Enable removing of corrupted pages through truncation for a bunch of file systems: ext*, xfs, gfs2, ocfs2, ntfs These should cover most server needs. I chose the set of migration aware file systems for this for now, assuming they have been especially audited. But in general it should be safe for all file systems on the data area that support read/write and truncate. Caveat: the hardware error handler does not take i_mutex for now before calling the truncate function. Is that ok? Cc: tytso@mit.edu Cc: hch@infradead.org Cc: mfasheh@suse.com Cc: aia21@cantab.net Cc: hugh.dickins@tiscali.co.uk Cc: swhiteho@redhat.com Signed-off-by: Andi Kleen <ak@linux.intel.com>
Diffstat (limited to 'fs/ext4')
-rw-r--r--fs/ext4/inode.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index f9c642b22efa..349dd6b4da47 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -3373,6 +3373,7 @@ static const struct address_space_operations ext4_ordered_aops = {
3373 .direct_IO = ext4_direct_IO, 3373 .direct_IO = ext4_direct_IO,
3374 .migratepage = buffer_migrate_page, 3374 .migratepage = buffer_migrate_page,
3375 .is_partially_uptodate = block_is_partially_uptodate, 3375 .is_partially_uptodate = block_is_partially_uptodate,
3376 .error_remove_page = generic_error_remove_page,
3376}; 3377};
3377 3378
3378static const struct address_space_operations ext4_writeback_aops = { 3379static const struct address_space_operations ext4_writeback_aops = {
@@ -3388,6 +3389,7 @@ static const struct address_space_operations ext4_writeback_aops = {
3388 .direct_IO = ext4_direct_IO, 3389 .direct_IO = ext4_direct_IO,
3389 .migratepage = buffer_migrate_page, 3390 .migratepage = buffer_migrate_page,
3390 .is_partially_uptodate = block_is_partially_uptodate, 3391 .is_partially_uptodate = block_is_partially_uptodate,
3392 .error_remove_page = generic_error_remove_page,
3391}; 3393};
3392 3394
3393static const struct address_space_operations ext4_journalled_aops = { 3395static const struct address_space_operations ext4_journalled_aops = {
@@ -3402,6 +3404,7 @@ static const struct address_space_operations ext4_journalled_aops = {
3402 .invalidatepage = ext4_invalidatepage, 3404 .invalidatepage = ext4_invalidatepage,
3403 .releasepage = ext4_releasepage, 3405 .releasepage = ext4_releasepage,
3404 .is_partially_uptodate = block_is_partially_uptodate, 3406 .is_partially_uptodate = block_is_partially_uptodate,
3407 .error_remove_page = generic_error_remove_page,
3405}; 3408};
3406 3409
3407static const struct address_space_operations ext4_da_aops = { 3410static const struct address_space_operations ext4_da_aops = {
@@ -3418,6 +3421,7 @@ static const struct address_space_operations ext4_da_aops = {
3418 .direct_IO = ext4_direct_IO, 3421 .direct_IO = ext4_direct_IO,
3419 .migratepage = buffer_migrate_page, 3422 .migratepage = buffer_migrate_page,
3420 .is_partially_uptodate = block_is_partially_uptodate, 3423 .is_partially_uptodate = block_is_partially_uptodate,
3424 .error_remove_page = generic_error_remove_page,
3421}; 3425};
3422 3426
3423void ext4_set_aops(struct inode *inode) 3427void ext4_set_aops(struct inode *inode)