Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1592766

[PATCH 1/3] nilfs2: set the mapping error when calling SetPageError on writeback

From Jeff Layton <jlayton@redhat.com>
Newsgroups linux.kernel
Subject [PATCH 1/3] nilfs2: set the mapping error when calling SetPageError on writeback
Date 2017-03-05 15:00 +0100
Message-ID <thERA-18s-9@gated-at.bofh.it> (permalink)
References <thEHU-ZX-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


In a later patch, we're going to want to make the fsync codepath not do
a TestClearPageError call as that can override the error set in the
address space. To do that though, we need to ensure that filesystems
that are relying on the PG_error bit for reporting writeback errors
also set an error in the address space.

The only place I've found that looks potentially problematic is this
spot in nilfs2. Ensure that it sets an error in the mapping in addition
to setting PageError.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
---
 fs/nilfs2/segment.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/fs/nilfs2/segment.c b/fs/nilfs2/segment.c
index bedcae2c28e6..c1041b07060e 100644
--- a/fs/nilfs2/segment.c
+++ b/fs/nilfs2/segment.c
@@ -1743,6 +1743,7 @@ static void nilfs_end_page_io(struct page *page, int err)
 	} else {
 		__set_page_dirty_nobuffers(page);
 		SetPageError(page);
+		mapping_set_error(page_mapping(page), err);
 	}
 
 	end_page_writeback(page);
-- 
2.9.3

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/3] mm/fs: get PG_error out of the writeback reporting business Jeff Layton <jlayton@redhat.com> - 2017-03-05 14:50 +0100
  [PATCH 3/3] mm: set mapping error when launder_pages fails Jeff Layton <jlayton@redhat.com> - 2017-03-05 14:50 +0100
  [PATCH 1/3] nilfs2: set the mapping error when calling SetPageError on writeback Jeff Layton <jlayton@redhat.com> - 2017-03-05 15:00 +0100
    Re: [PATCH 1/3] nilfs2: set the mapping error when calling  SetPageError on writeback Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> - 2017-03-07 17:50 +0100
  Re: [PATCH 0/3] mm/fs: get PG_error out of the writeback reporting  business Jeff Layton <jlayton@redhat.com> - 2017-03-05 15:50 +0100
    Re: [PATCH 0/3] mm/fs: get PG_error out of the writeback reporting  business Ross Zwisler <ross.zwisler@linux.intel.com> - 2017-03-07 03:00 +0100
      Re: [PATCH 0/3] mm/fs: get PG_error out of the writeback reporting  business Jan Kara <jack@suse.cz> - 2017-03-07 11:40 +0100
        Re: [PATCH 0/3] mm/fs: get PG_error out of the writeback reporting  business Jeff Layton <jlayton@redhat.com> - 2017-03-07 15:40 +0100
        Re: [PATCH 0/3] mm/fs: get PG_error out of the writeback reporting  business Ross Zwisler <ross.zwisler@linux.intel.com> - 2017-03-07 17:10 +0100
          Re: [PATCH 0/3] mm/fs: get PG_error out of the writeback reporting  business Jan Kara <jack@suse.cz> - 2017-03-07 17:50 +0100
        Re: [PATCH 0/3] mm/fs: get PG_error out of the writeback reporting  business Theodore Ts'o <tytso@mit.edu> - 2017-03-09 04:00 +0100
          Re: [PATCH 0/3] mm/fs: get PG_error out of the writeback reporting  business Jan Kara <jack@suse.cz> - 2017-03-09 10:30 +0100
            Re: [PATCH 0/3] mm/fs: get PG_error out of the writeback reporting  business Jeff Layton <jlayton@redhat.com> - 2017-03-09 12:00 +0100
              Re: [PATCH 0/3] mm/fs: get PG_error out of the writeback reporting  business Jan Kara <jack@suse.cz> - 2017-03-09 12:10 +0100
                Re: [PATCH 0/3] mm/fs: get PG_error out of the writeback reporting  business Jeff Layton <jlayton@redhat.com> - 2017-03-09 13:50 +0100
                Re: [PATCH 0/3] mm/fs: get PG_error out of the writeback reporting  business Brian Foster <bfoster@redhat.com> - 2017-03-09 14:30 +0100
                Re: [PATCH 0/3] mm/fs: get PG_error out of the writeback reporting  business Theodore Ts'o <tytso@mit.edu> - 2017-03-09 16:10 +0100
  [PATCH 2/3] mm: don't TestClearPageError in __filemap_fdatawait_range Jeff Layton <jlayton@redhat.com> - 2017-03-05 16:30 +0100
  Re: [PATCH 0/3] mm/fs: get PG_error out of the writeback reporting business NeilBrown <neilb@suse.com> - 2017-03-06 04:10 +0100
    Re: [PATCH 0/3] mm/fs: get PG_error out of the writeback reporting  business Jeff Layton <jlayton@redhat.com> - 2017-03-06 12:50 +0100

csiph-web