Re: [PATCH 0/11] ext4: Cleanup read-only and fs aborted checks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Aug 3, 2023 at 6:23 PM Theodore Ts'o <tytso@xxxxxxx> wrote:
>
>
> On Fri, 16 Jun 2023 18:50:46 +0200, Jan Kara wrote:
> > This series arised from me trying to fix races when the ext4 filesystem gets
> > remounted read-write and users can race in writes before quota subsystem is
> > prepared to take them. This particular problem got fixed in VFS in the end
> > but the cleanups are still good in my opinion so I'm submitting them. They
> > get rid of EXT4_MF_ABORTED flag and cleanup some sb_rdonly() checks.
> >
> > Honza
> >
> > [...]
>
> Applied, thanks!
>
> [01/11] ext4: Remove pointless sb_rdonly() checks from freezing code
>         commit: 98175720c9ed3bac857b0364321517cc2d695a3f
> [02/11] ext4: Use sb_rdonly() helper for checking read-only flag
>         commit: d5d020b3294b69eaf3b8985e7a37ba237849c390
> [03/11] ext4: Make ext4_forced_shutdown() take struct super_block
>         commit: eb8ab4443aec5ffe923a471b337568a8158cd32b
> [04/11] ext4: Make 'abort' mount option handling standard
>         commit: 22b8d707b07e6e06f50fe1d9ca8756e1f894eb0d
> [05/11] ext4: Drop EXT4_MF_FS_ABORTED flag
>         commit: 95257987a6387f02970eda707e55a06cce734e18
> [06/11] ext4: Avoid starting transaction on read-only fs in ext4_quota_off()
>         commit: e0e985f3f8941438a66ab8abb94cb011b9fb39a7
> [07/11] ext4: Warn on read-only filesystem in ext4_journal_check_start()
>         commit: e7fc2b31e04c46c9e2098bba710c9951c6b968af
> [08/11] ext4: Drop read-only check in ext4_init_inode_table()
>         commit: ffb6844e28ef6b9d76bee378774d7afbc3db6da9
> [09/11] ext4: Drop read-only check in ext4_write_inode()
>         commit: f1128084b40e520bea8bb32b3ff4d03745ab7e64
> [10/11] ext4: Drop read-only check from ext4_force_commit()
>         commit: 889860e452d7436ca72018b8a03cbd89c38d6384
> [11/11] ext4: Replace read-only check for shutdown check in mmp code
>         commit: 1e1566b9c85fbd6150657ea17f50fd42b9166d31
>
> Best regards,
> --
> Theodore Ts'o <tytso@xxxxxxx>

Hi Jan,

Yesterday I ran fanotify LTP tests on linux-next and noticed a regression
with fanotify22 which tests the FAN_FS_ERROR event on ext4.
It's 100% reproducible on my machine (see below).

I've bisected the regression down to this series.
Not sure if this is an acute regression or just the test needs to be adjusted.

Thanks,
Amir.

# ./fanotify/fanotify22
tst_device.c:96: TINFO: Found free device 0 '/dev/loop0'
[   29.672163] loop0: detected capacity change from 0 to 614400
tst_test.c:1093: TINFO: Formatting /dev/loop0 with ext4 opts='' extra opts=''
mke2fs 1.46.5 (30-Dec-2021)
[   30.169795] operation not supported error, dev loop0, sector 614272
op 0x9:(WRITE_ZEROES) flags 0x8000800 phys_seg 0 prio class 2
[   30.172411] operation not supported error, dev loop0, sector 586 op
0x9:(WRITE_ZEROES) flags 0x8000800 phys_seg 0 prio class 2
[   30.176215] operation not supported error, dev loop0, sector 15792
op 0x9:(WRITE_ZEROES) flags 0x8000800 phys_seg 0 prio class 2
[   30.189827] operation not supported error, dev loop0, sector 278530
op 0x9:(WRITE_ZEROES) flags 0x8000800 phys_seg 0 prio class 2
[   30.247427] EXT4-fs (loop0): mounted filesystem
a2b5d123-2a7a-44cc-96d4-47119b66a9a9 r/w with ordered data mode. Quota
mode: none.
tst_test.c:1558: TINFO: Timeout per run is 0h 00m 30s
fanotify.h:129: TINFO: fid(test_mnt/internal_dir/bad_dir) =
32966134.65ed1cb1.7e82.a4cd38.0...
[   30.275088] EXT4-fs (loop0): unmounting filesystem
a2b5d123-2a7a-44cc-96d4-47119b66a9a9.
debugfs 1.46.5 (30-Dec-2021)
[   30.339363] EXT4-fs (loop0): mounted filesystem
a2b5d123-2a7a-44cc-96d4-47119b66a9a9 r/w with ordered data mode. Quota
mode: none.
fanotify.h:129: TINFO: fid(test_mnt) = 32966134.65ed1cb1.2.0.0...
[   30.346145] EXT4-fs error (device loop0): __ext4_remount:6465: comm
fanotify22: Abort forced by user
[   30.348788] Aborting journal on device loop0-8.
[   30.350608] EXT4-fs (loop0): Remounting filesystem read-only
[   30.352403] EXT4-fs (loop0): re-mounted
a2b5d123-2a7a-44cc-96d4-47119b66a9a9 ro. Quota mode: none.
fanotify22.c:232: TPASS: Successfully received: Trigger abort
Test timeouted, sending SIGKILL!
tst_test.c:1612: TINFO: If you are running on slow machine, try
exporting LTP_TIMEOUT_MUL > 1
tst_test.c:1614: TBROK: Test killed! (timeout?)




[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux