opnsense-src/sys/fs/msdosfs
Konstantin Belousov 0152d453a0 msdosfs deextend: validate pages of the partial buffer
Suppose that the cluster size is larger than page size. If the buffer
at the old EOF (before extending) was partial and dirty, it cannot be
automatically neither written out nor validated by the buffer cache,
since extending buffer adds invalid pages at the end.

Correct the buffer state by calling vfs_bio_clrbuf() on it, to mark
newly added and zeroed pages as valid.

Note that UFS is immune to the problem because ffs_truncate() always
allocate the block and buffer for the last byte of the file.

PR:	269341
Reported by:	asomers
In collaboration with:	pho
Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D38549
2023-02-14 00:29:42 +02:00
..
bootsect.h
bpb.h
denode.h msdosfs: drop now unused DE_RENAME 2021-08-27 18:39:45 +03:00
direntry.h Revert msdosfs MAKEFS #ifdef changes from r319870 2018-07-24 21:10:17 +00:00
fat.h msdosfs: clusterfree() is used only in error handling cases 2022-01-08 05:41:44 +02:00
msdosfs_conv.c fs: clean up empty lines in .c and .h files 2020-09-01 21:18:40 +00:00
msdosfs_denode.c msdosfs deextend: validate pages of the partial buffer 2023-02-14 00:29:42 +02:00
msdosfs_fat.c msdosfs: on integrity error, fire a task to remount filesystem to ro 2022-01-08 06:20:48 +02:00
msdosfs_iconv.c sys/fs: further adoption of SPDX licensing ID tags. 2017-11-27 15:15:37 +00:00
msdosfs_lookup.c vfs: always retain path buffer after lookup 2022-09-17 09:10:38 +00:00
msdosfs_vfsops.c Stop cleaning MNT_LOCAL on unmount 2023-01-14 20:28:11 +02:00
msdosfs_vnops.c vfs: retire the now unused SAVESTART flag 2022-12-19 08:11:08 +00:00
msdosfsmount.h msdosfs: use mntfs vnode for pm_devvp 2022-01-08 06:21:58 +02:00