[dm-devel] [PATCH] fix default IO restrictions

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

 




Becuase dm-table combines low against the default values, if all the devices in the table had IO restriction values greater than what is set in set_default_limits, the table's, target's, and DM queue's values will never get updated.

The attached patch fixes this by setting the initial defaults to unrealistic values, so the first added device will reset them.

The patch was made against 2.6.0-udm5.

Mike
--- linux-2.6.0-udm5.orig/drivers/md/dm-table.c	2004-01-22 20:22:55.000000000 -0800
+++ linux-2.6.0-udm5/drivers/md/dm-table.c	2004-01-22 20:27:01.041078794 -0800
@@ -633,11 +633,11 @@ static int split_args(int *argc, char **
 
 static void set_default_limits(struct io_restrictions *rs)
 {
-	rs->max_sectors = MAX_SECTORS;
-	rs->max_phys_segments = MAX_PHYS_SEGMENTS;
-	rs->max_hw_segments = MAX_HW_SEGMENTS;
-	rs->hardsect_size = 1 << SECTOR_SHIFT;
-	rs->max_segment_size = MAX_SEGMENT_SIZE;
+	rs->max_sectors = -1;
+	rs->max_phys_segments = -1;
+	rs->max_hw_segments = -1;
+	rs->hardsect_size = -1;
+	rs->max_segment_size = -1;
 	rs->seg_boundary_mask = -1;
 }
 

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

  Powered by Linux