linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 00/17] fs: introduce new writeback error reporting and convert existing API as a wrapper around it
@ 2017-04-12 12:05 Jeff Layton
  2017-04-12 12:05 ` [PATCH v2 01/17] mm: drop "wait" parameter from write_one_page Jeff Layton
                   ` (16 more replies)
  0 siblings, 17 replies; 44+ messages in thread
From: Jeff Layton @ 2017-04-12 12:05 UTC (permalink / raw)
  To: linux-fsdevel; +Cc: linux-kernel, akpm, tytso, jack, willy, neilb, viro

This is the second posting of this patchset. The basic idea with this
set is to tighten up how we handle errors that occur during writeback.
There are many places where writeback errors in the kernel can be lost
today, which can cause silent data corruption.

Also, the current method of clearing errors out of the mapping on fsync
has always been something of a problem for userland. This replaces it
with better defined semantics where userland can ensure that writeback
errors are reported on all open file descriptors.

In addition to incorporating review feedback (mostly from Neil and
Willy), this reworks the existing API for tracking writeback errors into
wrappers around the new API. That will greatly reduce the amount of code
we'll need to change in filesystem specific drivers if it turns out to
be an acceptable approach. If that does seem reasonable, then we can
probably get rid of the new API and just drop it in as replacements for
the old one.

Despite the small diffstat here this is a fairly major change to how
writeback errors are handled, and will need careful review and testing.

This works as expected with some really basic by-hand testing, and it of
course works when there are no errors in play. Once the patchset is a
bit more settled, I do still plan to roll some xfstests to validate that
this works and keeps working as expected.

Comments and feedback are welcome here.

Jeff Layton (17):
  mm: drop "wait" parameter from write_one_page
  mm: fix mapping_set_error call in me_pagecache_dirty
  buffer: use mapping_set_error instead of setting the flag
  ext2: don't test/clear AS_EIO flag
  orangefs: don't call filemap_write_and_wait from fsync
  mm: doc comment for scary spot in write_one_page
  fs: new infrastructure for writeback error handling and reporting
  fs: retrofit old error reporting API onto new infrastructure
  mm: remove AS_EIO and AS_ENOSPC flags
  dax: set errors in mapping when writeback fails
  nilfs2: set the mapping error when calling SetPageError on writeback
  mm: ensure that we set mapping error if writeout() fails
  mm: don't TestClearPageError in __filemap_fdatawait_range
  9p: set mapping error when writeback fails in launder_page
  fuse: set mapping error in writepage_locked when it fails
  cifs: set mapping error when page writeback fails in writepage or
    launder_pages
  cifs: remove some unneeded mapping_set_error calls

 Documentation/filesystems/vfs.txt |  13 +-
 fs/9p/vfs_addr.c                  |   5 +-
 fs/btrfs/file.c                   |  10 +-
 fs/btrfs/tree-log.c               |   9 +-
 fs/buffer.c                       |   2 +-
 fs/cifs/cifsfs.c                  |   4 +-
 fs/cifs/file.c                    |  14 +--
 fs/cifs/inode.c                   |   6 +-
 fs/dax.c                          |   4 +-
 fs/exofs/dir.c                    |   2 +-
 fs/ext2/dir.c                     |   2 +-
 fs/ext2/file.c                    |   8 +-
 fs/f2fs/file.c                    |   3 +
 fs/f2fs/node.c                    |   6 +-
 fs/fuse/file.c                    |   8 +-
 fs/jfs/jfs_metapage.c             |   4 +-
 fs/minix/dir.c                    |   2 +-
 fs/nilfs2/segment.c               |   1 +
 fs/open.c                         |   3 +
 fs/orangefs/file.c                |   5 +-
 fs/sync.c                         |   5 +-
 fs/sysv/dir.c                     |   2 +-
 fs/ufs/dir.c                      |   2 +-
 include/linux/fs.h                |  24 +++-
 include/linux/mm.h                |   2 +-
 include/linux/pagemap.h           |  17 +--
 ipc/shm.c                         |   5 +-
 mm/filemap.c                      | 258 ++++++++++++++++++++++++++++++++------
 mm/memory-failure.c               |   2 +-
 mm/migrate.c                      |   6 +-
 mm/page-writeback.c               |  20 +--
 31 files changed, 341 insertions(+), 113 deletions(-)

