All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nikhilesh Reddy <reddyn@codeaurora.org>
To: Theodore Ts'o <tytso@mit.edu>
Cc: linux-ext4@vger.kernel.org
Subject: Re: Emergency remount readonly and EFBIG errors when unlinking files on 3.18 android kernel
Date: Wed, 27 Apr 2016 10:56:35 -0700	[thread overview]
Message-ID: <5720FD53.6010707@codeaurora.org> (raw)
In-Reply-To: <20160427030736.GB30021@thunk.org>

Hi

Thanks for your reply
Yes the sentence below should have the *if* .. sorry about the typo
The issue doesnt happen if all the writer processes/threads are killed 
before the
emergency remount

>
> Note that an emergency remount is very much an emergency.  So we don't
> do a graceful shutdown of any pending writes.  (Normally we would
> return EBUSY if there anything that would prevent a clean remount.)
> In the emergency remount path, we bypass all of these checks.
>
>> And on disk we see that one of the files being written to has incorrect
>> ext4_inode->i_blocks_lo ( which is less than the the size of the file by
>> something like 2k)
>>
>> When unlinking this file the vfs inode->iblocks underflows and we end up
>> with EFBIG if EXT4_FEATURE_RO_COMPAT_HUGE_FILE is not enabled in the
>> superblock.
>>
>> Is this a known issue?
>
> No, this isn't a known issue.  I've never seen anything like this, but
> all of the tests we do assume a forced poweroff, which we simulate
> using dm-flakey.  We do *not* test the blunt-force-trauma which is
> inflected on the file system structures which results from doing an
> emergency remount.
>
> Off by 2k really doesn't make sense.  I could see if it was off by 4k,
> but 2k is really wierd.

Just to clarify when i say off by 2k .. i meant the i_blocks count not 
the actual size file ( which would be 2k * 512 if i am not wrong)

For example we see fsck report
Pass 1: Checking inodes, blocks, and sizes
Inode XXX, i_blocks is 854024, should be 856072.

>
>> I would appreciate if you could point me in the right direction and any help
>> you can give me.
>
> Well, what I'd do is create a new ioctl interface which simulates an
> emergency ro on just the one device, and try to create a reliable
> repro.  Eventually we'll want to add some tests for this in xfstests.
>

Thanks so much for your suggestion.
I will try to see if i can reliably reproduce the issue after 
implementing the ioctl as you suggested.
I have some issues getting the xfs tests to run on the device which i 
have been meaning to work on .. maybe this is the time to do so.


-- 
Thanks
Nikhilesh Reddy

Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project.

  parent reply	other threads:[~2016-04-27 17:56 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-26 22:08 Emergency remount readonly and EFBIG errors when unlinking files on 3.18 android kernel Nikhilesh Reddy
2016-04-27  3:07 ` Theodore Ts'o
2016-04-27  3:25   ` Dave Chinner
2016-04-27 17:56   ` Nikhilesh Reddy [this message]
  -- strict thread matches above, loose matches on Subject: below --
2016-05-02  0:59 Daeho Jeong

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=5720FD53.6010707@codeaurora.org \
    --to=reddyn@codeaurora.org \
    --cc=linux-ext4@vger.kernel.org \
    --cc=tytso@mit.edu \
    /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.