freebsd-src/sys/fs/ext2fs
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
..
ext2_acl.c sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ext2_acl.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ext2_alloc.c sys: Remove ancient SCCS tags. 2023-11-26 22:23:30 -07:00
ext2_balloc.c sys: Remove ancient SCCS tags. 2023-11-26 22:23:30 -07:00
ext2_bmap.c sys: Remove ancient SCCS tags. 2023-11-26 22:23:30 -07:00
ext2_csum.c sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ext2_dinode.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ext2_dir.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ext2_extattr.c sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ext2_extattr.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ext2_extents.c sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ext2_extents.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ext2_extern.h sys: Remove ancient SCCS tags. 2023-11-26 22:23:30 -07:00
ext2_hash.c sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ext2_htree.c sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ext2_inode.c sys: Remove ancient SCCS tags. 2023-11-26 22:23:30 -07:00
ext2_inode_cnv.c sys: Remove $FreeBSD$: one-line .h pattern 2023-08-16 11:54:18 -06:00
ext2_lookup.c sys: Remove ancient SCCS tags. 2023-11-26 22:23:30 -07:00
ext2_mount.h sys: Remove ancient SCCS tags. 2023-11-26 22:23:30 -07:00
ext2_subr.c sys: Remove ancient SCCS tags. 2023-11-26 22:23:30 -07:00
ext2_vfsops.c Stop treating size 0 as unknown size in vnode_create_vobject(). 2024-05-23 06:08:14 +00:00
ext2_vnops.c sys: Remove ancient SCCS tags. 2023-11-26 22:23:30 -07:00
ext2fs.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
fs.h sys: Remove ancient SCCS tags. 2023-11-26 22:23:30 -07:00
htree.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
inode.h sys: Remove ancient SCCS tags. 2023-11-26 22:23:30 -07:00