public inbox for linux-ext4@vger.kernel.org
 help / color / mirror / Atom feed
From: "Theodore Ts'o" <tytso@mit.edu>
To: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
Cc: linux-ext4@vger.kernel.org
Subject: Problem with delayed allocation
Date: Sat, 02 Aug 2008 16:07:19 -0400	[thread overview]
Message-ID: <E1KPNNn-0003IN-0B@closure.thunk.org> (raw)


Apparently __fsync_super(), which is called right before remounting a
filesystem read-only, isn't working correctly.  To reproduce, create a
script which does this:

#!/bin/sh
DEVICE=/dev/closure/test
mke2fs -t ext4dev /dev/closure/test
mount $DEVICE /mnt
cd /mnt
tar xfj /var/tmp/linux-2.6.26.tar.gz  <----- or some really big file
du -s
cd ..
mount -o remount,ro /mnt
sync
dmesg > /tmp/dmesg.out  <----- note all of the ext4_da_writepages error messages
umount /mnt
du -s /mnt
sync
mount $DEVICE /mnt
du -s /mnt    <---  note that size of the unpacked hierarcy is much smaller

This doesn't happen if the ext4 filesystem is mounted with nodelalloc,
so I assume the problem is in ext4_da_writepages().

Aneesh, can you look at this?  I've tried going through the code paths
starting with __fsync_super(), going down through __sync_single_inode(),
and I can't see anything obvious.

I've checked and we've had this problem for a while.  I don't think this
is a recent regression.  The "sync" command does seem to force file data
out, but it looks like we're not properly waiting for writes to complete
before __fsync_super() returns.  There is a call filemap_fdatawait() in
__sync_single_inode(), but it's apparently not doing the right thing.
Aneesh, can you try to find whatever it is that I missed?  Thanks!!

						- Ted

             reply	other threads:[~2008-08-02 20:07 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-02 20:07 Theodore Ts'o [this message]
2008-08-02 22:40 ` Problem with delayed allocation Theodore Tso
2008-08-04  3:16 ` Aneesh Kumar K.V
2008-08-04 14:08   ` Theodore Tso
2008-08-04 14:52 ` Aneesh Kumar K.V
2008-08-04 15:27   ` Aneesh Kumar K.V
2008-08-04 15:33     ` Aneesh Kumar K.V
2008-08-04 16:35 ` Aneesh Kumar K.V
2008-08-05  6:44   ` Theodore Tso
2008-08-05  6:52     ` Aneesh Kumar K.V
2008-08-05 13:21       ` Aneesh Kumar K.V
2008-08-05 13:47         ` Theodore Tso
2008-08-05 14:24           ` Aneesh Kumar K.V
2008-08-05 15:16             ` Theodore Tso
2008-08-06 10:05         ` Aneesh Kumar K.V
2008-08-06 10:11           ` Aneesh Kumar K.V
2008-08-07  0:49             ` Mingming Cao

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=E1KPNNn-0003IN-0B@closure.thunk.org \
    --to=tytso@mit.edu \
    --cc=aneesh.kumar@linux.vnet.ibm.com \
    --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