mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ionut Nechita <ionut.nechita@windriver.com>
To: ceph-devel@vger.kernel.org
Cc: Ilya Dryomov <idryomov@gmail.com>,
	Alex Markuze <amarkuze@redhat.com>,
	Viacheslav Dubeyko <slava@dubeyko.com>,
	Viacheslav Dubeyko <Slava.Dubeyko@ibm.com>,
	Xiubo Li <xiubo.li@clyso.com>,
	Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
	linux-kernel@vger.kernel.org
Subject: [PATCH v3 0/5] ceph/libceph: killable sync waits and faster recovery after network disruption
Date: Mon, 23 Nov 2026 10:01:45 +0200	[thread overview]
Message-ID: <20261123080152.163172-1-ionut.nechita@windriver.com> (raw)

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


             reply	other threads:[~2026-11-23  8:02 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-23  8:01 Ionut Nechita [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261123080152.163172-1-ionut.nechita@windriver.com \
    --to=ionut.nechita@windriver.com \
    --cc=Slava.Dubeyko@ibm.com \
    --cc=amarkuze@redhat.com \
    --cc=bigeasy@linutronix.de \
    --cc=ceph-devel@vger.kernel.org \
    --cc=idryomov@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=slava@dubeyko.com \
    --cc=xiubo.li@clyso.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®