Re: [PATCH] 9p: treat read return values of 0 as EOF

David Howells <[email protected]> Mon, 13 Jul 2026 10:29:02 +0100
Newsgroups dev.linux.lists.v9fs,org.kernel.vger.linux-kernel
Organization Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903
Message-ID <[email protected]>
This is kind of a weird situation.  We're caching locally the content of files
aren't really regular files and probably shouldn't be cached.  I'm not sure
what the best way to deal with that is.  I wonder if there's some way to
detect that and mark then non-cacheable.  (Assuming the server can be told not
to even serve them).

Can we detect that the EOF length doesn't match i_size and set a flag to say
"don't cache" in netfs_inode::flags?

David