From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1161906AbcE3Tzq (ORCPT ); Mon, 30 May 2016 15:55:46 -0400 Received: from magic.merlins.org ([209.81.13.136]:37913 "EHLO mail1.merlins.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1161635AbcE3Tzp (ORCPT ); Mon, 30 May 2016 15:55:45 -0400 X-Greylist: delayed 1075 seconds by postgrey-1.27 at vger.kernel.org; Mon, 30 May 2016 15:55:45 EDT Date: Mon, 30 May 2016 12:37:42 -0700 From: Marc MERLIN To: Eric Wheeler Cc: linux-kernel@vger.kernel.org Message-ID: <20160530193742.GA15011@merlins.org> References: <20160311051313.GF26973@merlins.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160311051313.GF26973@merlins.org> X-Sysadmin: BOFH X-URL: http://marc.merlins.org/ User-Agent: Mutt/1.5.24 (2015-08-30) X-SA-Exim-Connect-IP: 173.11.111.145 X-SA-Exim-Mail-From: marc@merlins.org X-Spam-Report: * -1.4 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * -1.5 GREYLIST_ISWHITE The incoming server has been whitelisted for this * receipient and sender Subject: Re: [PATCH-RFC]: sysrq-a: graceful reboot via kernel_restart(), similar to sysrq-o Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 10, 2016 at 09:13:13PM -0800, Marc MERLIN wrote: > On Fri, Mar 11, 2016 at 04:35:21AM +0000, Eric Wheeler wrote: > > Hello all, > > > > We were having a discussion on the bcache list about the safest reboot > > options via sysrq here: > > http://thread.gmane.org/gmane.linux.kernel.bcache.devel/3559/focus=3586 > > > > The result of the discussion ended up in a patch for sysrq-a to call > > kernel_restart much in the same way as sysrq-ocalls kernel_power_off. > > > > Please comment on the patch and suggest any appropriate changes. > > Thanks Eric. > > The quick rationale is that sysrq-r is not desirable to use if you're using > bcache, or software raid since it will reboot without giving them a > chance to properly sync their buffers and get into a clean state. > > I've been using sysrq-o to get a clean shutdown, but of course that > actually powers off the server, and you then need to rely on something > like WOL to bring the machine back up, which isn't always easy or > possible. > > This new reboot with proper flushing (kernel_power_off) allows for safe > reboots that don't upset bcache or software raid. Just updated to 4.6 and re-applied Eric sysrq patch. It's saved me many times already. I absolutely need to do clean reboots for both my software raid and bcache, and when the system is not doing well, sysrq-o does the graceful shutdown, but also powers off my server, which is not what I want. I've been using the new sysrq-x Eric wrote and it's been working great. Any chance, we can get this into standard kernels? I can't be the only person who benefits from this... Any suggestion on who might be a good person to review/critique/integrate this patch? Thanks, Marc -- "A mouse is a device used to point at the xterm you want to type in" - A.S.R. Microsoft is to operating systems .... .... what McDonalds is to gourmet cooking Home page: http://marc.merlins.org/ | PGP 1024R/763BE901