Re: [PATCH] ntfs: mount hibernated volumes read-only regardless of errors=
From: Namjae Jeon
Date: Mon Sep 14 2026 - 11:09:08 EST
On Mon, Sep 14, 2026 at 12:42 PM Hongling Zeng <zenghongling@xxxxxxxxxx> wrote:
>
> The hibernation check in load_system_files() only converts the
> superblock to read-only under errors=remount-ro. With the default
> errors=continue (and with errors=panic), a hibernated volume is
> mounted read-write and the mount-time $LogFile emptying writes to it,
> although a hibernated volume must not be written to at all.
>
> Drop the on_errors term so that a hibernated volume, or a volume whose
> hibernation state cannot be determined, always mounts read-only.
> NVolErrors() is still recorded, so ntfs_reconfigure() keeps refusing
> remounts to read-write, and the $LogFile emptying is skipped by its
> !sb_rdonly() check.
check_windows_hibernation_status() calls ntfs_error() before SB_RDONLY
is set. With errors=panic, this panics before reaching the new
read-only fallback...