linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/9] mm/fs: get PG_error out of the writeback reporting business
@ 2017-03-08 16:29 Jeff Layton
  2017-03-08 16:29 ` [PATCH v2 1/9] mm: fix mapping_set_error call in me_pagecache_dirty Jeff Layton
                   ` (8 more replies)
  0 siblings, 9 replies; 21+ messages in thread
From: Jeff Layton @ 2017-03-08 16:29 UTC (permalink / raw)
  To: viro, akpm
  Cc: konishi.ryusuke, linux-fsdevel, linux-mm, linux-kernel,
	linux-nilfs, ross.zwisler, jack, neilb, openosd, adilger,
	James.Bottomley

v2:
- still ClearPageError during __filemap_fdatawait_range
- clear AS_* errors when reporting errors during write initiation
- set mapping errors when launder_page fails
- set mapping errors when writeback fails during migration
- set mapping errors when DAX writeback fails
- Documentation patch to give guidance about writeback errors

Here is v2 of this set. The main difference is some new patches to
ensure that mapping errors get set in a few rather obscure places when
writeback fails, and a patch (based on Jan's suggestion) to clear out
the address space errors when initiating writeback fails with -EIO. I
also left the code clearing PG_error in __filemap_fdatawait_range. We
may want to remove that eventually, but we need to ensure that it gets
cleared in some way when writeback fails.

I've done a bit of testing with this (mostly xfstests on xfs), and it
seems to work ok AFAICT.

Original cover letter follows:

------------------------------8<-----------------------------

I recently did some work to wire up -ENOSPC handling in ceph, and found
I could get back -EIO errors in some cases when I should have instead
gotten -ENOSPC. The problem was that the ceph writeback code would set
PG_error on a writeback error, and that error would clobber the mapping
error.

While I fixed that problem by simply not setting that bit on errors,
that led me down a rabbit hole of looking at how PG_error is being
handled in the kernel.

This patch series is a few fixes for things that I 100% noticed by
inspection. I don't have a great way to test these since they involve
error handling. I can certainly doctor up a kernel to inject errors
in this code and test by hand however if these look plausible up front.

Jeff Layton (9):
  mm: fix mapping_set_error call in me_pagecache_dirty
  mm: drop "wait" parameter from write_one_page
  mm: clear any AS_* errors when returning error on any fsync or close
  nilfs2: set the mapping error when calling SetPageError on writeback
  dax: set error in mapping when writeback fails
  mm: set mapping error when launder_pages fails
  mm: ensure that we set mapping error if writeout() fails
  mm: don't TestClearPageError in __filemap_fdatawait_range
  Documentation: document what to do on a writeback error

 Documentation/filesystems/vfs.txt |  7 +++++++
 fs/dax.c                          |  4 +++-
 fs/exofs/dir.c                    |  2 +-
 fs/ext2/dir.c                     |  2 +-
 fs/jfs/jfs_metapage.c             |  4 ++--
 fs/minix/dir.c                    |  2 +-
 fs/nilfs2/segment.c               |  1 +
 fs/sysv/dir.c                     |  2 +-
 fs/ufs/dir.c                      |  2 +-
 include/linux/mm.h                |  2 +-
 mm/filemap.c                      | 40 ++++++++++++++++++++++-----------------
 mm/memory-failure.c               |  2 +-
 mm/migrate.c                      |  6 +++++-
 mm/page-writeback.c               | 14 +++++++-------
 mm/truncate.c                     |  6 +++++-
 15 files changed, 60 insertions(+), 36 deletions(-)

-- 
2.9.3

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2017-03-10  3:08 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-08 16:29 [PATCH v2 0/9] mm/fs: get PG_error out of the writeback reporting business Jeff Layton
2017-03-08 16:29 ` [PATCH v2 1/9] mm: fix mapping_set_error call in me_pagecache_dirty Jeff Layton
2017-03-10  0:06   ` Ross Zwisler
2017-03-08 16:29 ` [PATCH v2 2/9] mm: drop "wait" parameter from write_one_page Jeff Layton
2017-03-10  0:07   ` Ross Zwisler
2017-03-08 16:29 ` [PATCH v2 3/9] mm: clear any AS_* errors when returning error on any fsync or close Jeff Layton
2017-03-08 21:23   ` NeilBrown
2017-03-09  0:10     ` Jeff Layton
2017-03-10  0:09   ` Ross Zwisler
2017-03-10  3:08     ` Jeff Layton
2017-03-08 16:29 ` [PATCH v2 4/9] nilfs2: set the mapping error when calling SetPageError on writeback Jeff Layton
2017-03-08 16:29 ` [PATCH v2 5/9] dax: set error in mapping when writeback fails Jeff Layton
2017-03-10  0:21   ` Ross Zwisler
2017-03-08 16:29 ` [PATCH v2 6/9] mm: set mapping error when launder_pages fails Jeff Layton
2017-03-08 18:01   ` Trond Myklebust
2017-03-08 18:38     ` Jeff Layton
2017-03-08 19:16       ` Trond Myklebust
2017-03-08 21:28     ` NeilBrown
2017-03-08 16:29 ` [PATCH v2 7/9] mm: ensure that we set mapping error if writeout() fails Jeff Layton
2017-03-08 16:29 ` [PATCH v2 8/9] mm: don't TestClearPageError in __filemap_fdatawait_range Jeff Layton
2017-03-08 16:29 ` [PATCH v2 9/9] Documentation: document what to do on a writeback error Jeff Layton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).