All of lore.kernel.org
 help / color / mirror / Atom feed
From: Baoquan <bhe-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: Dave Young <dyoung-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 1/3] Add an exception handle check function
Date: Thu, 24 Jan 2013 11:12:46 +0800	[thread overview]
Message-ID: <5100A6AE.5020003@redhat.com> (raw)
In-Reply-To: <50F7CC85.5060303-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>

On 01/17/2013 06:03 PM, Dave Young wrote:
>> In some cases, exception happened, default handling is called. However,
>> >  user may not like the handling, want to specify a handler for these
>> >  exceptions.
>> >  
>> >  Add an exception handle check function. Call it where exceptions happened,
>> >  and specify a extra special handler. If user want the special handler handles
>> >  this exception, related cmdline is added.
>> >  
>> >  Then Dracut will check the cmdline, if related cmdline exists, call the
>> >  specified handler; if not, call the default handler.
>> >  
>> >  The function can be called like below:
>> >  exception_handle_check -h continue_on_fail
> I think exception_handle is not a good name, how about use "failaction"
> instead?
>
> And maybe use below action names:
> failaction=continue/shell
>
> IMHO, reboot is not useful for usual initrd. For kdump add a "continue"
> is enough because kdump module will handle failure of itself as long as
> dracut ignore previous failures.
>
> These 3 patches should better to be one patch. Or split them to 2
> patches as below
> 1/2: make emergency_shell as a fail action
> 2/2: add a new fail action of "continue"
>
I hesitated to name this function, maybe failaction is a good name.

I thought at least there were 3 options, 'continue_on_fail', 
'emergency_shell'  and 'reboot'. After thinking, maybe 'reboot' is not 
necessary. After all rebooting system may not be wanted by user after a 
fail occurred,.

If only 'continue_on_fail' and 'emergency_shell', things will be easier. 
The only question is all insert point of the failaction will take the 
same action. e.g mount loop for rootfs, inirqueue loop and dump target 
mount loop, if user add the  cmdline:
failaction=continue_on_fail
Then all insert point will do the continue on fail.

Anyway, I will repost based on two options 'continue_on_fail' and 
'emergency_shell'.

Baoquan
Thanks a lot!



      parent reply	other threads:[~2013-01-24  3:12 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-21  8:55 [PATCH 1/3] Add an exception handle check function Baoquan He
     [not found] ` <76d7b2f339455dcea6a2827b004bfcd9c6fa2315.1356080083.git.bhe-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2012-12-21  8:55   ` [PATCH 2/3] Specify a special handler when initqueue timeout Baoquan He
2012-12-21  8:55   ` [PATCH 3/3] Add a special handler when mount rootfs failed Baoquan He
     [not found]     ` <d98a268350d0f13f6dd4d464a1a21517668eeb57.1356080083.git.bhe-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2012-12-31  8:12       ` Baoquan
2012-12-21  9:30   ` [PATCH 1/3] Add an exception handle check function Baoquan
2013-01-15  7:22   ` Baoquan
2013-01-17 10:03   ` Dave Young
     [not found]     ` <50F7CC85.5060303-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-01-18  2:06       ` Dave Young
2013-01-24  3:12       ` Baoquan [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5100A6AE.5020003@redhat.com \
    --to=bhe-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
    --cc=dyoung-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.