From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.openvz.org (unknown [69.168.225.77]) by lore.virtuozzo.com (Postfix) with ESMTPS id D4A4E8017D for ; Wed, 30 Sep 2026 05:46:23 +0000 (UTC) Received: from mail.openvz.org (localhost [127.0.0.1]) by mail.openvz.org (8.14.4/8.14.4) with ESMTP id 68U5j6l1011489; Wed, 30 Sep 2026 08:45:06 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 68U5j6l1011489 Authentication-Results: mail.openvz.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=virtuozzo.com header.i=@virtuozzo.com header.b="gN8pvSPd" Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by mail.openvz.org (8.14.4/8.14.4) with ESMTP id 68U5j4o0011485 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=FAIL) for ; Wed, 30 Sep 2026 08:45:04 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 68U5j4o0011485 Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-4a006552b00so19901825e9.0 for ; Tue, 29 Sep 2026 22:45:04 -0700 (PDT) X-Gm-Message-State: AFuF++m3KQ4wOvMOk/M2mkZGawnePERSPr+lS1dOKHMmEieUt5swzzU1 f6O8ZSwA76Z9jz4ALfqxw4O2XTHmnfbxF4aMGU/fLfmxHoRPb2Wxxm1vwmWzVHYxV9ulj0WoQTZ W6ayHF72pei9DL7clKBoVSpRs4WY08gGzvNmvD784Row4gqXK9xxdSg== X-Gm-Gg: AYBFou0PiDQ2GvCAzbaXls6SVThReOb6icQHJcX0cPFJ1VSSmfUqOI4JAX5f1hyTYoD 8+2Un2Merwq38rQn5rJ9Ffn7RxRTCrQdCWcifiJcoes10zHNX6469EHb/ba0TxJwJqQJtnR1fWt aZhEM7tGJUkBoTNA+EdIZdW2ED8FHWZDbIxpaUEw/P8gDkePmqIetfWZWljTLpmQhyG/SRAwyT0 TZCxwHrd9ebCfqEB7Kzm6r3rMAnyRJ77d2M3qVuBDI+fuVbO9uVRI183pHGDrvO8tZI+luiSsJa vpKstvg49GLLxKxKaglymOM9M7eroA4o8ofvXiaG8DM3AFup/UYKtsccUGKawNv+Cxpshl41v2S 2KhSPl7IzMOEvRMk= X-Received: by 2002:a05:600d:6445:10b0:4a0:1b14:d00e with SMTP id 5b1f17b1804b1-4a01b14d069mr1488805e9.1.1790747103850; Tue, 29 Sep 2026 22:45:03 -0700 (PDT) X-Received: by 2002:a05:600d:6445:10b0:4a0:1b14:d00e with SMTP id 5b1f17b1804b1-4a01b14d069mr1488615e9.1.1790747103388; Tue, 29 Sep 2026 22:45:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1790747103; cv=none; d=google.com; s=arc-20260327; b=TWq0lkFoKIXE4BLasn4fn6OM7P4iIYb7836Sq+/Uo+zWCyAM+LqSPQgtBMWr/U9GpM gBAhuTPtAgULFbl6L/xxPgy8N1WOSF2rRP+Lx2cBZ/5bjlN/vvId2yEmGCHcVIAu7XE5 mKEjn70ktfW53sms9R9W5PLQSMG0f2hu0GENOl1iiZJuKMWjGpSXh81A1LKBTQirua3V WsOsNqweFBCd2epgNADVUD2njE2liIU1gaH5nextRwTEerKS8I1TBzzTsYIDs63n3eqU N4CgyDUTnH5IFPbH5URrbe7WIfLkHgPHzqtHIz9n3o7eaoJSlMEaOL0MKaa9oAxkQNYv ILGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:dkim-signature; bh=8vvooG7t5LjyEefzsmPkmXqX/jSy1lhqDr5EwENsoeY=; fh=6JpqpGxFeFNaDh+k4t2UfZyo3rKe/54dyQ52T8vVmSc=; b=KgiHx3c6928SasN9yCdrC82HKyDpqLsXz7vFO5Hz+b4P7UrMUstZGgeMQFYBjLwylQ kKJ36vQBWOm9WTWnrVfE5fOby9fqFNsMRKYjbM5IDwvSdr1+qfR0UAn+/0MaDfEjI5uX dLbvmx8qzXnSnKOtdcmTV7U62TELqUMYwd2tdUS7DH13SgbBhOOfWI2kZxcjTy65JtS+ F7LrzLrVCthpWvbTt2ZLPsNeYau0O8ev0X/EhOd7vG+0WlGlbdDNCC3RiTKHcfr4C5LM AiZL0qV47FPIZo03XwAsZUdhRt/J4sbGpIlwL7dYRyipaQIb/eSfB30NJVvgA2R/8wTm lR0A==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=relay header.b=gN8pvSPd; spf=pass (google.com: domain of kui.liu@virtuozzo.com designates 130.117.225.111 as permitted sender) smtp.mailfrom=kui.liu@virtuozzo.com; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=virtuozzo.com Received: from relay.virtuozzo.com (relay.virtuozzo.com. [130.117.225.111]) by mx.google.com with ESMTPS id ffacd0b85a97d-48b029c3526si471136f8f.84.2026.09.29.22.45.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 29 Sep 2026 22:45:03 -0700 (PDT) Received-SPF: pass (google.com: domain of kui.liu@virtuozzo.com designates 130.117.225.111 as permitted sender) client-ip=130.117.225.111; Authentication-Results: mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=relay header.b=gN8pvSPd; spf=pass (google.com: domain of kui.liu@virtuozzo.com designates 130.117.225.111 as permitted sender) smtp.mailfrom=kui.liu@virtuozzo.com; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=virtuozzo.com DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=virtuozzo.com; s=relay; h=Content-Type:MIME-Version:Message-Id:Date:Subject :From; bh=8vvooG7t5LjyEefzsmPkmXqX/jSy1lhqDr5EwENsoeY=; b=gN8pvSPd6SbDBSDo35z dmLFm/RdBQ4CwubUIvdxZ7KrE3+R22Iipmjvruw2IdlbHUhDNpZz/Heie7KgSX6zxFDKnucVV3Frd U48L/pd75maGNEql/1l7LxDogA7L6gVj7/Y1SzQI6TE3FxaKZ1DshzxH2f4jB4Ug0DRuTo1b+e/Zb yTxnku4v32fTqDXkDtPVSnMnnqcRsNvZ4eI9d5Rg1853tw2Pr9h+h0pHCNSr2WcHioiDN7xL1Lzl/ +th9oQb5L55vQIxF5IAOUnAiLo0fZa0ep+eA7Rh6rAKs8voUG8TQhpAYVtcZfgpZEy5Lp62H9t6pC 54YIROgNgqyNupw==; Received: from ch-vpn.virtuozzo.com ([130.117.225.6] helo=LK-MBP.local) by relay.virtuozzo.com with esmtp (Exim 4.96) (envelope-from ) id 1xBn4h-00DrnK-0x; Wed, 30 Sep 2026 07:45:02 +0200 From: Liu Kui Date: Wed, 30 Sep 2026 13:44:47 +0800 Message-Id: <20260930-close-wait-rework-v2-v1-0-f8062178544a@virtuozzo.com> MIME-Version: 1.0 X-B4-Tracking: v=1; b=H4sIAAAAAAAC/yWMQQ6CQAwAv0J6tgYaRPArxsNSqlQNS1oEE8LfX fU4mcys4GIqDqdsBZNZXeOQoNhlwH0YboLaJQbKqcobqpGf0QWXoBOaLNEeOBMeOXBZShWoOUB KR5Orvn/bM/SsWO8LuPyFv9q78PSdwrZ9ALML+wuBAAAA X-Change-ID: 20260928-close-wait-rework-v2-7cac44e6a295 To: Konstantin Khorenko X-Mailer: b4 0.16.0 X-OZ-Fwd: true Cc: azaitsev@virtuozzo.com, devel@openvz.org, Liu Kui Subject: [Devel] [PATCH hci-8.1 0/3] fs/fuse: rework close_wait handling X-BeenThere: devel@openvz.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: OpenVZ development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: devel-bounces@openvz.org Errors-To: devel-bounces@openvz.org Rework the close_wait handling around fuse file open/close: - give num_openers and i_size_unstable each a single role: the flag alone decides when attributes are taken from the server, the counter only drives kio's file_open/file_close pairing - move all the close_wait handling of fuse_release() into a new helper and restore the !close_wait case to the mainline behavior; the atomic last-open detection under the inode lock fixes two racing releasers both calling kio's file_close - decouple the releaser's wait for ff->count from fi->page_waitq: switch it to wait_var_event() and fold the matching wake_up_var() into fuse_file_put(), so the wakeup can never be separated from the reference drop again (see commit 3b2cc738990e ("fs/fuse: wake close_wait waiters when fuse_writepage_locked() bails out") for the most recent instance of a drop site missing the wakeup), removing __fuse_file_put() and fuse_release_ff() https://virtuozzo.atlassian.net/browse/VSTOR-147878 --- Liu Kui (3): fs/fuse: give num_openers and i_size_unstable each a single role fs/fuse: move the close_wait handling of fuse_release() into a helper fs/fuse: use wait_var_event to wait for fuse file references fs/fuse/file.c | 177 +++++++++++++++++++------------------ fs/fuse/fuse_i.h | 6 +- fs/fuse/inode.c | 5 +- fs/fuse/kio/pcs/pcs_fuse_kdirect.c | 3 +- 4 files changed, 101 insertions(+), 90 deletions(-) --- base-commit: ca54f152160587a74ff17cb52feef16f7b9d4e2b change-id: 20260928-close-wait-rework-v2-7cac44e6a295 Best regards, -- Liu Kui _______________________________________________ Devel mailing list Devel@openvz.org https://lists.openvz.org/mailman/listinfo/devel