From: "Theodore Ts'o" <tytso@mit.edu>
To: Gao Xiang <hsiangkao@linux.alibaba.com>
Cc: "Rantala,
Tommi T. (Nokia - FI/Espoo)" <tommi.t.rantala@nokia.com>,
"jefflexu@linux.alibaba.com" <jefflexu@linux.alibaba.com>,
"enwlinux@gmail.com" <enwlinux@gmail.com>,
"linux-ext4@vger.kernel.org" <linux-ext4@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: Inode 2885482 (000000008e814f64): i_reserved_data_blocks (2) not cleared!
Date: Thu, 14 Oct 2021 17:57:32 -0400 [thread overview]
Message-ID: <YWinzKvlbx0XlJKJ@mit.edu> (raw)
In-Reply-To: <YWhxvOf5EoHMFxtl@B-P7TQMD6M-0146.local>
On Fri, Oct 15, 2021 at 02:06:52AM +0800, Gao Xiang wrote:
> On Thu, Oct 14, 2021 at 12:54:14PM +0000, Rantala, Tommi T. (Nokia - FI/Espoo) wrote:
> > Hi,
> >
> > I'm seeing these i_reserved_data_blocks not cleared! messages when using ext4
> > with nodelalloc, message added in:
> >
> > commit 6fed83957f21eff11c8496e9f24253b03d2bc1dc
> > Author: Jeffle Xu <jefflexu@linux.alibaba.com>
> > Date: Mon Aug 23 14:13:58 2021 +0800
> >
> > ext4: fix reserved space counter leakage
> >
> > I can quickly reproduce in 5.15.0-rc5-00041-g348949d9a444 by doing some
> > filesystem I/O while toggling delalloc:
> >
> >
> > while true; do mount -o remount,nodelalloc /; sleep 1; mount -o remount,delalloc /; sleep 1; done &
> > git clone linux xxx; rm -rf xxx
>
> If I understand correctly, switching such option implies
> sync inodes to write back exist delayed allocation blocks.
Well, no. What it implies is that all writes after the remount into
an unallocated portion of the file will be allocated at the time when
the page is dirtied, instead of when the page is written back. It's
possible for some pages to be written using delayed allocation, and
some other pages in the legacy "allocate on page dirty" mechanism.
This can happen when the file system is remounted; it can also happen
when the file system starts getting close to 100% full. See the
comment in ext4_nonda_switch:
/*
* switch to non delalloc mode if we are running low
* on free block. The free block accounting via percpu
* counters can get slightly wrong with percpu_counter_batch getting
* accumulated on each CPU without updating global counters
* Delalloc need an accurate free block accounting. So switch
* to non delalloc when we are near to error range.
*/
Cheers,
- Ted
next prev parent reply other threads:[~2021-10-14 21:57 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-14 12:54 Inode 2885482 (000000008e814f64): i_reserved_data_blocks (2) not cleared! Rantala, Tommi T. (Nokia - FI/Espoo)
2021-10-14 18:06 ` Gao Xiang
2021-10-14 21:57 ` Theodore Ts'o [this message]
2021-10-15 2:49 ` Gao Xiang
2021-10-18 3:54 ` JeffleXu
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=YWinzKvlbx0XlJKJ@mit.edu \
--to=tytso@mit.edu \
--cc=enwlinux@gmail.com \
--cc=hsiangkao@linux.alibaba.com \
--cc=jefflexu@linux.alibaba.com \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tommi.t.rantala@nokia.com \
/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