-- 
2.9.3

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

end of thread, other threads:[~2017-04-24 11:50 UTC | newest]

Thread overview: 44+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-12 12:05 [PATCH v2 00/17] fs: introduce new writeback error reporting and convert existing API as a wrapper around it Jeff Layton
2017-04-12 12:05 ` [PATCH v2 01/17] mm: drop "wait" parameter from write_one_page Jeff Layton
2017-04-12 12:15   ` Jan Kara
2017-04-12 14:27   ` Matthew Wilcox
2017-04-12 14:34     ` Jeff Layton
2017-04-12 15:12     ` Dave Kleikamp
2017-04-12 12:05 ` [PATCH v2 02/17] mm: fix mapping_set_error call in me_pagecache_dirty Jeff Layton
2017-04-12 12:16   ` Jan Kara
2017-04-12 14:28   ` Matthew Wilcox
2017-04-12 12:06 ` [PATCH v2 03/17] buffer: use mapping_set_error instead of setting the flag Jeff Layton
2017-04-12 12:17   ` Jan Kara
2017-04-12 14:29   ` Matthew Wilcox
2017-04-12 12:06 ` [PATCH v2 04/17] ext2: don't test/clear AS_EIO flag Jeff Layton
2017-04-12 12:29   ` Jan Kara
2017-04-12 12:30     ` Jeff Layton
2017-04-12 12:06 ` [PATCH v2 05/17] orangefs: don't call filemap_write_and_wait from fsync Jeff Layton
2017-04-12 12:06 ` [PATCH v2 06/17] mm: doc comment for scary spot in write_one_page Jeff Layton
2017-04-12 13:01   ` Jeff Layton
2017-04-12 14:38     ` Matthew Wilcox
2017-04-12 15:52       ` Jeff Layton
2017-04-12 21:36         ` NeilBrown
2017-04-12 22:55           ` Jeff Layton
2017-04-12 12:06 ` [PATCH v2 07/17] fs: new infrastructure for writeback error handling and reporting Jeff Layton
2017-04-12 18:42   ` Jeff Layton
2017-04-12 21:55     ` NeilBrown
2017-04-12 23:01       ` Jeff Layton
2017-04-17 22:53         ` NeilBrown
2017-04-12 12:06 ` [PATCH v2 08/17] fs: retrofit old error reporting API onto new infrastructure Jeff Layton
2017-04-12 22:14   ` NeilBrown
2017-04-12 22:41     ` Jeff Layton
2017-04-17 22:56       ` NeilBrown
2017-04-21 12:46         ` Jeff Layton
2017-04-23 22:38           ` NeilBrown
2017-04-24 11:50             ` Jeff Layton
2017-04-17 15:17     ` Jeff Layton
2017-04-12 12:06 ` [PATCH v2 09/17] mm: remove AS_EIO and AS_ENOSPC flags Jeff Layton
2017-04-12 12:06 ` [PATCH v2 10/17] dax: set errors in mapping when writeback fails Jeff Layton
2017-04-12 12:06 ` [PATCH v2 11/17] nilfs2: set the mapping error when calling SetPageError on writeback Jeff Layton
2017-04-12 12:06 ` [PATCH v2 12/17] mm: ensure that we set mapping error if writeout() fails Jeff Layton
2017-04-12 12:06 ` [PATCH v2 13/17] mm: don't TestClearPageError in __filemap_fdatawait_range Jeff Layton
2017-04-12 12:06 ` [PATCH v2 14/17] 9p: set mapping error when writeback fails in launder_page Jeff Layton
2017-04-12 12:06 ` [PATCH v2 15/17] fuse: set mapping error in writepage_locked when it fails Jeff Layton
2017-04-12 12:06 ` [PATCH v2 16/17] cifs: set mapping error when page writeback fails in writepage or launder_pages Jeff Layton
2017-04-12 12:06 ` [PATCH v2 17/17] cifs: remove some unneeded mapping_set_error calls 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).