lkml.org 
[lkml]   [2003]   [Nov]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[Patch 4/5] dm: set io restriction defaults
Make sure that a target has a sensible set of default io restrictions.
--- diff/drivers/md/dm-table.c 2003-11-25 15:47:38.000000000 +0000
+++ source/drivers/md/dm-table.c 2003-11-25 15:47:59.000000000 +0000
@@ -630,6 +630,16 @@
return 0;
}

+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->seg_boundary_mask = -1;
+}
+
int dm_table_add_target(struct dm_table *t, const char *type,
sector_t start, sector_t len, char *params)
{
@@ -642,6 +652,7 @@

tgt = t->targets + t->num_targets;
memset(tgt, 0, sizeof(*tgt));
+ set_default_limits(&tgt->limits);

tgt->type = dm_get_target_type(type);
if (!tgt->type) {
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 13:58    [W:0.075 / U:0.380 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site