All of lore.kernel.org
 help / color / mirror / Atom feed
From: bugzilla-daemon@bugzilla.kernel.org
To: linux-ext4@vger.kernel.org
Subject: [Bug 76261] ext4_da_writepages err -30 after remount ro during shutdown
Date: Thu, 15 May 2014 15:11:11 +0000	[thread overview]
Message-ID: <bug-76261-13602-kqZZ2JBay9@https.bugzilla.kernel.org/> (raw)
In-Reply-To: <bug-76261-13602@https.bugzilla.kernel.org/>

https://bugzilla.kernel.org/show_bug.cgi?id=76261

Theodore Tso <tytso@mit.edu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tytso@mit.edu

--- Comment #1 from Theodore Tso <tytso@mit.edu> ---
Does upstream android really handle a shutdown using "echo u >
/proc/sysrq-trigger", or is that something you added locally?   If it's
upstream, I need to have some words with the Google Android team....

sysrq-u is documented to be "Emergency Remount R/O".  It's not something that
is designed to be used under normal circumstances.  So if upstream android is
doing this, it's arguably a bug.

sysrq-u is implemented using do_emergency_remount() in fs/super.c, and it calls
do_remount_sb with force set to 1 (the last argument is "force").

            do_remount_sb(sb, MS_RDONLY, NULL, 1);

The "force" option omits the call to sb_prepare_remount_readonly(), which is
what forces the writeback to happen.  The reason why it is omitted is that
sysrq-u is designed to be used when the system is unstable, and so the
writeback for one of the superblocks might block forever, and this would
prevent the subsequent superblocks from getting remounted read-only.

So people who use sysrq-u are usually advised to do an sysrq-s, which is an
"emergency sync".   (This is avoids doing a data integrity writeback, since
again it's designed for emergencies, when part of the system may be partially
deadlocked, and so the goal is to save what you can, not to try to save
everything.  Perfection, if it causes the sync to stop and never complete, and
hence not sync out some buffers that could be saved, is the enemy of the good
here.)

The real issue here is that sysrq-u and sysrq-u is designed for emergency war
room triage, what Dr. Hawkeye Pierce in M*A*S*H referred to as "meatball
surgery".  It is battlefield surgery, and it is *not* what you would expect in
a hospital surgery room located thousands of miles from a war zone.  So if
android is using this under normal situations, it's an abuse of what these
interfaces are intended to be used for.

-- 
You are receiving this mail because:
You are watching the assignee of the bug.

  reply	other threads:[~2014-05-15 15:11 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-15  5:01 [Bug 76261] New: ext4_da_writepages err -30 after remount ro during shutdown bugzilla-daemon
2014-05-15 15:11 ` bugzilla-daemon [this message]
2014-05-16  1:50 ` [Bug 76261] " bugzilla-daemon
2014-05-16  3:32 ` bugzilla-daemon
2014-05-16  3:36 ` bugzilla-daemon
2014-05-16  3:47 ` bugzilla-daemon
2014-05-16  3:49 ` bugzilla-daemon
2014-05-16  3:52 ` bugzilla-daemon
2014-05-16  4:27 ` bugzilla-daemon
2014-05-16  5:10 ` bugzilla-daemon
2014-05-16 12:11 ` bugzilla-daemon
2014-05-16 13:44 ` bugzilla-daemon
2014-05-19  3:41 ` bugzilla-daemon
2014-05-19 12:46 ` bugzilla-daemon
2014-05-19 13:41 ` bugzilla-daemon
2016-08-03  2:10 ` bugzilla-daemon
2016-08-03  2:34 ` bugzilla-daemon
2016-08-03  2:39 ` bugzilla-daemon
2016-08-03  3:14 ` bugzilla-daemon

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=bug-76261-13602-kqZZ2JBay9@https.bugzilla.kernel.org/ \
    --to=bugzilla-daemon@bugzilla.kernel.org \
    --cc=linux-ext4@vger.kernel.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.