aboutsummaryrefslogtreecommitdiff
path: root/sys/modules/etherswitch
diff options
context:
space:
mode:
authorMaxim Sobolev <sobomax@FreeBSD.org>2026-10-13 02:44:40 +0000
committerMaxim Sobolev <sobomax@FreeBSD.org>2026-10-13 04:28:32 +0000
commite8534ba3ad36b88e94de0a3174e9ab7ac04a929d (patch)
tree4339fd7274e1e717e0c1df5f6d75644664077a58 /sys/modules/etherswitch
parent26d84bb8bf9b4acd0aa80b0208c1ba4fc9646ff3 (diff)
ufs: do not let a rolled back inode write end a data-only sync
With soft updates, ffs_syncvnode() writes the inode between its passes while buffers are still dirty. That write can go out with new block pointers rolled back, for instance a new indirect block whose contents are only written in a later pass, yet ffs_update() clears IN_SIZEMOD and IN_IBLKDATA because the write was synchronous. A data-only sync then decides at the end that the inode need not be written, and fdatasync(2) or an O_DSYNC write that allocated the first indirect block returned with the on-disk inode not pointing to it. Note on entry whether a data-only sync has to write the inode, and base the final write, done once all dependencies are flushed, on that alone: nothing else can set IN_SIZEMOD or IN_IBLKDATA meanwhile, as the vnode is locked. A full sync always writes the inode last and was not affected. Sponsored by: Sippy Software, Inc. Reviewed by: kib Tested by: pho Differential Revision: https://reviews.freebsd.org/D60134 MFC after: 1 month
Diffstat (limited to 'sys/modules/etherswitch')
0 files changed, 0 insertions, 0 deletions