From nobody Mon Apr 10 17:39:26 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 4PwGSH3TGvz44X0l for ; Mon, 10 Apr 2023 17:39:27 +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 4PwGSH2S80z4cCv for ; Mon, 10 Apr 2023 17:39:27 +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=1681148367; 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=mo/ZBlgVjYGil1dN76Hf4zECBBPfM8YGrLQlw1hl7ZQ=; b=hMsBiW+IsIwxRNiSa84mDRbXT3SvBoct2iU39Xgbp4oIlqRuvDqUAIB7bjggsgKwD2k6J/ WhJJ0rNldYzot24/sOmpd02djjRi8hBNPbczVG3SJaR/xMzjzrfn+qiqXb4sgO3Wgq3kOG rK3S4m2gSMrUsZRJX5OHDTkyaSmzjKb4eXrWe/fRSPiuvG7O/l8ZmW8P29gIZ5qrDeaWep MkDFLKm5u4SJ+jL2VXsJMrzE+NwIF49Dk/hmFnKCYcYSPlx/yCOVP9zAurGAUHzRMH3dW/ N3gT1Wx4Z/IeCwmlzH2kAr3+fD+Vl0d+v3QYrcvchqucp0kT5tHxwBUcwufxfw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681148367; a=rsa-sha256; cv=none; b=tcxMZg9xxwuBKyxo1TakzAQ2dmPU/zMxP/54N2vU4nOD1zSlEcXRu5h0h1EpLnPE9rVppm l/8LbXTNVuc2HdVFRozbN7JD1WlbQQjSvcsaEx5XVUqKRxMIKZVqcERdLZNXQF+hqjNnhF oEAWlHooMkFxxE5agJcub0xFDGSdgM0FGOYAJRCzxazVt8GcjH6w4Q6U5PDFq7UqD/GeWn V7wgpSMQdSb6mFyJTIbm6urPpC0jPfqH2qDng8FuGXcaBl6yAXx0XqHTUNQ86VresdjGos Z2qt2H+BZ1wdynrKWcEJL+t4QjpRJlPEpbi+O56m5tPndctANxEo2dZEJcYs5w== 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 4PwGSH1XFFz10Nw for ; Mon, 10 Apr 2023 17:39:27 +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 33AHdRVX042656 for ; Mon, 10 Apr 2023 17:39:27 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 33AHdRYn042655 for fs@FreeBSD.org; Mon, 10 Apr 2023 17:39:27 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: Mon, 10 Apr 2023 17:39:26 +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 Some People X-Bugzilla-Who: marklmi26-fbsd@yahoo.com X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: fs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc 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 Mark Millard changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |marklmi26-fbsd@yahoo.com --- Comment #12 from Mark Millard --- (In reply to Konstantin Belousov from comment #11) I the context: # uname -apKU FreeBSD generic 13.1-RELEASE FreeBSD 13.1-RELEASE releng/13.1-n250148-fc952ac2212 GENERIC arm64 aarch64 1301000 1301000 The script I later provide below, it produced: # ./writes_nulls_check.sh Updating FreeBSD repository catalogue... FreeBSD repository is up to date. All repositories are up to date. Checking integrity... done (0 conflicting) The most recent versions of packages are already installed mke2fs 1.47.0 (5-Feb-2023) Creating filesystem with 131072 4k blocks and 32768 inodes Filesystem UUID: 1fd9b001-e5f5-45d0-89a8-4f4df64a9adc Superblock backups stored on blocks:=20 32768, 98304 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 (4096 blocks): done Writing superblocks and filesystem accounting information: done 00000000 00 00 00 00 00 00 00 00 00 00 00 00 |............| 0000000c I'll note that it did not produce such on main [so: 14]. # more writes_nulls_check.sh=20 #! /bin/sh pkg install e2fsprogs mdconfig -u0 -s512M mke2fs -t ext4 /dev/md0 mount -t ext2fs /dev/md0 /mnt rm -f writes_nulls_check.c cat <<'EOF' >writes_nulls_check.c // Example compile/link, producing a.out: cc -std=3Dc17 -pedantic -Wall -We= xtra writes_nulls_check.c -owrites_nulls_check #include // err related #include // open related #include // strlen #include // fsync related int main(void) { const char* const fn =3D "/mnt/writes_nulls_check.txt"; const char* const S =3D "hello world\n"; const size_t n =3D strlen(S); int fd =3D open(fn, O_WRONLY|O_CREAT, 0666); if (fd =3D=3D -1) err(1, "%s: open failed", fn); if (write(fd, S, n) !=3D n) err(1, "%s: write failed", fn); if (close(fd) =3D=3D -1) err(1, "%s: close failed", fn); fd =3D open(fn, O_WRONLY | O_TRUNC | O_DIRECT, 0666); if (fd =3D=3D -1) err(1, "%s: open failed", fn); if (write(fd, S, n) !=3D n) err(1, "%s: write failed", fn); if (fsync(fd)) err(1, "fsync failed"); if (close(fd) =3D=3D -1) err(1, "%s: close failed", fn); return 0; } EOF cc -std=3Dc17 -pedantic -Wall -Wextra writes_nulls_check.c -owrites_nulls_c= heck ./writes_nulls_check hd /mnt/writes_nulls_check.txt umount /mnt mdconfig -d -u0 # Leave writes_nulls_check.c and writes_nulls_check in place for reference. --=20 You are receiving this mail because: You are the assignee for the bug.=