mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v3 0/5] ceph/libceph: killable sync waits and faster recovery after network disruption
@ 2026-11-23  8:01 Ionut Nechita
  2026-11-23  8:01 ` [PATCH v3 1/5] libceph: don't back off exponentially on EADDRNOTAVAIL Ionut Nechita
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Ionut Nechita @ 2026-11-23  8:01 UTC (permalink / raw)
  To: ceph-devel
  Cc: Ilya Dryomov, Alex Markuze, Viacheslav Dubeyko,
	Viacheslav Dubeyko, Xiubo Li, Sebastian Andrzej Siewior,
	linux-kernel

When the Ceph daemons become unreachable for a long time (seen during
Rook-Ceph rolling upgrades with active CephFS I/O), the kernel client
leaves sync(2) and syncfs(2) stuck in an unkillable D state, keeps
backing off on a purely local connect() error, and can miss the mdsmap
update that carries the new MDS address.

  1    libceph: fixed 100ms retry instead of exponential backoff when
       connect() fails locally with EADDRNOTAVAIL
  2-3  make the sync(2)/syncfs(2) waits in ceph_mdsc_sync() and
       ceph_osdc_sync() killable
  4    request a full mdsmap when an MDS keeps faulting or a session
       goes HUNG
  5    don't escalate the monitor hunt backoff on EADDRNOTAVAIL

Changes since v2 (thanks, Alex):
- 2/7 and 3/7 no longer bound the waits by mount_timeout, because
  sync(2) ignores the ->sync_fs() return value and would return with
  metadata still unsafe.  The waits are now killable instead: an
  un-killed sync still waits for everything, the task can be killed,
  and the hung task detector no longer fires.  The wait_caps_flush()
  diagnostic loop is kept.
- Dropped "ceph: bound the safe-completion wait in
  ceph_lock_wait_for_completion()".  That wait is already killable
  upstream, and a timeout can return before a lock grant is installed
  locally.
- Dropped "ceph: set default timeout for MDS requests" (Slava's
  Reviewed-by goes with it).  ceph_mdsc_wait_request() has been
  killable since aa91647c898d ("ceph: make mds requests killable, not
  interruptible"), so it doesn't trigger the hung task detector.  A
  default timeout would only turn MDS outages into -ETIMEDOUT for
  applications, and for file locks (the interrupt request as well as
  non-blocking F_SETLK) it can leave a lock granted on the MDS but not
  installed locally.
- Rebased on next-20261120.

Built with W=1 and sparse, and bisected build by build.  Not run
against a live cluster.

I used an LLM to help rebase the series, review the code and draft
the changelogs.  I have reviewed every change and take responsibility
for it.

v2: https://lore.kernel.org/all/20261120073431.53636-1-ionut.nechita@windriver.com/
v1: https://lore.kernel.org/all/20260312081619.40854-1-ionut.nechita@windriver.com/

Ionut Nechita (5):
  libceph: don't back off exponentially on EADDRNOTAVAIL
  ceph: make the ceph_mdsc_sync() waits killable
  ceph: make the ceph_osdc_sync() wait killable
  ceph: request a full mdsmap when an MDS stays unreachable
  libceph: don't escalate monitor hunt backoff on EADDRNOTAVAIL

 fs/ceph/mds_client.c            | 85 +++++++++++++++++++++++++++++----
 fs/ceph/mds_client.h            |  4 +-
 fs/ceph/super.c                 |  9 ++--
 include/linux/ceph/messenger.h  |  7 +++
 include/linux/ceph/osd_client.h |  2 +-
 net/ceph/messenger.c            | 15 ++++--
 net/ceph/mon_client.c           |  8 ++++
 net/ceph/osd_client.c           |  9 +++-
 8 files changed, 119 insertions(+), 20 deletions(-)


base-commit: 909ef7a9a30fa139e69e555e3606680f5cca7726
-- 
2.56.0


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

end of thread, other threads:[~2026-11-24 13:54 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-23  8:01 [PATCH v3 0/5] ceph/libceph: killable sync waits and faster recovery after network disruption Ionut Nechita
2026-11-23  8:01 ` [PATCH v3 1/5] libceph: don't back off exponentially on EADDRNOTAVAIL Ionut Nechita
2026-11-23  8:01 ` [PATCH v3 2/5] ceph: make the ceph_mdsc_sync() waits killable Ionut Nechita
2026-11-23  8:01 ` [PATCH v3 3/5] ceph: make the ceph_osdc_sync() wait killable Ionut Nechita
2026-11-23  8:01 ` [PATCH v3 4/5] ceph: request a full mdsmap when an MDS stays unreachable Ionut Nechita
2026-11-23  8:01 ` [PATCH v3 5/5] libceph: don't escalate monitor hunt backoff on EADDRNOTAVAIL Ionut Nechita
2026-11-24 13:54 ` [PATCH v3 0/5] ceph/libceph: killable sync waits and faster recovery after network disruption Alex Markuze

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®