Bug 200439
Summary: | LVM snapshoting broke in 4.16 (Failed to lock logical volume) | ||
---|---|---|---|
Product: | IO/Storage | Reporter: | WGH (wgh) |
Component: | LVM2/DM | Assignee: | Alasdair G Kergon (agk) |
Status: | RESOLVED INVALID | ||
Severity: | normal | ||
Priority: | P1 | ||
Hardware: | All | ||
OS: | Linux | ||
Kernel Version: | 4.16.18-gentoo | Subsystem: | |
Regression: | Yes | Bisected commit-id: |
Description
WGH
2018-07-07 15:53:09 UTC
Still happens to me as of 4.17.9. So I bisected the bug on vanilla kernel. First bad commit is commit 721c7fc701c71f693307d274d2b346a1ecd4a534 (HEAD, refs/bisect/bad) Author: Ilya Dryomov <idryomov@gmail.com> Date: Thu Jan 11 14:09:11 2018 +0100 block: fail op_is_write() requests to read-only partitions Regular block device writes go through blkdev_write_iter(), which does bdev_read_only(), while zeroout/discard/etc requests are never checked, both userspace- and kernel-triggered. Add a generic catch-all check to generic_make_request_checks() to actually enforce ioctl(BLKROSET) and set_disk_ro(), which is used by quite a few drivers for things like snapshots, read-only backing files/images, etc. Reviewed-by: Sagi Grimberg <sagi@grimberg.me> Signed-off-by: Ilya Dryomov <idryomov@gmail.com> Signed-off-by: Jens Axboe <axboe@kernel.dk> This was fixed on lvm2 (userspace) side in commit https://sourceware.org/git/?p=lvm2.git;a=commit;h=a6fdb9d9d70f51c49ad11a87ab4243344e6701a3. |