]> git.baikalelectronics.ru Git - kernel.git/commit
dm: fix opening log and cow devices for read only tables
authorMilan Broz <mbroz@redhat.com>
Thu, 24 Mar 2011 13:52:14 +0000 (13:52 +0000)
committerAlasdair G Kergon <agk@redhat.com>
Thu, 24 Mar 2011 13:52:14 +0000 (13:52 +0000)
commit649a3729db64c23fe947b05acddd4b272c592530
treef81ce3ac56c911577942b8404ed45a980c321621
parent005ae244b7e892a26f251677c6ad3436d7422ab0
dm: fix opening log and cow devices for read only tables

If a table is read-only, also open any log and cow devices it uses read-only.

Previously, even read-only devices were opened read-write internally.
After patch de03c9a7f7ded90f416fd397a034d176e8fdea54
  block: check bdev_read_only() from blkdev_get()
was applied, loading such tables began to fail.  The patch
was reverted by 89ef43bcea10c0b05e0f370500668eb6b3e8e5f5
  block: revert block_dev read-only check
but this patch fixes this part of the code to work with the original patch.

Signed-off-by: Milan Broz <mbroz@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
drivers/md/dm-log.c
drivers/md/dm-snap.c