All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/10] AFS fixes
@ 2020-10-27 13:49 David Howells
  2020-10-27 13:50 ` [PATCH 01/10] afs: Fix copy_file_range() David Howells
                   ` (9 more replies)
  0 siblings, 10 replies; 14+ messages in thread
From: David Howells @ 2020-10-27 13:49 UTC (permalink / raw)
  To: linux-afs
  Cc: Dan Carpenter, Christoph Hellwig, Matthew Wilcox (Oracle),
	Colin Ian King, Nick Piggin, dhowells, linux-fsdevel,
	linux-kernel


Here's a set of fixes for AFS:

 (1) Fix copy_file_range() to an afs file now returning EINVAL if the
     splice_write file op isn't supplied.

 (2) Fix a deref-before-check in afs_unuse_cell().

 (3) Fix a use-after-free in afs_xattr_get_acl().

 (4) Fix afs to not try to clear PG_writeback when laundering a page.

 (5) Fix afs to take a ref on a page that it sets PG_private on and to drop
     that ref when clearing PG_private.

 (6) Fix a page leak if write_begin() fails.

 (7) Fix afs_write_begin() to not alter the dirty region info stored in
     page->private, but rather do this in afs_write_end() instead when we
     know what we actually changed.

 (8) Fix afs_invalidatepage() to alter the dirty region info on a page when
     partial page invalidation occurs so that we don't inadvertantly
     include a span of zeros that will get written back if a page gets
     laundered due to a remote 3rd-party induced invalidation.

     We mustn't, however, reduce the dirty region if the page has been seen
     to be mapped (ie. we got called through the page_mkwrite vector) as
     the page might still be mapped and we might lose data if the file is
     extended again.

To aid (8), two additional patches are included:

 (*) Wrap the manipulations of the dirty region info stored in
     page->private into helper functions.

 (*) Alter the encoding of the dirty region so that the region bounds can
     be stored with one fewer bit, making a bit available for the
     indication of mappedness.

The patches can be found here:

	https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git/log/?h=afs-fixes

David
---
Dan Carpenter (1):
      afs: Fix a use after free in afs_xattr_get_acl()

David Howells (9):
      afs: Fix copy_file_range()
      afs: Fix tracing deref-before-check
      afs: Fix afs_launder_page to not clear PG_writeback
      afs: Fix to take ref on page when PG_private is set
      afs: Fix page leak on afs_write_begin() failure
      afs: Fix where page->private is set during write
      afs: Wrap page->private manipulations in inline functions
      afs: Alter dirty range encoding in page->private
      afs: Fix afs_invalidatepage to adjust the dirty region


 fs/afs/cell.c              |  3 +-
 fs/afs/dir.c               |  3 ++
 fs/afs/dir_edit.c          |  1 +
 fs/afs/file.c              | 74 ++++++++++++++++++++++++-----
 fs/afs/internal.h          | 41 ++++++++++++++++
 fs/afs/write.c             | 95 ++++++++++++++++++++++----------------
 fs/afs/xattr.c             |  2 +-
 include/linux/page-flags.h |  1 +
 include/trace/events/afs.h | 20 ++------
 9 files changed, 171 insertions(+), 69 deletions(-)



^ permalink raw reply	[flat|nested] 14+ messages in thread
* [PATCH 00/10] AFS fixes
@ 2019-03-15 22:59 David Howells
  0 siblings, 0 replies; 14+ messages in thread
From: David Howells @ 2019-03-15 22:59 UTC (permalink / raw)
  To: linux-afs
  Cc: Jonathan Billings, Jonathan Billings, dhowells, linux-fsdevel,
	linux-kernel


Here's a set of bits and fixes for AFS to improve the life of desktop
applications such as firefox.  It makes the following improvements:

 (1) Allows fine-grained locking, as required by firefox and sqlite, with
     the caveat that you can't get a partial write lock on a file if you
     first get a partial read lock on it as the AFS protocol only supports
     whole-file locks.

     At some point I need to look at emulating OpenAFS's behaviour whereby
     all partial locks are just granted.

 (2) Makes processes requesting locks actually wait to get a lock where we
     have an appropriate server lock, but there's a conflicting server
     lock.

 (3) Makes locks appear in /proc/locks.

 (4) Handles asynchronous file lock RPC operation failure on files that get
     deleted whilst the lock is being extended or released.

 (5) Implements silly-rename so that locked files that are in use continue
     to exist if they get released or unlinked.

 (6) Lock expiry is now based on the time the set- or extend-lock reply is
     seen (packet timestamp) rather than by the time at which we've done
     processing the operation (wallclock time).

