From: Sean Greenslade <sean@seangreenslade.com>
To: Bagas Sanjaya <bagasdotme@gmail.com>
Cc: linux-ext4@vger.kernel.org, Ye Bin <yebin10@huawei.com>,
Theodore Ts'o <tytso@mit.edu>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Linux Regressions <regressions@lists.linux.dev>
Subject: Re: RO mount of ext4 filesystem causes writes
Date: Mon, 12 Jun 2023 21:48:30 -0700 [thread overview]
Message-ID: <ZIf1HpUjmQWu0xXo@glitch> (raw)
In-Reply-To: <ZIa5P1HqE62rmzqu@debian.me>
On Mon, Jun 12, 2023 at 01:20:47PM +0700, Bagas Sanjaya wrote:
> On Sun, Jun 11, 2023 at 10:32:53PM -0700, Sean Greenslade wrote:
> > Hello, folks.
> >
> > I noticed a change in behavior of ext4 in recent kernels. I make use of
> > several luks loopback images formatted as ext4 that I mount read-only
> > most of the time. I use rsync to synchronize the backing images between
> > machines. In the past, mouning the images as read-only would not touch
> > the backing image contents at all, but recently this changed. Every
> > mount, even ones that are RO from the start, will cause some small
> > writes to the backing image and thus force rsync to scan the whole file.
> >
> > I confirmed that the issue is still present on v6.4.rc6, so I performed
> > a bisect and landed on the following commit:
> >
> > > eee00237fa5ec8f704f7323b54e48cc34e2d9168 is the first bad commit
> > > commit eee00237fa5ec8f704f7323b54e48cc34e2d9168
> > > Author: Ye Bin <yebin10@huawei.com>
> > > Date: Tue Mar 7 14:17:02 2023 +0800
> > >
> > > ext4: commit super block if fs record error when journal record without error
> >
> > That certainly looks like a likely cause of my issue, but I'm not
> > familiar enough with the ext4 code to diagnose any further. Please let
> > me know if you need any additional information, or if you would like me
> > to test anything.
> >
>
> Can you show dmesg when regression happens?
>
> Ye: It looks like this regression is caused by your commit. Would you like
> to take a look on it?
>
> Anyway, thanks for the bug report. I'm adding it to regzbot:
>
> #regzbot ^introduced: eee00237fa5ec8
> #regzbot title: commit super block writes even in read-only filesystems
I did a fresh boot on the 6.4 rc6 kernel and did an RO mount and
unmount. Here's the full dmesg output from that:
[ 48.955896] loop0: detected capacity change from 0 to 4194304
[ 48.965526] Key type trusted registered
[ 48.973640] Key type encrypted registered
[ 49.032404] EXT4-fs (dm-0): mounted filesystem 4e824972-4523-407e-b0da-3229a71b68d8 ro with ordered data mode. Quota mode: none.
[ 61.180755] EXT4-fs (dm-0): unmounting filesystem 4e824972-4523-407e-b0da-3229a71b68d8.
[ 61.236958] dm-0: detected capacity change from 4190208 to 0
Thanks,
--Sean
next prev parent reply other threads:[~2023-06-13 4:48 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-12 5:32 RO mount of ext4 filesystem causes writes Sean Greenslade
2023-06-12 6:20 ` Bagas Sanjaya
2023-06-13 4:48 ` Sean Greenslade [this message]
2023-06-23 1:06 ` Bagas Sanjaya
2023-06-23 4:46 ` Theodore Ts'o
2023-06-23 6:18 ` Sean Greenslade
2023-06-23 14:34 ` Theodore Ts'o
2023-06-23 15:38 ` Ritesh Harjani
2023-06-24 19:39 ` Theodore Ts'o
2023-06-23 16:53 ` Sean Greenslade
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=ZIf1HpUjmQWu0xXo@glitch \
--to=sean@seangreenslade.com \
--cc=bagasdotme@gmail.com \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=regressions@lists.linux.dev \
--cc=tytso@mit.edu \
--cc=yebin10@huawei.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