All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joe Thornber <thornber@sistina.com>
To: Joe Thornber <thornber@sistina.com>
Cc: Linux Mailing List <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@zip.com.au>,
	Linus Torvalds <torvalds@osdl.org>
Subject: [Patch 4/5] dm: set io restriction defaults
Date: Tue, 25 Nov 2003 16:34:13 +0000	[thread overview]
Message-ID: <20031125163412.GE524@reti> (raw)
In-Reply-To: <20031125162451.GA524@reti>

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) {

  parent reply	other threads:[~2003-11-25 16:33 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-11-25 16:24 2.6.0-t10-dm1 Joe Thornber
2003-11-25 16:30 ` [Patch 1/5] dm: fix block device resizing Joe Thornber
2003-11-25 16:31 ` [Patch 2/5] dm: remove dynamic table resizing Joe Thornber
2003-11-25 16:33 ` [Patch 3/5] dm: make v4 of the ioctl interface the default Joe Thornber
2003-11-25 16:47   ` Kevin P. Fleming
2003-11-25 17:05     ` Joe Thornber
2003-11-25 17:15       ` Kevin P. Fleming
2003-11-25 18:00         ` Joe Thornber
2003-11-25 17:29       ` Wichert Akkerman
2003-11-25 20:18         ` Alasdair G Kergon
2003-11-25 23:45           ` Adrian Bunk
2003-11-26 11:39             ` Joe Thornber
2003-11-25 17:09     ` Kevin Corry
2003-11-25 17:16       ` Kevin P. Fleming
2003-11-25 17:28         ` Kevin Corry
2003-11-25 17:20   ` Christoph Hellwig
2003-11-25 17:59     ` Joe Thornber
2003-11-25 16:34 ` Joe Thornber [this message]
2003-11-25 16:35 ` [Patch 5/5] dm: dm_table_event() sleep on spinlock bug Joe Thornber

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20031125163412.GE524@reti \
    --to=thornber@sistina.com \
    --cc=akpm@zip.com.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.