[Devel] [PATCH hci-8.1 1/3] fs/fuse: give num_openers and i_size_unstable each a single role

no-reply at sashiko.virtuozzo.com no-reply at sashiko.virtuozzo.com
Wed Sep 30 08:50:08 MSK 2026


> Currently fi->num_openers serves two purposes: it helps decide whether
> the i_size attribute needs to be taken from the server, and it manages
> when kio's file_open/file_close methods need to be called. The former
> role already requires the extra i_size_unstable flag to handle lease
> revokes, which makes num_openers redundant for that purpose.
> 
> Give each field a single role: use i_size_unstable as the "take the
> attributes from the server" flag, and make num_openers a pure open
> count managing the calls of kio's file_open/file_close. A new inode
> starts with the i_size_unstable flag set, an open finding it set
> refreshes the attributes and clears it on success, and the last
> release sets it back after writeback has drained.
> 
> Also fix a bug where a failed refresh could re-trust stale local
> attributes.
> 
> https://virtuozzo.atlassian.net/browse/VSTOR-147878
> 
> Signed-off-by: Liu Kui <kui.liu at virtuozzo.com>

Sashiko has reviewed this patch and found no issues. It looks great!

-- 
Sashiko AI review · https://sashiko.vzint.dev/#/patchset/20260930-close-wait-rework-v2-v1-0-f8062178544a@virtuozzo.com?part=1




More information about the Devel mailing list