[Midnightbsd-cvs] [MidnightBSD/src] ef1638: Clear the IN_SIZEMOD and IN_IBLKDATA flags only wh...
Lucas Holt
noreply at github.com
Wed Jul 7 10:48:14 EDT 2021
Branch: refs/heads/master
Home: https://github.com/MidnightBSD/src
Commit: ef1638e98bee8ef5007eea9ce6ff04727b7ddbd2
https://github.com/MidnightBSD/src/commit/ef1638e98bee8ef5007eea9ce6ff04727b7ddbd2
Author: Lucas Holt <luke at foolishgames.com>
Date: 2021-07-07 (Wed, 07 Jul 2021)
Changed paths:
M sys/ufs/ffs/ffs_alloc.c
M sys/ufs/ffs/ffs_balloc.c
M sys/ufs/ffs/ffs_extern.h
M sys/ufs/ffs/ffs_inode.c
M sys/ufs/ffs/ffs_rawread.c
M sys/ufs/ffs/ffs_snapshot.c
M sys/ufs/ffs/ffs_softdep.c
M sys/ufs/ffs/ffs_subr.c
M sys/ufs/ffs/ffs_suspend.c
M sys/ufs/ffs/ffs_tables.c
M sys/ufs/ffs/ffs_vfsops.c
M sys/ufs/ffs/ffs_vnops.c
M sys/ufs/ffs/fs.h
M sys/ufs/ffs/softdep.h
M sys/ufs/ufs/README.acls
M sys/ufs/ufs/README.extattr
M sys/ufs/ufs/acl.h
M sys/ufs/ufs/dinode.h
M sys/ufs/ufs/dir.h
M sys/ufs/ufs/dirhash.h
M sys/ufs/ufs/extattr.h
M sys/ufs/ufs/gjournal.h
M sys/ufs/ufs/inode.h
M sys/ufs/ufs/quota.h
M sys/ufs/ufs/ufs_acl.c
M sys/ufs/ufs/ufs_bmap.c
M sys/ufs/ufs/ufs_dirhash.c
M sys/ufs/ufs/ufs_extattr.c
M sys/ufs/ufs/ufs_extern.h
M sys/ufs/ufs/ufs_gjournal.c
M sys/ufs/ufs/ufs_inode.c
M sys/ufs/ufs/ufs_lookup.c
M sys/ufs/ufs/ufs_quota.c
M sys/ufs/ufs/ufs_vfsops.c
M sys/ufs/ufs/ufs_vnops.c
M sys/ufs/ufs/ufsmount.h
Log Message:
-----------
Clear the IN_SIZEMOD and IN_IBLKDATA flags only when doing a
synchronous inode update.
The IN_SIZEMOD and IN_IBLKDATA flags indicate changes to the
file size and block pointer fields in the inode. When these
fields have been changed, the fsync() and fsyncdata() system
calls must write the inode to ensure their semantics that the
file is on stable store.
The IN_SIZEMOD and IN_IBLKDATA flags cannot be cleared until
a synchronous write of the inode is done. If they are cleared
on an asynchronous write, then the inode may not yet have been
written to the disk when an fsync() or fsyncdata() call is done.
Absent these flags, these calls would not know that they needed
to write the inode. Thus, these flags only can be cleared on
synchronous writes of the inode. Since the inode will be locked
for the duration of the I/O that writes it to disk, no fsync()
or fsyncdata() will be able to run before the on-disk inode
is complete.
Obtained from: FreeBSD, mckusick
https://reviews.freebsd.org/rS361875
More information about the Midnightbsd-cvs
mailing list