From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qt0-f177.google.com ([209.85.216.177]:36128 "EHLO mail-qt0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933547AbdGCN7I (ORCPT ); Mon, 3 Jul 2017 09:59:08 -0400 Received: by mail-qt0-f177.google.com with SMTP id i2so143827136qta.3 for ; Mon, 03 Jul 2017 06:59:08 -0700 (PDT) Message-ID: <1499090338.4737.9.camel@redhat.com> Subject: [GIT PULL] file locking and writeback error handling patches for v4.13 From: Jeff Layton To: Linus Torvalds Cc: Kees Cook , LKML , linux-fsdevel Date: Mon, 03 Jul 2017 09:58:58 -0400 Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-XGF7psIM5tW+k3T/P1KB" Mime-Version: 1.0 Sender: linux-fsdevel-owner@vger.kernel.org List-ID: --=-XGF7psIM5tW+k3T/P1KB Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable The following changes since commit c86daad2c25bfd4a33d48b7691afaa96d9c5ab46= : Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git= /dtor/input (2017-05-26 16:45:13 -0700) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux.git tags/for-= linus-v4.13 for you to fetch changes up to d997cba55291de59ed4a107394ac2e61b6379ac2: btrfs: minimal conversion to errseq_t writeback error reporting on fsync = (2017-07-03 08:41:09 -0400) ---------------------------------------------------------------- File locking and writeback error handling patches for v4.13 First, this PR contains a small pile of file-locking and fcntl.c related changes (some of which have also been pulled into Al's tree). After that, there is a pile of patches to clean up the handling of writeback errors from the pagecache. That part strays outside the usual area of my PRs. The changes touch a lot of areas though, so I think it's best to pull them in as a set rather than feeding them via subsystem trees. In addition to cleaning up races and other bugs, new infrastructure is added to handle tracking errors that occur during data writeback to allow for more reliable reporting of those errors to fsync/fdatasync/msync. For now, only ext*, xfs, btrfs and some other simple block-based filesystems (FAT, minix, etc.) are converted to the new behavior. We'll be converting others over the next few releases. Note that there may be some trivial merge conflicts between this and Kees Cook's KSPP PR. They should be simple to resolve, but let me know if they aren't. ---------------------------------------------------------------- Benjamin Coddington (3): fs/locks: Use allocation rather than the stack in fcntl_getlk() fs/locks: Remove fl_nspid and use fs-specific l_pid for remote locks staging/lustre, 9p, ceph, cifs, dlm: negate remote pids for F_GETLK Christoph Hellwig (2): fs/locks: pass kernel struct flock to fcntl_getlk/setlk fs/locks: don't mess with the address limit in compat_fcntl64 Dave Kleikamp (1): JFS: do not ignore return code from write_one_page() Jeff Layton (21): fs/fcntl: return -ESRCH in f_setown when pid/pgid can't be found mm: drop "wait" parameter from write_one_page() mm: fix mapping_set_error call in me_pagecache_dirty fs: remove call_fsync helper function buffer: use mapping_set_error instead of setting the flag fs: check for writeback errors after syncing out buffers in generic_f= ile_fsync buffer: set errors in mapping at the time that the error occurs jbd2: don't clear and reset errors after waiting on writeback mm: clear AS_EIO/AS_ENOSPC when writeback initiation fails mm: don't TestClearPageError in __filemap_fdatawait_range mm: clean up error handling in write_one_page lib: add errseq_t type and infrastructure for handling it fs: new infrastructure for writeback error handling and reporting mm: set both AS_EIO/AS_ENOSPC and errseq_t in mapping_set_error Documentation: flesh out the section in vfs.txt on storing and report= ing writeback errors dax: set errors in mapping when writeback fails block: convert to errseq_t based writeback error tracking fs: convert __generic_file_fsync to use errseq_t based reporting ext4: use errseq_t based error handling for reporting data writeback = errors xfs: minimal conversion to errseq_t writeback error reporting btrfs: minimal conversion to errseq_t writeback error reporting on fs= ync Jiri Slaby (2): fs/fcntl: f_setown, allow returning error fs/fcntl: f_setown, avoid undefined behaviour Mauro Carvalho Chehab (1): fs: locks: Fix some troubles at kernel-doc comments Documentation/filesystems/vfs.txt | 44 ++++- MAINTAINERS | 6 + drivers/dax/device.c | 1 + drivers/staging/lustre/lustre/ldlm/ldlm_flock.c | 2 +- fs/9p/vfs_file.c | 2 +- fs/block_dev.c | 3 +- fs/btrfs/file.c | 13 +- fs/buffer.c | 20 ++- fs/ceph/locks.c | 2 +- fs/cifs/cifssmb.c | 2 +- fs/dax.c | 4 +- fs/dlm/plock.c | 2 +- fs/exofs/dir.c | 2 +- fs/ext2/dir.c | 2 +- fs/ext2/file.c | 5 +- fs/ext4/fsync.c | 2 +- fs/fcntl.c | 172 +++++++++++++------- fs/file_table.c | 1 + fs/fuse/file.c | 6 +- fs/gfs2/lops.c | 2 +- fs/jbd2/commit.c | 16 +- fs/jfs/jfs_metapage.c | 7 +- fs/jfs/jfs_metapage.h | 1 + fs/libfs.c | 6 +- fs/locks.c | 193 ++++++++++----------= -- fs/minix/dir.c | 2 +- fs/open.c | 3 + fs/sync.c | 2 +- fs/sysv/dir.c | 2 +- fs/ufs/dir.c | 2 +- fs/xfs/xfs_file.c | 2 +- include/linux/buffer_head.h | 1 + include/linux/errseq.h | 19 +++ include/linux/fs.h | 80 +++++++-- include/linux/mm.h | 2 +- include/linux/pagemap.h | 31 +++- include/trace/events/filemap.h | 57 +++++++ ipc/shm.c | 2 +- lib/Makefile | 2 +- lib/errseq.c | 208 ++++++++++++++++++++= ++++ mm/filemap.c | 126 ++++++++++++-- mm/memory-failure.c | 2 +- mm/page-writeback.c | 19 +-- net/socket.c | 3 +- 44 files changed, 806 insertions(+), 275 deletions(-) create mode 100644 include/linux/errseq.h create mode 100644 lib/errseq.c --=20 Jeff Layton --=-XGF7psIM5tW+k3T/P1KB Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iQJHBAABCAAxFiEES8DXskRxsqGE6vXTAA5oQRlWghUFAllaTaITHGpsYXl0b25A cmVkaGF0LmNvbQAKCRAADmhBGVaCFRFoD/0adjYJ6QSNdw6LE7Qw8Qt/9dlpcXmX iAqEt5BEB0y0ptTHftipW++x8tou/hojNKBgU/RVKXMFrZeUQZzkAmV859v6p5OZ f/1F8RwGkxP9duzZ3jugMCAKgrfGhXaxWve2HACD9bh/Hj2wQPc5dNOSYVN3wx0z SgniqQLa9JZLSKTfAi2d3fU4+MJ/s0/9z3bQVF59Ku73WqLZXSzLOvQ3lRujMnmX xHpv9pCtEMcmVPJYrl/kH1aRtJXQUzOX+kM+HYAOpQIwITSxAYV2A+cUNJkz7ZrY wOm397YoqHRoZ7JisHkNbPaIANa20F3oTzKdVCvtQbByBtaBjmGfhNhK02n9Sd8h HdLSm5iaPo4Is6GyX642qQMt32hjmS88GcvbjqQErkGxqOszHB6C5nmepS5EK8zD 6pzwp+l6QE23XRrgO28jUETHWdEVscf3QhPaPbvRL3/QSBxTClL9ZjntjmG+dPPN tRp6Brro0Vg6lJSU3mOvIvgtuMMvs4QOZ+JThmtrDta31sQzaIzvS4X3kIz/AQYU +Qrmf04QbMDHIBHILeAWFDyEG6DAzEAB0vWgK55oqYTrFM2bqoSvFy46N/Cx6P+m f3VDOFOkCM+SSDB6O/ZJNMzlxhlTRtKwFxYhaPRRchBAivOF4kUcu5XOhXP50hpG h0DjAyST1jqMag== =bkZv -----END PGP SIGNATURE----- --=-XGF7psIM5tW+k3T/P1KB--