RE: [PATCH] [RFC] switch DM tables to readonly automatically

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,
Though the patch creates read-only device mappings, the READONLY status is not reflected on device mapper multipath devices.
Example: open with O_RDWR flag succeeds for read-only mpath devices, and write fails with "Operation not permitted" error.

Attached patch would fix this.

Thanks,
Vijay

-----Original Message-----
From: dm-devel-bounces@xxxxxxxxxx [mailto:dm-devel-bounces@xxxxxxxxxx] On Behalf Of Hannes Reinecke
Sent: Friday, April 25, 2008 8:03 PM
To: device-mapper development
Subject:  [PATCH] [RFC] switch DM tables to readonly automatically

Hi all,

this patch switches the device-mapper table to read-only status automatically if one underlying device returns -EROFS.

Rationale:
Whenever a SCSI device is switched to read-only a table reload from multipath-tools fails, without any indication about the reason. And it's actually quite tricky to detect the read-only status from userland. And quite pointless, too, as the kernel already knows about it.

And we now can create tables for CD-ROMs, too, without having to use the '-r' flag to dmsetup ...

Christophe, this might also fix your problem.

As usual, comments etc are welcome.

Cheers,

Hannes
--
Dr. Hannes Reinecke                   zSeries & Storage
hare@xxxxxxx                          +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Markus Rex, HRB 16746 (AG Nürnberg)

Attachment: md-patch.diff
Description: md-patch.diff

--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel

[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux