From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from sc8-sf-mx1-b.sourceforge.net ([10.3.1.11] helo=sc8-sf-mx1.sourceforge.net) by sc8-sf-list1.sourceforge.net with esmtp (Exim 4.30) id 1DQ0hE-0008CW-6N for user-mode-linux-devel@lists.sourceforge.net; Mon, 25 Apr 2005 03:20:08 -0700 Received: from ns.virtualhost.dk ([195.184.98.160] helo=virtualhost.dk) by sc8-sf-mx1.sourceforge.net with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.41) id 1DQ0hB-00028g-V2 for user-mode-linux-devel@lists.sourceforge.net; Mon, 25 Apr 2005 03:20:07 -0700 From: Jens Axboe Message-ID: <20050425101625.GD1671@suse.de> References: <20050424181924.EAFCB55D06@zion> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050424181924.EAFCB55D06@zion> Subject: [uml-devel] Re: [patch 7/7] uml ubd: handle readonly status Sender: user-mode-linux-devel-admin@lists.sourceforge.net Errors-To: user-mode-linux-devel-admin@lists.sourceforge.net List-Unsubscribe: , List-Id: The user-mode Linux development list List-Post: List-Help: List-Subscribe: , List-Archive: Date: Mon, 25 Apr 2005 12:16:26 +0200 To: blaisorblade@yahoo.it Cc: akpm@osdl.org, jdike@addtoit.com, bstroesser@fujitsu-siemens.com, linux-kernel@vger.kernel.org, user-mode-linux-devel@lists.sourceforge.net On Sun, Apr 24 2005, blaisorblade@yahoo.it wrote: > @@ -1099,6 +1104,7 @@ static int prepare_request(struct reques > if((rq_data_dir(req) == WRITE) && !dev->openflags.w){ > printk("Write attempted on readonly ubd device %s\n", > disk->disk_name); > + WARN_ON(1); /* This should be impossible now */ > end_request(req, 0); > return(1); > } I don't think that's a sound change. The WARN_ON() is strictly only really useful for when you need the stack trace for something interesting. As the io happens async, you will get a boring trace that doesn't contain any valuable information. -- Jens Axboe ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ User-mode-linux-devel mailing list User-mode-linux-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S262573AbVDYKUG (ORCPT ); Mon, 25 Apr 2005 06:20:06 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S262574AbVDYKUG (ORCPT ); Mon, 25 Apr 2005 06:20:06 -0400 Received: from ns.virtualhost.dk ([195.184.98.160]:24811 "EHLO virtualhost.dk") by vger.kernel.org with ESMTP id S262573AbVDYKUC (ORCPT ); Mon, 25 Apr 2005 06:20:02 -0400 Date: Mon, 25 Apr 2005 12:16:26 +0200 From: Jens Axboe To: blaisorblade@yahoo.it Cc: akpm@osdl.org, jdike@addtoit.com, bstroesser@fujitsu-siemens.com, linux-kernel@vger.kernel.org, user-mode-linux-devel@lists.sourceforge.net Subject: Re: [patch 7/7] uml ubd: handle readonly status Message-ID: <20050425101625.GD1671@suse.de> References: <20050424181924.EAFCB55D06@zion> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050424181924.EAFCB55D06@zion> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Apr 24 2005, blaisorblade@yahoo.it wrote: > @@ -1099,6 +1104,7 @@ static int prepare_request(struct reques > if((rq_data_dir(req) == WRITE) && !dev->openflags.w){ > printk("Write attempted on readonly ubd device %s\n", > disk->disk_name); > + WARN_ON(1); /* This should be impossible now */ > end_request(req, 0); > return(1); > } I don't think that's a sound change. The WARN_ON() is strictly only really useful for when you need the stack trace for something interesting. As the io happens async, you will get a boring trace that doesn't contain any valuable information. -- Jens Axboe