freebsd_amp_hwpstate/sys/fs/fuse
Pawel Jakub Dawidek 56a8aca83a Stop treating size 0 as unknown size in vnode_create_vobject().
Whenever file is created, the vnode_create_vobject() function will
try to determine its size by calling vn_getsize_locked() as size 0
is ambigious: it means either the file size is 0 or the file size
is unknown.

Introduce special value for the size argument: VNODE_NO_SIZE.
Only when it is given, the vnode_create_vobject() will try to obtain
file's size on its own.

Introduce dedicated vnode_disk_create_vobject() for use by
g_vfs_open(), so we don't have to call vn_isdisk() in the common case
(for regular files).

Handle the case of mediasize==0 in g_vfs_open().

Reviewed by: alc, kib, markj, olce
Approved by: oshogbo (mentor), allanjude (mentor)
Differential Revision: https://reviews.freebsd.org/D45244
2024-05-23 06:08:14 +00:00
..
fuse.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
fuse_device.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
fuse_file.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
fuse_file.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
fuse_internal.c fusefs: only test for incoherency if FN_SIZECHANGE is set 2024-02-08 20:13:24 -07:00
fuse_internal.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
fuse_io.c Add vnode_pager_clean_{a,}sync(9) 2024-01-11 18:44:53 +02:00
fuse_io.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
fuse_ipc.c fuse: Fix typo (triple S) 2023-12-27 20:24:32 -07:00
fuse_ipc.h fusefs: sanitize FUSE_READLINK results for embedded NULs 2023-10-07 08:22:03 -06:00
fuse_kernel.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
fuse_main.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
fuse_node.c Stop treating size 0 as unknown size in vnode_create_vobject(). 2024-05-23 06:08:14 +00:00
fuse_node.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
fuse_vfsops.c Stop treating size 0 as unknown size in vnode_create_vobject(). 2024-05-23 06:08:14 +00:00
fuse_vnops.c Fix build. 2024-05-22 03:56:59 +00:00