From: Theodore Ts'o <tytso@mit.edu>
To: Lukas Czerner <lczerner@redhat.com>
Cc: linux-ext4@vger.kernel.org, gnehzuil.liu@gmail.com
Subject: Re: [PATCH 2/3] ext4: Update reserved space after the 'correction'
Date: Sun, 10 Mar 2013 22:50:16 -0400 [thread overview]
Message-ID: <20130311025016.GJ10090@thunk.org> (raw)
In-Reply-To: <1362731059-3508-2-git-send-email-lczerner@redhat.com>
On Fri, Mar 08, 2013 at 09:24:18AM +0100, Lukas Czerner wrote:
> Currently in ext4_ext_map_blocks() in delayed allocation writeback
> we would update the reservation and after that check whether we claimed
> cluster outside of the range of the allocation and if so, we'll give the
> block back to the reservation pool.
>
> However this also means that if the number of reserved data block
> dropped to zero before the correction, we would release all the metadata
> reservation as well, however we might still need it because the we're
> not done with the delayed allocation and there might be more blocks to
> come. This will result in error messages such as:
>
> EXT4-fs warning (device sdb): ext4_da_update_reserve_space:361: ino 12,
> allocated 1 with only 0 reserved metadata blocks (releasing 1 blocks
> with reserved 1 data blocks)
>
> This will only happen on bigalloc file system and it can be easily
> reproduced using fiemap-tester from xfstests like this:
>
> ./src/fiemap-tester -m DHDHDHDHD -S -p0 /mnt/test/file
>
> Or using xfstests such as 225.
>
> Fix this by doing the correction first and updating the reservation
> after that so that we do not accidentally decrease
> i_reserved_data_blocks to zero.
>
> Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Thanks, applied.
- Ted
next prev parent reply other threads:[~2013-03-11 2:50 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-08 8:24 [PATCH 1/3] ext4: Reserve metadata if writing into uninitialized Lukas Czerner
2013-03-08 8:24 ` [PATCH 2/3] ext4: Update reserved space after the 'correction' Lukas Czerner
2013-03-11 2:50 ` Theodore Ts'o [this message]
2013-03-08 8:24 ` [PATCH 3/3] ext4: reserve metadata block for every delayed write Lukas Czerner
2013-03-11 2:52 ` Theodore Ts'o
2013-03-11 2:49 ` [PATCH 1/3] ext4: Reserve metadata if writing into uninitialized Theodore Ts'o
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=20130311025016.GJ10090@thunk.org \
--to=tytso@mit.edu \
--cc=gnehzuil.liu@gmail.com \
--cc=lczerner@redhat.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;
as well as URLs for NNTP newsgroup(s).