From nobody Sat Feb 04 18:33:16 2023 X-Original-To: bugs@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 4P8LkN64FDz3nhys for ; Sat, 4 Feb 2023 18:33:16 +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 4P8LkN3pTMz3Fml for ; Sat, 4 Feb 2023 18:33:16 +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=1675535596; 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=teTo+MCzchiAe2bJaHgdSfiznZogiqa5YSAXxpL5shQ=; b=ytOBWq0yu5CbwyAUMEYxCtmNEwOvOfAn753YoY5QM312AVKBo20DEmr30O4K55LKmlI9n1 2j/a9aAY/XH605CWQMmJ9EYVzetD9AqBOT5Og44KQunVz/ntmEhNsqTOg3921bfpl9tLCp XDWFUvpFgiJMsZcc+/1Ko5bZiNER+CxC3sYjMlJ0A3MhV8tJZb3hkCNJkU2vmj6l9AQlLE ozl+/n6hIyfoajN/NfZg1CfX0qnsCQWHlP5KShvEx17WiysfVLAmQGPT6MH0+SUsgy8YpZ ZKY8I2H7QAZLAYMiKVv0capKpxRDHHvQosmnj1VsvtF4DqmdY0H5ZAc7gUx6fA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1675535596; a=rsa-sha256; cv=none; b=IxbMLXF0ssz8R0UKiWGE2wB9EEH8LwsQt9pqkfMYTdY2Gu9Y6t7qSag/qutuhw5HiboJ4T 1bePZS1oyYZavcyvRg/suqgaIqkAPALxR/8H+9KAySuDno9g/12Y4z83PuKLfOrGpE10qp ebdE4CsbLDaXjvO/9UCeldkKyrowAEyQv7Bm3bLBdv3jK+gWTIw6HqARWEWkfShEzF+HXc yn61UwHOAKddq3KfOgAYePz0JWzPnR1E5RddqpT8AoquPUXceCOMkdy//LraaMnj/tzFIP bfv/TkMKkaTYq8X1UeAFINyKe3EgzIxoa1g2t9LtrLhvVc5CP8CCqwDpKcBfXg== 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 4P8LkN2tY9zPq1 for ; Sat, 4 Feb 2023 18:33:16 +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 314IXGqt025446 for ; Sat, 4 Feb 2023 18:33:16 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from bugzilla@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 314IXGxA025445 for bugs@FreeBSD.org; Sat, 4 Feb 2023 18:33:16 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: bugzilla set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 269261] data corruption with fspacectl and mmap Date: Sat, 04 Feb 2023 18:33:16 +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: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: commit-hook@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@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: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D269261 --- Comment #6 from commit-hook@FreeBSD.org --- A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=3D3b6056204dd80cc866b7998ef0776247e= bc42ce4 commit 3b6056204dd80cc866b7998ef0776247ebc42ce4 Author: Konstantin Belousov AuthorDate: 2023-02-04 01:20:19 +0000 Commit: Konstantin Belousov CommitDate: 2023-02-04 18:32:07 +0000 FIOSEEKHOLE/FIOSEEKDATA: correct consistency for bmap-based implementat= ion Writes on UFS through a mapped region do not allocate disk blocks in holes immediately. The blocks are allocated when the pages are paged out first time. This breaks the algorithm in vn_bmap_seekhole() and ufs_bmap_seekdata(), because VOP_BMAP() reports hole for the place which already contains a valid data. Clean the pages before doing VOP_BMAP() in the affected functions. In principle, we could clean less by only requesting clean starting from the offset, but it is probably not very important. PR: 269261 Reported by: asomers Reviewed by: asomers, markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D38379 sys/kern/vfs_vnops.c | 14 ++++++++++++-- sys/ufs/ufs/ufs_bmap.c | 18 ++++++++++++++++++ sys/ufs/ufs/ufs_vnops.c | 2 +- 3 files changed, 31 insertions(+), 3 deletions(-) --=20 You are receiving this mail because: You are the assignee for the bug.=