From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3FA2939F193 for ; Thu, 7 May 2026 19:38:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778182701; cv=none; b=EAXmT2WN0q80Ua0AQV0B0FZ+FavK4nyWFLinOsGZdunMirA4w1r24R5yqW6faZb59YA2oVsKhvgOQu9DX8AKCZ+FU1Nymb9H9KhsgiB2Qnl1gU8zsmmXY+ZuubH3W50zVzhND/5G7x6YwAI9F+0dPDfEq+chhAHbpSI4puzZqJQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778182701; c=relaxed/simple; bh=lmBVhPiXNWdotA2XbPDP/Uw2gHEZnGNmD8+LSFxYSdQ=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=IMWoy+CoVH3xlt245fFYIF+NSTmD/pCIQq+h58T/H3jlJUU3dE+NYFiDsVeZmY6tG4GelkzWH4W4GhjkIfBeIGXW+/FVIomS17lIo8o/6/yySvNvj6BmNYBoa5KqwdBNPTh9V8BxZzc+5eBqccKTHj5X3cNyPSMAVjWNGxTjz1E= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=M2hfiywn; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b=Pj6/7a/i; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="M2hfiywn"; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b="Pj6/7a/i" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1778182699; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=wnEc44kIOHQBJpfHu8p9w5K8K4zb1TfoMK/e6e0NibQ=; b=M2hfiywnbHTW0+kV322Nnez6stTaIkIkNJNQIJVLFX333Sz6ulHaOb1N+Udolj/3zOcsvo P9dBYAU59liunEyV3xipz8X/M8zT8abTKCJDwn/cmJvfyMJFc0/hecVaP0ajBahrjIP54s vHUs5CPr+2g1PV3w6sMcrh4eZMEjX6Q= Received: from mail-yx1-f69.google.com (mail-yx1-f69.google.com [74.125.224.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-553-N-YnEoxnPpqqGX6kR-v3bQ-1; Thu, 07 May 2026 15:38:15 -0400 X-MC-Unique: N-YnEoxnPpqqGX6kR-v3bQ-1 X-Mimecast-MFC-AGG-ID: N-YnEoxnPpqqGX6kR-v3bQ_1778182694 Received: by mail-yx1-f69.google.com with SMTP id 956f58d0204a3-651c15e69d7so2694961d50.0 for ; Thu, 07 May 2026 12:38:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1778182694; x=1778787494; darn=vger.kernel.org; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:from:to:cc:subject :date:message-id:reply-to; bh=wnEc44kIOHQBJpfHu8p9w5K8K4zb1TfoMK/e6e0NibQ=; b=Pj6/7a/iPxGgLVqIvfGHHj/N87tEs93aYcvNKvd8xTtgJC7aogeimhZT8RERzsvZr8 pHoWmWBO56O3Yumw6nZbzODExq/V5G1pVc1Xif+zHL+uEeDR1FgVGKsvF3VM7XNVVbvF fLLhXeHV2coTPHEaneYENURR3ycwG+zCAkq/SNXNBjFRKchhtUAKlNxQ7Leozk6QUSHn WP+qrtBQIN5/PugtndDJQuWfUWtlW7uZITtVLLD6pRyFdUZq9+ktUzDXexY44mloiyuM hY88yafBCZTm3NDPC/7tSXz4PFIyVSVPGicRkyiAUpAbRGM+YjnZTOeGa7SDKG4dnwBH P4rw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778182694; x=1778787494; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=wnEc44kIOHQBJpfHu8p9w5K8K4zb1TfoMK/e6e0NibQ=; b=SzmOKJ5gyNiID1AXC330krvc0gpHtNuRXjfkndimGF5V/8HUlHkfzyu93e0b5T+FGP 2In08UJuJvhwL3WiVXIlEz+LlMHcwfhmPdwBaqGgECB7vDJarz7rs/6ExlfNmECczcQ1 9yH08qDyMwH5z8fRFQu8L0CemYgARB+4EWNSo7gMSprBiRyCSwv0APVAAUbZHjYlaNwt OzLvCH9omCX2/1yZ9y2T+0rRaQEW0LcO3g9NpopIRxrEjLA8VRVzlkUPBKumhNtp85AZ PjJhhJY+yjplpmZHAoDXbK6bTb7NI4UpWBeHh3wxvQ0Z1eREE6RiE3lv3NFS7mssFEPB dZwA== X-Gm-Message-State: AOJu0YynQLjEtfzEQaU2o9t2bDshCRIBbfeiBqjV0bOpCK0ih1AoKd73 yFf3d0EOgBYhxUrd4NscD3OphV4AaV9CWRLinigCn8vvr8rn+wCvNWmk5SEF1QS1uUhGXQ6Dxac YiyrRZqgHwa3o6cLYiOCbFXhl1oxsJli5+CmMK6ZvsDA8QotSyOVjZqbjKHAw0q4d2g== X-Gm-Gg: Acq92OGfLDbcwPTRycPYrj143ok/UgCSEjJpOpP3/xBuHU5Ww58nCHyz/j27gwqBIej BFcr5xAiV6v8wZAhBP7kUNj4sHpHc0sr7ZYEpAar7O1cJ/FVFBMaTzQW8tR8GraEycKmorzfas8 uqSS7/ShmLMiY2WMa7lwYi9yccBjOUH4myDK6nJDLDEQAz8tY5UfsW13G1GcVqUhE+vkdJUCY6d TzxpyT7leASHPyNZZXc5JNzBWb/vCQ3inJWnDEvILhbJeHbgSnmEcQSJlX1oKZ4C5lFdIJfbyBR 9XnfPurPGqdUKgKrec5WBREzGHgyjuB+HSCEz6ancKsVY6YXWY45sYIv0H3tWT/zQbKucPVFfdg w/Z3oawywKuus++zEEN123aj4kaVDE1+T8sF5t9JwSo6nIorpBIrq X-Received: by 2002:a05:690c:6e86:b0:79f:3b8c:a7fc with SMTP id 00721157ae682-7bdf5efb295mr100666047b3.39.1778182694125; Thu, 07 May 2026 12:38:14 -0700 (PDT) X-Received: by 2002:a05:690c:6e86:b0:79f:3b8c:a7fc with SMTP id 00721157ae682-7bdf5efb295mr100665767b3.39.1778182693608; Thu, 07 May 2026 12:38:13 -0700 (PDT) Received: from li-4c4c4544-0032-4210-804c-c3c04f423534.ibm.com ([2600:1700:6476:1430::29]) by smtp.gmail.com with ESMTPSA id 00721157ae682-7bd6688c99bsm98849097b3.45.2026.05.07.12.38.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 May 2026 12:38:13 -0700 (PDT) Message-ID: <56056dd82f7b34f04dec8390fe62305d98d5cbe8.camel@redhat.com> Subject: Re: [EXTERNAL] [PATCH v4 11/11] selftests: ceph: wire up Ceph reset kselftests and documentation From: Viacheslav Dubeyko To: Alex Markuze , ceph-devel@vger.kernel.org Cc: linux-kernel@vger.kernel.org, idryomov@gmail.com Date: Thu, 07 May 2026 12:38:12 -0700 In-Reply-To: <20260507122737.2804094-12-amarkuze@redhat.com> References: <20260507122737.2804094-1-amarkuze@redhat.com> <20260507122737.2804094-12-amarkuze@redhat.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.60.0 (3.60.0-1.fc44app2) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 On Thu, 2026-05-07 at 12:27 +0000, Alex Markuze wrote: > Wire the CephFS reset test suite into the kselftest build: >=20 > - Add filesystems/ceph to the top-level selftests Makefile. > - Add the per-suite Makefile with run_validation.sh as TEST_PROGS. > - Add the settings file (kselftest timeout). > - Add the MAINTAINERS entry for the test directory. > - Add README with prerequisites, usage, and troubleshooting. >=20 > Signed-off-by: Alex Markuze > --- > MAINTAINERS | 1 + > fs/ceph/mds_client.c | 3 +- > fs/ceph/mds_client.h | 1 + > tools/testing/selftests/Makefile | 1 + > .../selftests/filesystems/ceph/Makefile | 7 ++ > .../testing/selftests/filesystems/ceph/README | 84 +++++++++++++++++++ > .../selftests/filesystems/ceph/settings | 1 + > 7 files changed, 97 insertions(+), 1 deletion(-) > create mode 100644 tools/testing/selftests/filesystems/ceph/Makefile > create mode 100644 tools/testing/selftests/filesystems/ceph/README > create mode 100644 tools/testing/selftests/filesystems/ceph/settings >=20 > diff --git a/MAINTAINERS b/MAINTAINERS > index 2fb1c75afd16..bf6d973ac3fb 100644 > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@ -5905,6 +5905,7 @@ B: https://urldefense.proofpoint.com/v2/url?u=3Dhtt= ps-3A__tracker.ceph.com_&d=3DDwIDAg&c=3DBSDicqBQBDjDI9RkVyTcHQ&r=3Dq5bIm4AX= Mzc8NJu1_RGmnQ2fMWKq4Y4RAkElvUgSs00&m=3DcRBv-UtfmhjOUGCI7KVnj0A4bykzGklT8Ys= 3gWPOvguS8dyEz9b-bde2xdqTEBZi&s=3DwjFho6C-M1GiaFvcMzhan3RRBQEA-dyFGR2tqxUoJ= y0&e=3D=20 > T: git https://urldefense.proofpoint.com/v2/url?u=3Dhttps-3A__github.com= _ceph_ceph-2Dclient.git&d=3DDwIDAg&c=3DBSDicqBQBDjDI9RkVyTcHQ&r=3Dq5bIm4AXM= zc8NJu1_RGmnQ2fMWKq4Y4RAkElvUgSs00&m=3DcRBv-UtfmhjOUGCI7KVnj0A4bykzGklT8Ys3= gWPOvguS8dyEz9b-bde2xdqTEBZi&s=3D77jK11z0NzRQJxZXDRsicogOgD_d9u7-XA5-bhb99X= A&e=3D=20 > F: Documentation/filesystems/ceph.rst > F: fs/ceph/ > +F: tools/testing/selftests/filesystems/ceph/ > =20 > CERTIFICATE HANDLING > M: David Howells > diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c > index b16638ebff7f..3b6560da8c4e 100644 > --- a/fs/ceph/mds_client.c > +++ b/fs/ceph/mds_client.c > @@ -2359,6 +2359,7 @@ struct flush_dump_entry { > static void dump_cap_flushes(struct ceph_mds_client *mdsc, u64 want_tid) > { > struct ceph_client *cl =3D mdsc->fsc->client; > + int i; > struct flush_dump_entry entries[CEPH_CAP_FLUSH_MAX_DUMP_ENTRIES]; > struct ceph_cap_flush *cf; > int n =3D 0, remaining =3D 0; > @@ -2388,7 +2389,7 @@ static void dump_cap_flushes(struct ceph_mds_client= *mdsc, u64 want_tid) > =20 > pr_info_client(cl, "still waiting for cap flushes through %llu:\n", > want_tid); > - for (int i =3D 0; i < n; i++) { > + for (i =3D 0; i < n; i++) { > struct flush_dump_entry *e =3D &entries[i]; > =20 > if (e->ci_null) > diff --git a/fs/ceph/mds_client.h b/fs/ceph/mds_client.h > index b1a0621cd37e..731d6ad04956 100644 > --- a/fs/ceph/mds_client.h > +++ b/fs/ceph/mds_client.h > @@ -121,6 +121,7 @@ static inline bool ceph_reset_is_idle(struct ceph_cli= ent_reset_state *st) > { > return READ_ONCE(st->phase) =3D=3D CEPH_CLIENT_RESET_IDLE; > } > + > struct ceph_mds_cap_match { > s64 uid; /* default to MDS_AUTH_UID_ANY */ > u32 num_gids; > diff --git a/tools/testing/selftests/Makefile b/tools/testing/selftests/M= akefile > index 6e59b8f63e41..ab254ae793a9 100644 > --- a/tools/testing/selftests/Makefile > +++ b/tools/testing/selftests/Makefile > @@ -32,6 +32,7 @@ TARGETS +=3D exec > TARGETS +=3D fchmodat2 > TARGETS +=3D filesystems > TARGETS +=3D filesystems/binderfs > +TARGETS +=3D filesystems/ceph > TARGETS +=3D filesystems/epoll > TARGETS +=3D filesystems/fat > TARGETS +=3D filesystems/overlayfs > diff --git a/tools/testing/selftests/filesystems/ceph/Makefile b/tools/te= sting/selftests/filesystems/ceph/Makefile > new file mode 100644 > index 000000000000..4ad3e8d40d90 > --- /dev/null > +++ b/tools/testing/selftests/filesystems/ceph/Makefile > @@ -0,0 +1,7 @@ > +# SPDX-License-Identifier: GPL-2.0 > + > +TEST_PROGS :=3D run_validation.sh > +TEST_FILES :=3D reset_stress.sh reset_corner_cases.sh \ > + validate_consistency.py README settings > + > +include ../../lib.mk > diff --git a/tools/testing/selftests/filesystems/ceph/README b/tools/test= ing/selftests/filesystems/ceph/README > new file mode 100644 > index 000000000000..eb0092b38f80 > --- /dev/null > +++ b/tools/testing/selftests/filesystems/ceph/README > @@ -0,0 +1,84 @@ > +# CephFS Client Reset Test Suite > + > +Test suite for the CephFS kernel client manual session reset feature. > +This trimmed set contains the single-client stress test, the targeted > +corner-case test, and the one-shot validation harness used during > +feature bring-up. > + > +## Prerequisites > + > +- Linux kernel with the CephFS client reset feature (this branch) > +- A running Ceph cluster with at least one MDS > +- Root access (debugfs requires it) > +- Python 3 (for validators) > +- flock utility (for lock tests, usually in util-linux) > + > +## Test inventory > + > +| Test | Script(s) | What it covers | > +|------|-----------|----------------| > +| Single-client stress | `reset_stress.sh` | I/O + resets + data integri= ty on one mount | > +| Corner cases | `reset_corner_cases.sh` | EBUSY, dirty caps, flock recl= aim, unmount-during-reset | > +| Validation harness | `run_validation.sh` | baseline + corner cases + m= oderate/aggressive stress + final status check | > + > +## Quick start > + > +Stress run: > + > + sudo ./reset_stress.sh --mount-point /mnt/cephfs --profile moderate > + > +Corner cases: > + > + sudo ./reset_corner_cases.sh --mount-point /mnt/cephfs > + > +End-to-end validation: > + > + sudo ./run_validation.sh --mount-point /mnt/cephfs > + > +## Stress profiles > + > + baseline - no resets, 1 IO + 1 rename, 600s > + moderate - reset every 5-15s, 2 IO + 1 rename, 900s > + aggressive - reset every 1-5s, 4 IO + 2 rename, 900s > + soak - reset every 5-15s, 2 IO + 1 rename, 3600s > + > +## Key options (all scripts) > + > + --mount-point PATH CephFS mount point (required) > + --client-id ID Debugfs client id (auto-detected if one) > + > +reset_stress.sh additionally accepts: > + > + --profile NAME baseline|moderate|aggressive|soak > + --duration-sec N Override profile runtime > + --no-reset Disable reset injection > + --out-dir PATH Artifact directory > + > +## Corner case tests > + > + [1/4] ebusy_rejection Second reset rejected while first in-fli= ght > + [2/4] dirty_caps_at_reset Reset with unflushed dirty caps > + [3/4] flock_after_reset Stale lock EIO + fresh lock after holder= exit > + [4/4] unmount_during_reset umount during active reset (destroy-path= wakeup) > + > +Test 4 requires creating a second CephFS mount instance and SKIPs if > +the host cannot do so. See `--help` output for details. > + > +## Troubleshooting > + > +**No writable Ceph reset interface found:** > +Kernel lacks the reset feature, debugfs not mounted, or not root. > +Check: `ls /sys/kernel/debug/ceph/*/reset/` > + > +**Multiple Ceph clients found:** > +Use `--client-id` to select one. > +List: `ls /sys/kernel/debug/ceph/` > + > +## Files > + > +| File | Role | > +|------|------| > +| `reset_stress.sh` | Single-client stress test runner | > +| `validate_consistency.py` | Single-client post-run validator | > +| `reset_corner_cases.sh` | Corner case harness (4 sequential tests) | > +| `run_validation.sh` | One-shot validation harness | > diff --git a/tools/testing/selftests/filesystems/ceph/settings b/tools/te= sting/selftests/filesystems/ceph/settings > new file mode 100644 > index 000000000000..79b65bdf05db > --- /dev/null > +++ b/tools/testing/selftests/filesystems/ceph/settings > @@ -0,0 +1 @@ > +timeout=3D1200 Reviewed-by: Viacheslav Dubeyko Thanks, Slava.