[PATCH 0/1] cachefiles: Add a command to restore on-demand requests

Jia Zhu zhujia.zj at bytedance.com
Tue Jun 14 16:34:35 AEST 2022

Hi David, Jeffle & Xiang

In production environment, process crashes sometimes occurs.

In cachefiles on-demand read scenario, if user daemon crashes,
requests will return -EIO.
User programs which do not consider this error will trap into
uncertain state.

Based on this, we came up with a user daemon crash recover scheme.
Even if user daemon crashes, the device connection and anonymous fd
will not be released. Recovered user daemon only needs to write 'restore'
to /dev/cachefiles to restore in-flight requests.

Userspace Crash Recover Demo (Based on Jeffle's User Demo)
Git tree:
	https://github.com/userzj/demand-read-cachefilesd.git main

Jia Zhu (1):
   cachefiles: Add a command to restore on-demand requests

  fs/cachefiles/daemon.c   |  1 +
  fs/cachefiles/internal.h |  3 +++
  fs/cachefiles/ondemand.c | 25 +++++++++++++++++++++++++
  3 files changed, 29 insertions(+)


More information about the Linux-erofs mailing list