freebsd-src/sys/vm
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
..
_vm_phys.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
_vm_radix.h radix_trie: have vm_radix use pctrie code 2023-09-12 02:42:38 -05:00
device_pager.c cdev_pager_allocate(): ensure that the cdev_pager_ops ctr is called only once 2024-05-12 04:13:00 +03:00
memguard.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
memguard.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
phys_pager.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
pmap.h pmap: Convert boolean_t to bool. 2024-01-31 14:48:26 -08:00
redzone.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
redzone.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
sg_pager.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
swap_pager.c swap-like pagers: assert that writemapping decrease does not pass zero 2024-05-13 21:33:29 +03:00
swap_pager.h sys: Remove ancient SCCS tags. 2023-11-26 22:23:30 -07:00
uma.h uma: Permit specifying max of cache line and some custom alignment 2023-11-02 09:30:03 -04:00
uma_align_mask.h uma: Make the cache alignment mask unsigned 2023-11-02 09:30:03 -04:00
uma_core.c uma: Improve memory modified after free panic messages 2023-11-09 19:46:26 -05:00
uma_dbg.c Fix build on powerpc after previous commit. 2023-11-09 21:21:47 -05:00
uma_dbg.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
uma_int.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
vm.h vm: add macro to mark arguments used when NUMA is defined 2024-04-09 10:23:47 -04:00
vm_domainset.c Avoid waiting on physical allocations that can't possibly be satisfied 2023-12-23 23:01:40 -06:00
vm_domainset.h Avoid waiting on physical allocations that can't possibly be satisfied 2023-12-23 23:01:40 -06:00
vm_dumpset.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
vm_extern.h vm: Change the return types of kernacc and useracc to bool 2024-05-10 13:43:56 -07:00
vm_fault.c sys: Remove ancient SCCS tags. 2023-11-26 22:23:30 -07:00
vm_glue.c vm: Change the return types of kernacc and useracc to bool 2024-05-10 13:43:56 -07:00
vm_init.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
vm_kern.c Avoid waiting on physical allocations that can't possibly be satisfied 2023-12-23 23:01:40 -06:00
vm_kern.h vm: improve kstack_object pindex calculation to avoid pindex holes 2024-04-10 17:37:20 +02:00
vm_map.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
vm_map.h sys: Remove ancient SCCS tags. 2023-11-26 22:23:30 -07:00
vm_meter.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
vm_mmap.c Remove never implemented sbrk and sstk syscalls 2023-12-04 20:36:08 +00:00
vm_object.c sysctl vm.objects/vm.swap_objects: do not fill vnode info if jailed 2024-01-16 22:15:39 +02:00
vm_object.h sys: Remove ancient SCCS tags. 2023-11-26 22:23:30 -07:00
vm_page.c vm_page_reclaim_contig(): update comment to chase recent changes 2024-01-02 15:39:36 -06:00
vm_page.h vm: add macro to mark arguments used when NUMA is defined 2024-04-09 10:23:47 -04:00
vm_pageout.c sys: Remove ancient SCCS tags. 2023-11-26 22:23:30 -07:00
vm_pageout.h sys: Remove ancient SCCS tags. 2023-11-26 22:23:30 -07:00
vm_pagequeue.h sys: Remove ancient SCCS tags. 2023-11-26 22:23:30 -07:00
vm_pager.c sys: Remove ancient SCCS tags. 2023-11-26 22:23:30 -07:00
vm_pager.h sys: Remove ancient SCCS tags. 2023-11-26 22:23:30 -07:00
vm_param.h sys: Remove ancient SCCS tags. 2023-11-26 22:23:30 -07:00
vm_phys.c vm: add macro to mark arguments used when NUMA is defined 2024-04-09 10:23:47 -04:00
vm_phys.h vm: add macro to mark arguments used when NUMA is defined 2024-04-09 10:23:47 -04:00
vm_radix.c vm_radix: add a missing paren 2023-09-12 04:19:51 -05:00
vm_radix.h radix_trie: have vm_radix use pctrie code 2023-09-12 02:42:38 -05:00
vm_reserv.c vm_reserv_reclaim_contig: Return NULL not false 2024-04-10 08:50:16 -04:00
vm_reserv.h vm_reserv: Add vm_reserv_is_populated 2024-04-07 12:28:52 -05:00
vm_swapout.c vm: improve kstack_object pindex calculation to avoid pindex holes 2024-04-10 17:37:20 +02:00
vm_swapout_dummy.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
vm_unix.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
vnode_pager.c Stop treating size 0 as unknown size in vnode_create_vobject(). 2024-05-23 06:08:14 +00:00
vnode_pager.h Add vnode_pager_clean_{a,}sync(9) 2024-01-11 18:44:53 +02:00