From owner-freebsd-hackers@FreeBSD.ORG Tue Jan 10 10:23:50 2012 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 45A59106566C; Tue, 10 Jan 2012 10:23:50 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 554F98FC18; Tue, 10 Jan 2012 10:23:48 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id MAA01118; Tue, 10 Jan 2012 12:23:47 +0200 (EET) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1RkYrp-0007X0-Sn; Tue, 10 Jan 2012 12:23:45 +0200 Message-ID: <4F0C11B1.1070508@FreeBSD.org> Date: Tue, 10 Jan 2012 12:23:45 +0200 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:9.0) Gecko/20111222 Thunderbird/9.0 MIME-Version: 1.0 To: John Baldwin References: <4EED20C7.1090704@FreeBSD.org> <201112200911.43880.jhb@freebsd.org> In-Reply-To: <201112200911.43880.jhb@freebsd.org> X-Enigmail-Version: undefined Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@FreeBSD.org Subject: Re: RB_NOSYNC -> no device_shutdown ? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jan 2012 10:23:50 -0000 on 20/12/2011 16:11 John Baldwin said the following: > On Saturday, December 17, 2011 6:07:51 pm Andriy Gapon wrote: [snip] >> and wonder why RB_NOSYNC is overloaded to mean that no >> MOD_SHUTDOWN/device_shutdown cleanup should be done? > > Presumably most device_shutdown handlers were used for syncing storage when > the module stuff was first added. I'm not sure how you would fix this now > since you can't easily pass the 'arg2' flags down to each handler so that the > appropriate ones could skip their shutdown actions. I see what you are saying. Couple of thoughts: - maybe MOD_EVENT interface could/should be extended to pass another argument along with the event type - maybe various sync-ing stuff should be done in shutdown_post_sync event handlers, or even via a new dedicated event Hmm, it looks like the latter might actually already be the case. And another tangentially related idea: maybe we should inhibit device/module shutdown for the RB_HALT case given that it is a quite special case where the system actually stays up and at least the keyboard is expected to be still operational. -- Andriy Gapon