It also adds/modifies tracepoints to log:

 (1) File locking operations and events.

 (2) Directory content reload.

 (3) Silly rename.

 (4) Lookups.

 (5) Mounts (get_tree).

 (6) The afs_make_fs_call tracepoint is split to give two new variants that
     allow one or two names to be included in the log (such as the filename
     given to FS.MakeDir).

 (7) The afs_edit_dir tracepoint is given a larger name and this is
     surrounded by quotes when displayed.

This also provides a more comprehensive data dump in the event that a
directory content check fails.

The patches can be found here:

	http://git.kernel.org/cgit/linux/kernel/git/dhowells/linux-fs.git
	tag afs-fixes-20190315

David
---
David Howells (10):
      afs: Split wait from afs_make_call()
      afs: Calculate lock extend timer from set/extend reply reception
      afs: Fix AFS file locking to allow fine grained locks
      afs: Further fix file locking
      afs: Add file locking tracepoints
      afs: Improve dir check failure reports
      afs: Handle lock rpc ops failing on a file that got deleted
      afs: Add directory reload tracepoint
      afs: Implement sillyrename for unlink and rename
      afs: Add more tracepoints


 fs/afs/Makefile            |    1 
 fs/afs/dir.c               |  161 +++++++++++-
 fs/afs/dir_silly.c         |  239 ++++++++++++++++++
 fs/afs/flock.c             |  569 +++++++++++++++++++++++++++-----------------
 fs/afs/fs_probe.c          |   13 +
 fs/afs/fsclient.c          |   92 +++++--
 fs/afs/inode.c             |    2 
 fs/afs/internal.h          |   25 ++
 fs/afs/rxrpc.c             |   33 +--
 fs/afs/super.c             |    5 
 fs/afs/vl_probe.c          |   14 +
 fs/afs/vlclient.c          |   26 +-
 fs/afs/yfsclient.c         |   72 ++++--
 include/linux/fs.h         |    1 
 include/trace/events/afs.h |  348 +++++++++++++++++++++++++++
 15 files changed, 1258 insertions(+), 343 deletions(-)
 create mode 100644 fs/afs/dir_silly.c


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

end of thread, other threads:[~2020-10-27 18:45 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-27 13:49 [PATCH 00/10] AFS fixes David Howells
2020-10-27 13:50 ` [PATCH 01/10] afs: Fix copy_file_range() David Howells
2020-10-27 16:02   ` Christoph Hellwig
2020-10-27 13:50 ` [PATCH 02/10] afs: Fix tracing deref-before-check David Howells
2020-10-27 13:50 ` [PATCH 03/10] afs: Fix a use after free in afs_xattr_get_acl() David Howells
2020-10-27 13:50 ` [PATCH 04/10] afs: Fix afs_launder_page to not clear PG_writeback David Howells
2020-10-27 13:50 ` [PATCH 05/10] afs: Fix to take ref on page when PG_private is set David Howells
2020-10-27 13:50 ` [PATCH 06/10] afs: Fix page leak on afs_write_begin() failure David Howells
2020-10-27 13:50 ` [PATCH 07/10] afs: Fix where page->private is set during write David Howells
2020-10-27 13:50 ` [PATCH 08/10] afs: Wrap page->private manipulations in inline functions David Howells
2020-10-27 18:45   ` kernel test robot
2020-10-27 13:51 ` [PATCH 09/10] afs: Alter dirty range encoding in page->private David Howells
2020-10-27 13:51 ` [PATCH 10/10] afs: Fix afs_invalidatepage to adjust the dirty region David Howells
  -- strict thread matches above, loose matches on Subject: below --
2019-03-15 22:59 [PATCH 00/10] AFS fixes David Howells

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.