Re: [PATCH] ext4/053: check that remount with abort makes fs read-only

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



Hi Andrey,

sorry I haven't notice it earlier. Feel free to cc me next time.

On Thu, Mar 10, 2022 at 12:18:11PM +0100, Andrey Albershteyn wrote:
> The 6e47a3cc68fc ("ext4: get rid of super block and sbi from
> handle_mount_ops()") broke abort mount option. That problem was not
> detected by ext4/053.
> 
> This addition test checks that during aborted remount, filesystem
> switches into read-only state (enabled by ext4_handle_error()
> causing mount to fail).
> 
> Signed-off-by: Andrey Albershteyn <aalbersh@xxxxxxxxxx>
> ---
>  tests/ext4/053 | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/tests/ext4/053 b/tests/ext4/053
> index e1e79592..38f162a9 100755
> --- a/tests/ext4/053
> +++ b/tests/ext4/053
> @@ -360,6 +360,10 @@ not_remount() {
>  	$UMOUNT_PROG $SCRATCH_MNT 2> /dev/null
>  }
>  
> +mnt_not_remount() {
> +	do_mnt
> +	not_remount -r $@

So you're only checking whether the remount failed with abort, but there
are more reasons for it to fail. Maybe we should also check the file
system is actually read only?

-Lukas

> +}
>  
>  do_mkfs() {
>  	$MKE2FS_PROG -T $fstype -Fq $* >> $seqres.full 2>&1 ||
> @@ -450,6 +454,7 @@ for fstype in ext2 ext3 ext4; do
>  	only_ext4 mnt nojournal_checksum
>  	only_ext4 mnt journal_async_commit,data=writeback
>  	mnt abort ignored
> +	mnt_not_remount abort ignored
>  	not_ext2 mnt -t data=journal
>  	not_ext2 mnt -t data=ordered
>  	not_ext2 mnt -t data=writeback
> -- 
> 2.27.0
> 




[Index of Archives]     [Linux Filesystems Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux