From nobody Fri Apr 7 17:31:41 2023 X-Original-To: fs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PtQQj4kkDz43gtB for ; Fri, 7 Apr 2023 17:31:41 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PtQQj3393z3rWh for ; Fri, 7 Apr 2023 17:31:41 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1680888701; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=DLZ/zH77Uo2ShtxgK/Dl7bOkWMr0E218C/WNjBOhQmw=; b=PGoDv3r6VVizcpzBEI3ooeayJwX088UfbuE3QN4oXfXt9iLyZhz7H1tZgRQKYLCzVHIokR RYJmWcpvxRVB84Q+kPq2de9+VcxqsT90CkRbUpjecB76LJngfKz4XyEWjFxN/swNqW4iwF EbWaftAdPUQOMLu4T6f+Dk+FV5AQQ/CxD6Q2HZCF0Vi8AjV/n6ejv/SkifGXzyHHgPm2mZ q65ZfGQV1B6e4BCFnjRT4qK/aKAMyqfPD5uh3xFFt62l5TzRZih7YiIqQ0aYhmy9iaRvZP blmaqh6FSB75ToSUEQSTt7Yl9R+KiThFc3VNWgvNTpB9dPEszA7G3EIiLdOxmQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1680888701; a=rsa-sha256; cv=none; b=K4Q7AE6TQIft9bBX794Iy+YaNTT/0GqJ+bVQ6eNTKEKfy2nWszbWQs5MKvgI7X9Nlbjilu 7aQPut26euaD2IXfsIjtiwVwHVVM9uqjB3CwTVxsHo6jbOzSkmpieUdjFRcksL1jjNHnPH hazsbdn5FXeY032h1Dj39zToH8KcVR1pI86mxEmax00cfxPCcQ6swrjG9asbmijJ5lsn2b 7f88XgNxxXiwvAZlU02E305iymKQ9FALvIuJIwue6j7eaUuw72eogMByb85V2PDlh+/R63 t7df1zzR9jzAnJOhp95OB71QketLtriY6YCggt8GVdYMkV0TuCpNj8t2GkT13w== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PtQQj21l5ztYQ for ; Fri, 7 Apr 2023 17:31:41 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 337HVfdc030368 for ; Fri, 7 Apr 2023 17:31:41 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 337HVfKo030367 for fs@FreeBSD.org; Fri, 7 Apr 2023 17:31:41 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: fs@FreeBSD.org Subject: [Bug 270632] [ext2fs] files <4096 bytes are corrupted on ext4 filesystems Date: Fri, 07 Apr 2023 17:31:41 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 13.2-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: fsu@FreeBSD.org X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: fs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Filesystems List-Archive: https://lists.freebsd.org/archives/freebsd-fs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-fs@freebsd.org MIME-Version: 1.0 X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D270632 --- Comment #2 from Fedor Uporov --- Hi, Rajeev. Thanks a lot for bug report and detailed reproducer. The problem is, that I did not managed to reproduce the issue locally. I've tried VMWare and qemu VMs, but failed in both cases (see below). Could you please provide the dmesg description of your USB thumb drive. Also, it would be great if you will be able to reproduce it on main kernel = and check the same reproducer on ufs. =3D=3D=3D VMWare player FreeBSD guest: root@fb:~ # mdconfig -s 1G md0 root@fb:~ # mkfs.ext4 /dev/md0 mke2fs 1.47.0 (5-Feb-2023) Creating filesystem with 262144 4k blocks and 65536 inodes Filesystem UUID: 6431b66c-ddaa-466c-abbe-add74f0465d4 Superblock backups stored on blocks: 32768, 98304, 163840, 229376 Allocating group tables: done Writing inode tables: done Creating journal (8192 blocks): done Writing superblocks and filesystem accounting information: done root@fb:~ # mount -t ext2fs /dev/md0 /mnt root@fb:~ # echo 'hello world' >/mnt/a.txt root@fb:~ # ed -s /mnt/a.txt <<\EoF > 1s/./&/ > wq > EoF root@fb:~ # cat /mnt/a.txt hello world root@fb:~ # umount /mnt root@fb:~ # mount -r -t ext2fs /dev/da0p1 /mnt mount: /dev/da0p1: Invalid fstype: Invalid argument root@fb:~ # mount -r -t ext2fs /dev/md0 /mnt root@fb:~ # hexdump -C /mnt/a.txt 00000000 68 65 6c 6c 6f 20 77 6f 72 6c 64 0a |hello world.| 0000000c root@fb:~ # cat /mnt/a.txt hello world =3D=3D=3D Flash drive, connected to VMWare player FreeBSD guest: ugen1.2: at usbus1 umass0 on uhub1 umass0: on usb= us1 umass0: SCSI over Bulk-Only; quirks =3D 0x4000 umass0:3:0: Attached to scbus3 da1 at umass-sim0 bus 0 scbus3 target 0 lun 0 da1: Removable Direct Access SPC-4 SCSI devi= ce da1: Serial Number 0321821010021934 da1: 40.000MB/s transfers da1: 122376MB (250626566 512 byte sectors) da1: quirks=3D0x2 root@fb:~ # ls /dev | grep da da0 da0s1 da0s1a da0s1b da1 da1p1 da1p2 root@fb:~ # mount -t ext2fs /dev/da1p1 /mnt root@fb:~ # echo 'hello world' >/mnt/a.txt root@fb:~ # ed -s /mnt/a.txt <<\EoF > 1s/./&/ > wq > EoF root@fb:~ # cat /mnt/a.txt hello world root@fb:~ # umount /mnt root@fb:~ # mount -r -t ext2fs /dev/da1p1 /mnt root@fb:~ # hexdump -C /mnt/a.txt 00000000 68 65 6c 6c 6f 20 77 6f 72 6c 64 0a |hello world.| 0000000c root@fb:~ # umount /mnt =3D=3D=3D qemu emulated usb drive: root@fb:~ # mke2fs -L thumbdrive -t ext4 /dev/da0 mke2fs 1.47.0 (5-Feb-2023) Creating filesystem with 1048576 4k blocks and 262144 inodes Filesystem UUID: 203eaac3-f303-42e7-976c-6e12138e2b1f Superblock backups stored on blocks:=20 32768, 98304, 163840, 229376, 294912, 819200, 884736 Allocating group tables: done=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20 Writing inode tables: done=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20 Creating journal (16384 blocks): done Writing superblocks and filesystem accounting information: done=20 root@fb:~ # mount -t ext2fs /dev/da0p1 /mnt mount: /dev/da0p1: Invalid fstype: Invalid argument root@fb:~ # mount -t ext2fs /dev/da0 /mnt root@fb:~ # echo 'hello world' >/mnt/a.txt root@fb:~ # ed -s /mnt/a.txt <<\EoF > 1s/./&/ > wq > EoF root@fb:~ # cat /mnt/a.txt hello world root@fb:~ # umount /mnt root@fb:~ # mount -r -t ext2fs /dev/da0 /mnt root@fb:~ # hexdump -C /mnt/a.txt 00000000 68 65 6c 6c 6f 20 77 6f 72 6c 64 0a |hello world.| 0000000c For all cases: root@fb:~ # uname -a FreeBSD fb 14.0-CURRENT FreeBSD 14.0-CURRENT #0 main-n261872-1fb7d2cf999e: = Thu Mar 30 10:18:47 UTC 2023=20=20=20=20 root@releng1.nyi.freebsd.org:/usr/obj/usr/src/amd64.amd64/sys/GENERIC amd64 --=20 You are receiving this mail because: You are the assignee for the bug.=