Page MenuHomeFreeBSD

Handle ro remount of tmpfs rw mount.

Authored by kib on Mar 28 2019, 3:55 PM.



In particular:

  • suspend the mount around vflush() to avoid new writes come after the vnode is processed
  • flush pending metadata updates (mostly node times)
  • remap all rw mappings of files from the mount into ro (this is not clear to me how to handle best, might be revoke the mapping at all)
  • disable metadata updates after the mp is ro

Diff Detail

rS FreeBSD src repository
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

kib created this revision.Mar 28 2019, 3:55 PM
kib added a comment.Mar 28 2019, 3:56 PM

At the moment this is FYI, the patch is the work in progress. Most important, it handles things I know are broken already, but complete audit of tmpfs is needed to identify the rest of it.

sobomax accepted this revision.Mar 28 2019, 5:36 PM

Looks good to my VFS-naive eye. Thanks!

This revision is now accepted and ready to land.Mar 28 2019, 5:36 PM
kib added a subscriber: pho.Mar 30 2019, 2:14 PM
kib updated this revision to Diff 55728.Apr 2 2019, 1:37 PM

Update diff to the fixed committable version.

This revision now requires review to proceed.Apr 2 2019, 1:37 PM
This revision was not accepted when it landed; it landed in state Needs Review.Apr 2 2019, 1:41 PM
This revision was automatically updated to reflect the committed changes.