OpenVZ / Virtuozzo kernel development (devel@openvz.org)
 help / color / mirror / Atom feed
From: Liu Kui <kui.liu@virtuozzo.com>
To: Konstantin Khorenko <khorenko@virtuozzo.com>
Cc: azaitsev@virtuozzo.com, devel@openvz.org,
	Liu Kui <kui.liu@virtuozzo.com>
Subject: [Devel] [PATCH hci-8.1 0/3] fs/fuse: rework close_wait handling
Date: Wed, 30 Sep 2026 13:44:47 +0800	[thread overview]
Message-ID: <20260930-close-wait-rework-v2-v1-0-f8062178544a@virtuozzo.com> (raw)

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 <kui.liu@virtuozzo.com>

_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

             reply	other threads:[~2026-09-30  5:46 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-30  5:44 Liu Kui [this message]
2026-09-30  5:44 ` [Devel] [PATCH hci-8.1 1/3] fs/fuse: give num_openers and i_size_unstable each a single role Liu Kui
2026-09-30  5:50   ` no-reply
2026-09-30  5:44 ` [Devel] [PATCH hci-8.1 2/3] fs/fuse: move the close_wait handling of fuse_release() into a helper Liu Kui
2026-09-30  5:49   ` no-reply
2026-09-30  5:44 ` [Devel] [PATCH hci-8.1 3/3] fs/fuse: use wait_var_event to wait for fuse file references Liu Kui
2026-09-30  5:51   ` no-reply
2026-09-30 15:39 ` [Devel] [PATCH hci-8.1 0/3] fs/fuse: rework close_wait handling Konstantin Khorenko

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=20260930-close-wait-rework-v2-v1-0-f8062178544a@virtuozzo.com \
    --to=kui.liu@virtuozzo.com \
    --cc=azaitsev@virtuozzo.com \
    --cc=devel@openvz.org \
    --cc=khorenko@virtuozzo.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