linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [GIT PULL] vfs cachefiles updates
@ 2024-01-05 12:51 Christian Brauner
  2024-01-08 20:00 ` pr-tracker-bot
  0 siblings, 1 reply; 2+ messages in thread
From: Christian Brauner @ 2024-01-05 12:51 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Christian Brauner, linux-fsdevel, linux-kernel

Hey Linus,

/* Summary */
This contains improvements for on-demand cachefiles. If the daemon crashes and
the on-demand cachefiles fd is unexpectedly closed in-flight requests and
subsequent read operations associated with the fd will fail with EIO. This
causes issues in various scenarios as this failure is currently unrecoverable.

The work contained in this pull request introduces a failover mode and enables
the daemon to recover in-flight requested-related objects. A restarted daemon
will be able to process requests as usual.

This requires that in-flight requests are stored during daemon crash or while
the daemon is offline. In addition, a handle to /dev/cachefiles needs to be
stored. This can be done by e.g., systemd's fdstore (cf. [1]) which enables the
restarted daemon to recover state.

Three new states are introduced in this patchset:

(1) CLOSE
    Object is closed by the daemon.
(2) OPEN
    Object is open and ready for processing. IOW, the open request has been
    handled successfully.
(3) REOPENING
    Object has been previously closed and is now reopened due to a read request.

A restarted daemon can recover the /dev/cachefiles fd from systemd's fdstore
and writes "restore" to the device. This causes the object state to be reset
from CLOSE to REOPENING and reinitializes the object. The daemon may now handle
the open request. Any in-flight operations are restored and handled avoiding
interruptions for users.

[1]: https://systemd.io/FILE_DESCRIPTOR_STORE

/* Testing */
clang: Debian clang version 16.0.6 (19)
gcc: (Debian 13.2.0-7) 13.2.0

All patches are based on v6.7-rc1 and have been sitting in linux-next.
No build failures or warnings were observed.

/* Conflicts */
At the time of creating this PR no merge conflicts were reported from
linux-next and no merge conflicts showed up doing a test-merge with
current mainline.

The following changes since commit b85ea95d086471afb4ad062012a4d73cd328fa86:

  Linux 6.7-rc1 (2023-11-12 16:19:07 -0800)

are available in the Git repository at:

  git@gitolite.kernel.org:pub/scm/linux/kernel/git/vfs/vfs tags/vfs-6.8.cachefiles

for you to fetch changes up to e73fa11a356ca0905c3cc648eaacc6f0f2d2c8b3:

  cachefiles: add restore command to recover inflight ondemand read requests (2023-11-25 16:03:57 +0100)

Please consider pulling these changes from the signed vfs-6.8.cachefiles tag.

Happy New Year!
Christian

----------------------------------------------------------------
vfs-6.8.cachefiles

----------------------------------------------------------------
Jia Zhu (5):
      cachefiles: introduce object ondemand state
      cachefiles: extract ondemand info field from cachefiles_object
      cachefiles: resend an open request if the read request's object is closed
      cachefiles: narrow the scope of triggering EPOLLIN events in ondemand mode
      cachefiles: add restore command to recover inflight ondemand read requests

 fs/cachefiles/daemon.c    |  15 ++++-
 fs/cachefiles/interface.c |   7 +-
 fs/cachefiles/internal.h  |  59 +++++++++++++++-
 fs/cachefiles/ondemand.c  | 166 ++++++++++++++++++++++++++++++++++------------
 4 files changed, 201 insertions(+), 46 deletions(-)

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

* Re: [GIT PULL] vfs cachefiles updates
  2024-01-05 12:51 [GIT PULL] vfs cachefiles updates Christian Brauner
@ 2024-01-08 20:00 ` pr-tracker-bot
  0 siblings, 0 replies; 2+ messages in thread
From: pr-tracker-bot @ 2024-01-08 20:00 UTC (permalink / raw)
  To: Christian Brauner
  Cc: Linus Torvalds, Christian Brauner, linux-fsdevel, linux-kernel

The pull request you sent on Fri,  5 Jan 2024 13:51:23 +0100:

> git@gitolite.kernel.org:pub/scm/linux/kernel/git/vfs/vfs tags/vfs-6.8.cachefiles

has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/26458409a9b180ea6cc2cd7b67d6138984184669

Thank you!

-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/prtracker.html

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

end of thread, other threads:[~2024-01-08 20:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-05 12:51 [GIT PULL] vfs cachefiles updates Christian Brauner
2024-01-08 20:00 ` pr-tracker-bot

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).