From patchwork Fri Sep 18 16:26:32 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Junichi Nomura X-Patchwork-Id: 48566 Received: from hormel.redhat.com (hormel1.redhat.com [209.132.177.33]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n8IGl60D016254 for ; Fri, 18 Sep 2009 16:47:06 GMT Received: from listman.util.phx.redhat.com (listman.util.phx.redhat.com [10.8.4.110]) by hormel.redhat.com (Postfix) with ESMTP id 3843E61A6EC; Fri, 18 Sep 2009 12:47:06 -0400 (EDT) Received: from int-mx02.intmail.prod.int.phx2.redhat.com (nat-pool.util.phx.redhat.com [10.8.5.200]) by listman.util.phx.redhat.com (8.13.1/8.13.1) with ESMTP id n8IGl3xu003614 for ; Fri, 18 Sep 2009 12:47:03 -0400 Received: from mx1.redhat.com (ext-mx07.extmail.prod.ext.phx2.redhat.com [10.5.110.11]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id n8IGl3gp021205; Fri, 18 Sep 2009 12:47:03 -0400 Received: from tyo202.gate.nec.co.jp (TYO202.gate.nec.co.jp [202.32.8.206]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n8IGkrjJ020371; Fri, 18 Sep 2009 12:46:54 -0400 Received: from mailgate3.nec.co.jp ([10.7.69.160]) by tyo202.gate.nec.co.jp (8.13.8/8.13.4) with ESMTP id n8IGkjGK007262; Sat, 19 Sep 2009 01:46:45 +0900 (JST) Received: (from root@localhost) by mailgate3.nec.co.jp (8.11.7/3.7W-MAILGATE-NEC) id n8IGkj621604; Sat, 19 Sep 2009 01:46:45 +0900 (JST) Received: from mail03.kamome.nec.co.jp (mail03.kamome.nec.co.jp [10.25.43.7]) by mailsv4.nec.co.jp (8.13.8/8.13.4) with ESMTP id n8IGkj44015114; Sat, 19 Sep 2009 01:46:45 +0900 (JST) Received: from genzui.jp.nec.com ([10.26.220.13] [10.26.220.13]) by mail02.kamome.nec.co.jp with ESMTP id BT-MMP-2067686; Sat, 19 Sep 2009 01:26:36 +0900 Received: from [10.66.61.195] ([10.66.61.195] [10.66.61.195]) by mail.jp.nec.com with ESMTP; Sat, 19 Sep 2009 01:26:33 +0900 Message-ID: <4AB3B4B8.10300@ce.jp.nec.com> Date: Sat, 19 Sep 2009 01:26:32 +0900 From: "Jun'ichi Nomura" User-Agent: Thunderbird 2.0.0.19 (Windows/20081209) MIME-Version: 1.0 To: Jens Axboe , Mike Snitzer , "Martin K. Petersen" , Alasdair G Kergon References: <4AB3B43D.9000802@ce.jp.nec.com> In-Reply-To: <4AB3B43D.9000802@ce.jp.nec.com> X-RedHat-Spam-Score: -1.111 (AWL) X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 X-Scanned-By: MIMEDefang 2.67 on 10.5.110.11 X-loop: dm-devel@redhat.com Cc: device-mapper development , linux-kernel@vger.kernel.org Subject: [dm-devel] [PATCH 2/3] dm: Use blk_queue_copy_limits() X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.5 Precedence: junk Reply-To: device-mapper development List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com Use new blk_queue_copy_limits() so that invalid limits (max_sectors == 0) are fixed up appropriately when copied to the queue. Signed-off-by: Kiyoshi Ueda Signed-off-by: Jun'ichi Nomura Reported-by: David Strand Cc: Mike Snitzer Cc: Alasdair G Kergon Cc: Martin K. Petersen Cc: Jens Axboe Acked-by: Mike Snitzer --- drivers/md/dm-table.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- dm-devel mailing list dm-devel@redhat.com https://www.redhat.com/mailman/listinfo/dm-devel Index: linux-2.6.31.work/drivers/md/dm-table.c =================================================================== --- linux-2.6.31.work.orig/drivers/md/dm-table.c +++ linux-2.6.31.work/drivers/md/dm-table.c @@ -1090,7 +1090,7 @@ void dm_table_set_restrictions(struct dm /* * Copy table's limits to the DM device's request_queue */ - q->limits = *limits; + blk_queue_copy_limits(q, limits); if (limits->no_cluster) queue_flag_clear_unlocked(QUEUE_FLAG_CLUSTER, q);