Skip to content

Snapshots was allowed to mount as read-write and attempt to write to that snapshot lead a kernel panic #6510

@Low-power

Description

@Low-power

System information

Type Version/Name
Distribution Name Debian GNU/Linux
Distribution Version 9
Linux Kernel 4.9
Architecture amd64
ZFS Version 0.7.1
SPL Version 0.7.1

The console screenshot are [removed link]

Describe the problem you're observing

I was suppressed at first when I discovered I could just mount -o remount,rw a snapshot file system under the .zfs/snapshot/ directory. When I trying to create a file in a rw mounted snapshot, expecting some errors, but the kernel then panics, the panic message is "dirtying snapshot!".

Describe how to reproduce the problem

Create a snapshot;
Browse the snapshot from .zfs/snapshot/ or mount the snapshot directly;
Run a mount -o remount,rw <path> to remount the snapshot file system read-write;
Modify the read-write mounted file system, such as creating new file or truncating exist file.

Include any warning/errors/backtraces from the system logs

[removed link]

zfs-on-linux-snapshot-rw-mount-panic

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions