linux-ext4.vger.kernel.org archive mirror
 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: Mon, 19 May 2014 12:46:35 +0000	[thread overview]
Message-ID: <bug-76261-13602-fehDkLjo1O@https.bugzilla.kernel.org/> (raw)
In-Reply-To: <bug-76261-13602@https.bugzilla.kernel.org/>

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

--- Comment #13 from Theodore Tso <tytso@mit.edu> ---
Well, let's gather some data.  In android_reboot.c can you add the following:

static void get_debug_mem(void)
{
    int fd, cnt = 0;
    fd = open("/proc/sysrq-trigger", O_WRONLY);
    if (fd < 0) {
        return;
    }
    write(fd, "m", 1);
    close(fd);
}

And then in android reboot.c, make the beginning of the function read as
follows:

{
    get_debug_info();
    sync;
    get_debug_info();
    sync;
    get_debug_info();
    sync;
    get_debug_info();
    remount_ro();
    ...

And then send the output in the kmesg?

That should give us information about what might be going on.  It's
possible that get_nr_dirty_pages() or some other part of the machinery
used by fs/fs-writeback.c's writeback_inodes_sb() is somehow
incorrectly not syncing all of the dirty pages.

The other possibility is that the sync() system call is supposed to
send out to disk at least as many dirty pages as were present at the
time of the sync() system call was issued, but it is ***not*** a data
integrity operation.  Looking at the high level code, the main concern
of that codepath is to make sure that sync() would eventually return,
and not loop forever, even if some other user process was constantly
dirtying pages.  It simply wasn't intended for the use case that
Android is trying to use it for.

>From my reading of the VFS writeback code, it's possible that if there
were pages getting dirtied at the time of the sync() system call, that
some of the pages that were dirtied after sync() system call was
issued would be sent out to disk, but some of the older pages that
were dirtied before sync() system call might not make it out to disk.

Is it possible for you to enable ftrace on your kernel?  It might be
useful to see if in fact there is any attempts to be writing to one or
more file systems at the time when android_reboot() gets called, and
the kernel tracing facilities might help you accomplish that.

                                               - Ted

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

  parent reply	other threads:[~2014-05-19 12:46 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 ` [Bug 76261] " bugzilla-daemon
2014-05-16  1:50 ` 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 [this message]
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-fehDkLjo1O@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).