From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.128.47 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796394438; b=mOuCkCpVdpykRYH6kkwNjplzTup1ZAc6kKJQrCp9nYT/EzrZkHqqv2oCNx1PGJ0u7Hq7 8sVGPNzq41oB+50iT/2UR018rCGnYimsDme1NNigPbl+SJsm80AS+p1KaChTTkyaHazID HfC2lkNtVLKihdaP+e8JE6nbB0fzNhwjZkDyDvzp1cwk7Dr4jx65n4Xzc9ThksTdl8Yx0 E8s2CbRDAlniDh6nBmdlYcilKzAnxZNdZUIQJJaGk2/JZALd8FAM5EtlQ4x6A9y1H0xD9 /wyE0aCxNxZ4ZoAfTz3zmmb415fBmhYsLe5hozXJJtDI/8X/RTt8gR4u5/c03r0/mRQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796394438; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: Sender:Received:From:To:Cc:Subject:Date:Message-ID:X-Mailer: MIME-Version:Content-Transfer-Encoding; bh=kJfYay8pBmPreLzhwLbn4KB4txZmFi27/B2bX0SsZPA=; b=gvjr43/85gKzmb3B8+Nq66VyLr+tK3/+cF0BZcpyGQ3z9/YUMrFyf+Gs3m5Z8ax7ZSy4 MCSztK6+s+oMg6X0F2Sgv/ZKK+FlCbTqlYcWEmlua0hBhytJ7gC3DQhRzX/g8yBlr5S/J 6iFY/BiClKJ+swH5qaFtOyzPYleppP9WqOvusPXfhMYrWZqQzDw6582cfa+bmNJuzb0nP KVNPWh52O7rrBRZb7cBTJhpG99BYhPd0rrSO4PWbDYegEtbq8d5us3rryRTUhAiDbUuuE M85SxAeQEGIUtOkWlBO07S+tFisaoC67vNRqrtpGnQTyQovFqx44nwfboiJvK3hjkkg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=fail header.from=debian.org; spf=pass smtp.mailfrom=gmail.com; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=W0OhEGdD; arc=none smtp.remote-ip=209.85.128.47 Received: from mail-wm1-f47.google.com (mail-wm1-f47.google.com [209.85.128.47]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D1C4D606A32C for ; Fri, 4 Dec 2026 14:27:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org D1C4D606A32C Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=debian.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=W0OhEGdD Received: by mail-wm1-f47.google.com with SMTP id 5b1f17b1804b1-4bb702a7548so5429365e9.1 for ; Fri, 04 Dec 2026 06:27:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796394436; x=1796999236; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:sender:from:to:cc:subject:date:message-id:reply-to :content-type; bh=kJfYay8pBmPreLzhwLbn4KB4txZmFi27/B2bX0SsZPA=; b=W0OhEGdDC+dsTBEQa5+dg6QN6vJ/EcdxFPig67iSEMXTTLNRkKtYTzfi6lmuqvyAod sUmo7LeZNvUgnAgrYv+0arAyTOBsO3ZSdWBglCk/gnU1nn1Q3457Dj35WkdBNB89D1W9 cRIUC9mIF2UQPA2oE5YBv/dsa/kLzf3y/jxy46AaH2ja5Vfs+FV+gV+wmSGWP3IR/XoO cFCwLkq0M8w8zIHyWvSpCziCw/8uGWsP1dKEsbFoJ0zINfELAE2G+uOWm5NM+IMzsXNh IVDBtssrV9cHw1xt6fv2+7ljHeTgajd+6e6kpnxM3pRqRcPdBl3D47CcvpJxBm/JwKGc ZV6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796394436; x=1796999236; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:sender:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=kJfYay8pBmPreLzhwLbn4KB4txZmFi27/B2bX0SsZPA=; b=Ie/XM+uDUFQ0pRpkvrFp79cWo/djJYQDzaKfE1+NFvec2UTAUNIzORgUtQYkKudHvj p6GnjdYvAMqRmLBH3DMrbWvEK4J69ehrWTiSebn1P5bR2Sf8CoDP638RljhS5u0TtIx/ ev+WwKrScOe+nZ+9PYX9XJeXwUmDhOmLMYLFm1OW0Ynkwi2LJXScthWLTNJtQyypxKIT BPAbk8WWc/6G5eb3Su36n0HW4GRhTSHE4fXNqSXqu2viG13gtNYX+nc98adbyAOa3vCx Xv4rEZFkr4VKtkjNgdFfIZztPTFcJRoJerCg4+xBZjwWGjTwJo5D1228m5x0NjcaE+hK KVHg== X-Forwarded-Encrypted: i=1; AL+hErEnvW7DFD43c5aC5k9d0AbNGSF6MLQ6PqZsu9FDszJ71sqLwisKNPoy8Ui22u1orLHIN5ObC9s=@vger.kernel.org X-Gm-Message-State: APuU4Z/W7p5KMLIkWXiVugTp6ldyppZFXVLdOiVdjt+C7EmwTvGudVxW fVIY2tL3dThvS+byANMt0SsgiEscGNAeRpPwrl0OhMG4GkxkszDpVfzaob6ochPZ X-Gm-Gg: AZFdTZf664jmMUhEAxfOREPH7OQ5Y2lA0p7WuHNxcYZCv094LTBz1mtBDQNxccOgYxF hqVDVz0hWaIeBCM2cxd5Y+EN0B8Jmg0XsYIMcjf4l3dhr4nEt3I3tizfKpNO801D7DuRqrliDac mYuZU+ho/ffN4KxlBjpw1iJ5dOaDK+mzlSrjQAKGl2G+UJi8XdITwKy7VWsXGL8l/uCn7DdQvQ/ fga3t3zAC14cX+Pi+LsAOpJWEfGTjGT3WlKkJcNGIbnmDO0jv764zBJPVCuhPnbIPZm4vTkS0w2 q6hLSWV99hXJsiDPhwPT5BH8Ds1A5DcJDJJwPKqHRZNYzDGSXOGEFjCjH0JHg37mZwAaAaH9IPM YFWw4j9N5nfJLPvXdrxmpPdf7mPc4A5bJ3ddf2NI1sgj37uS+Ihn8fREfCi9OReOfXXJzTOj1o8 nEgkGLB2PAVbiBgYpl76W0Ik0GRT9Vnr7rx1qCicszZnX1WWYBGwOA61ZNT0gqULw0s0eTn4YyW FH+aAGS1sP+27NxontKiYbRQUy2ztR4EF41diiQGCEWwGssGv8aRu3OBjar6XO3KYeH6EvDShaq OCqYqSsSYBYbqrX3RXjesXvtJwgeUfgTDxxcboNJAo5MQdD6kfMPWpGdQwVe6M4vs5V/AZWgYJK UvEQK3YcVMw== X-Received: by 2002:a05:600c:46c9:b0:4bb:5f07:10d7 with SMTP id 5b1f17b1804b1-4bbeb8eb672mr44706735e9.26.1796394436051; Fri, 04 Dec 2026 06:27:16 -0800 (PST) Received: from eldamar.lan (c-82-192-247-196.customer.ggaweb.ch. [82.192.247.196]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4bbe00792c9sm166960305e9.3.2026.12.04.06.27.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Dec 2026 06:27:15 -0800 (PST) Sender: Salvatore Bonaccorso Received: by eldamar.lan (Postfix, from userid 1000) id 32170DC04A2; Fri, 04 Dec 2026 15:27:14 +0100 (CET) From: Salvatore Bonaccorso To: Julien Leclerc , Jeff Layton Cc: linux-nfs@vger.kernel.org, 1153524@bugs.debian.org, Chuck Lever , regressions@lists.linux.dev, stable@vger.kernel.org Subject: [PATCH 6.12.y 0/4] Backport for "NLM/NFSD: Fix lock notifications for async-capable" Date: Fri, 4 Dec 2026 15:20:28 +0100 Message-ID: <20261204142703.1100372-1-carnil@debian.org> X-Mailer: git-send-email 2.55.0 X-Mailing-List: stable@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Hi In Debian bug https://bugs.debian.org/1153524 reported a regression after updating from 6.1.y to the 6.12.y series, explained as follows: > After upgrading an NFS server from the bookworm 6.1 kernel to the > trixie 6.12 kernel, blocking locks taken on an NFSv4.2 export by two > different clients are no longer woken up when the holder releases > them. The waiting client stalls for about 30 seconds (the client-side > NFS4_LOCK_MAXTIMEOUT back-off) instead of getting the lock as soon as > it is released. Setup > > * Server: Debian 13.7, linux-image-6.12.116+deb13-amd64 6.12.116- > 1, nfs-kernel-server 1:2.8.3-1. The export is on ext4 (md RAID), > options sync,wdelay,hide,no_subtree_check,sec=sys,rw,secure,roo- > t_squash,no_all_squash. > * Clients: two Debian 13 hosts running 6.12.116+deb13-amd64, > mounted with vers=4.2. > * The clients have run 6.12 since August 2026, and cross-client > locking worked while the server ran 6.1.0-54-amd64. The stalls > started on 2026-11-05, when the server moved to 6.12.115-1. > Nothing changed on the clients that day, so the regression is on > the server side. > > Reproducer > > client A: flock -x /mnt/share/testfile sleep 5 > client B (1.5 s later): time flock -x -w 60 /mnt/share/testfile true > > Expected: B gets the lock after about 3.5 s. Observed on 2026-11-09 > with 6.12.116-1: 31.61 s. With both processes on client A, the wait is > 3.51 s. Server-side traces (6.12.115-1, 2026-11-06, kernel tracepoints > during the same test) > > * The blocking LOCK from client B (WRITEW_LT) reaches nfsd, but > nfsd sets the lock without FL_SLEEP: posix_lock_inode shows > fl_flags=FL_POSIX only. The server therefore treats it as non- > blocking: it returns NFS4ERR_DENIED and records no blocked lock. > * When client A releases the lock (OP_LOCKU), no nfsd_cb_queue or > nfsd_cb_notify_lock event appears. CB_NOTIFY_LOCK is never sent. > * The client behaves as designed. It waits for the notification up > to the 30 s cap, then retries: two LOCK attempts in total, at t0 > and at t0+31 s. > * I found a recent nfsd series that fixes the FL_SLEEP test in > nfsd4_lock (introduced by 7e64c5bc497c), but for the opposite > case: FL_SLEEP wrongly set on non-blocking locks. This report > may be the mirror case, but I have not confirmed the root cause. > > Impact > Any application that serialises on files shared across NFS clients > stalls for 30 s per contended lock. In our case, PHP file sessions on > a two-node web front caused gateway timeouts. We have worked around it > (sessions moved to a database, load-balancer session affinity), but > the bug still affects other shared directories. It was forwarded to th NFS list: https://lore.kernel.org/linux-nfs/SADPR02MB574770B2C27CA5277D9878958CE84D2@SADPR02MB574770.namprd02.prod.outlook.com/T/#mf090eb57d7770d471224ec0cb6a564ae2010d75f Jeff Layton determined: > Ben Coddington's series fixed the check in v6.13. None of it went to > 6.12.y: > > 8cf9a01edc21 ("fs: Introduce FOP_ASYNC_LOCK") > 2253ab99f2e9 ("gfs2/ocfs2: set FOP_ASYNC_LOCK") > 7e64c5bc497c ("NLM/NFSD: Fix lock notifications for async-capable > filesystems") > > The recent patch you noticed is 246a90a5109b ("nfsd: fix FL_SLEEP > being set unconditionally for all LOCK types"). It fixes a bug that > 7e64c5bc497c introduced, so it needs to be backported along with the > other three. The 4 patches following are matching the above. *Though* I defintively prefer if those will come directly from Jeff or will get an ack from him here. In Debian we will be in need to apply those ideally with the next round of updates we are going to push. Regards, Salvatore