Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965788AbXHGVUX (ORCPT ); Tue, 7 Aug 2007 17:20:23 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S935747AbXHGUzz (ORCPT ); Tue, 7 Aug 2007 16:55:55 -0400 Received: from pentafluge.infradead.org ([213.146.154.40]:59783 "EHLO pentafluge.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964929AbXHGUzr (ORCPT ); Tue, 7 Aug 2007 16:55:47 -0400 Date: Tue, 7 Aug 2007 13:48:12 -0700 From: Greg KH To: linux-kernel@vger.kernel.org, stable@kernel.org, torvalds@linux-foundation.org Cc: Justin Forbes , Zwane Mwaikambo , "Theodore Ts'o" , Randy Dunlap , Dave Jones , Chuck Wolber , Chris Wedgwood , Michael Krufky , Chuck Ebbert , Domenico Andreoli , akpm@linux-foundation.org, alan@lxorguk.ukuu.org.uk, jdike@linux.intel.com, blaisorblade@yahoo.it, jdike@addtoit.com Subject: [2.6.22.2 review 62/84] uml: limit request size on COWed devices Message-ID: <20070807204812.GL23028@kroah.com> References: <20070807204034.882009319@mini.kroah.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline; filename="uml-limit-request-size-on-cowed-devices.patch" In-Reply-To: <20070807204157.GA23028@kroah.com> User-Agent: Mutt/1.5.15 (2007-04-06) X-Bad-Reply: References and In-Reply-To but no 'Re:' in Subject. Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1272 Lines: 36 From: Jeff Dike COWed devices can't handle more than 32 (64 on x86_64) sectors in one request due to the size of the bitmap being carried around in the io_thread_req. Enforce that by telling the block layer not to put too many sectors in requests to COWed devices. Signed-off-by: Jeff Dike Cc: Paolo 'Blaisorblade' Giarrusso Signed-off-by: Andrew Morton Signed-off-by: Greg Kroah-Hartman --- arch/um/drivers/ubd_kern.c | 2 ++ 1 file changed, 2 insertions(+) --- a/arch/um/drivers/ubd_kern.c +++ b/arch/um/drivers/ubd_kern.c @@ -712,6 +712,8 @@ static int ubd_add(int n, char **error_o ubd_dev->queue->queuedata = ubd_dev; blk_queue_max_hw_segments(ubd_dev->queue, MAX_SG); + if(ubd_dev->cow.file != NULL) + blk_queue_max_sectors(ubd_dev->queue, 8 * sizeof(long)); err = ubd_disk_register(MAJOR_NR, ubd_dev->size, n, &ubd_gendisk[n]); if(err){ *error_out = "Failed to register device"; -- - 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/