Thread: OpenBSD Sync disks in a better way
View Single Post
  #1   (View Single Post)  
Old 2nd December 2017
e1-531g e1-531g is offline
VPN Cryptographer
 
Join Date: Mar 2014
Posts: 448
Default Sync disks in a better way

News/call for testing from tech: 2017-12-01 20:48
Sync disks in a better way
Quote:
Originally Posted by Theo de Raadt
For more than a decade I have pointed out vfs_shutdown does a terrible
job, but noone took the bait to fix it. It uses proc0, does spl0, and
a loop which makes it clear the operation may fail... and we've see
evidence the loop fails. It really cannot gaurantee the filesystem is
clean.

bluhm recently pointed out a problem where the failure could cause
entry into ddb (long story removed), so I rolled up my sleeves.
kettenis suggested rather than unmounting filesystems we could try
downgrading them to read-only. That exposed a deep-down copyin in
each filesystem's VOP handling function for mounts, vfs_init
infrastructure needed to some love.

After all that work, it turns out writeable vnodes on a readonly
filesystem can cause the change to readonly to fail, so we need to
invalidate such vnodes with a hammer.

This seems to be working. I'd like to know of anyone sees failures,
otherwise in few days I'll test this in snapshots. (Besides building
a new kernel, you want to make includes, build a new sysctl binary,
and install that).
__________________
Signature: Furthermore, I consider that systemd must be destroyed.
Based on Latin oratorical phrase
Reply With Quote