+ partitions-let-partitions-inherit-policy-from-disk.patch added to -mm tree

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

 



The patch titled

     partitions: let partitions inherit policy from disk

has been added to the -mm tree.  Its filename is

     partitions-let-partitions-inherit-policy-from-disk.patch

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

------------------------------------------------------
Subject: partitions: let partitions inherit policy from disk
From: Peter Oberparleiter <peter.oberparleiter@xxxxxxxxxx>

Change the partition code in fs/partitions/check.c to initialize a newly
detected partition's policy field with that of the containing block device
(see patch below).

My reasoning is that function set_disk_ro() in block/genhd.c modifies the
policy field (read-only indicator) of a disk and all contained partitions. 
When a partition is detected after the call to set_disk_ro(), the policy
field of this partition will currently not inherit the disk's policy field.
 This behavior poses a problem in cases where a block device can be
'logically de- and reactivated' like e.g.  the s390 DASD driver because
partition detection may run after the policy field has been modified.

Signed-off-by: Peter Oberparleiter <peter.oberparleiter@xxxxxxxxxx>
Acked-by: Al Viro <viro@xxxxxxxxxxxxxxxx>
Makes-sense-to: Jens Axboe <axboe@xxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 fs/partitions/check.c |    1 +
 1 file changed, 1 insertion(+)

diff -puN fs/partitions/check.c~partitions-let-partitions-inherit-policy-from-disk fs/partitions/check.c
--- a/fs/partitions/check.c~partitions-let-partitions-inherit-policy-from-disk
+++ a/fs/partitions/check.c
@@ -348,6 +348,7 @@ void add_partition(struct gendisk *disk,
 	p->start_sect = start;
 	p->nr_sects = len;
 	p->partno = part;
+	p->policy = disk->policy;
 
 	devfs_mk_bdev(MKDEV(disk->major, disk->first_minor + part),
 			S_IFBLK|S_IRUSR|S_IWUSR,
_

Patches currently in -mm which might be from peter.oberparleiter@xxxxxxxxxx are

origin.patch
partitions-let-partitions-inherit-policy-from-disk.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux