btrfs
btrfs copied to clipboard
Need option to remount btrfs volume r/o, and then r/w again (IOCTL_DISK_SET_DISK_ATTRIBUTES ?)
We need option to remount btrfs volume r/o, and then r/w again (IOCTL_DISK_SET_DISK_ATTRIBUTES ?).
Question is how to handle open file handles. Should they be flushed to disk first? Which Zw*() API is the right one? Is IOCTL_DISK_SET_DISK_ATTRIBUTES a good API candidate?
There's a "Readonly" option in the registry, which takes effect on the next remount. Unfortunately there's no easy way to unmount a (non-removable) disk on Windows.