Hi Christoph! > [hch: rebased. don't mirror the compound read-only flag into a field, My original patch separated "should-write-bios-be-rejected?" state from "did-the-user-set-this-partition-ro?". In the rebased version a full-device state transition in update_all_part_ro_state() blows away any policy the user has set on a given partition. The blktests that fail are due to something like: # modprobe scsi_debug num_parts=2 # blockdev --setro /dev/sda2 # grep . /sys/block/sda/sda2/ro 1 # echo 1 > /sys/module/scsi_debug/parameters/wp # echo 1 > /sys/block/sda/device/rescan # echo 0 > /sys/module/scsi_debug/parameters/wp # echo 1 > /sys/block/sda/device/rescan # grep . /sys/block/sda/sda2/ro 0 The user expectation is that since they set partition 2 readonly it should remain that way until they either clear the flag or issue BLKRRPART to cause the partition table to be reread. -- Martin K. Petersen Oracle Linux Engineering