Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 04 Feb 2023 18:33:16 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 269261] data corruption with fspacectl and mmap
Message-ID:  <bug-269261-227-vs7sF0RFkY@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-269261-227@https.bugs.freebsd.org/bugzilla/>
References:  <bug-269261-227@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <kib@FreeBSD.org>
AuthorDate: 2023-02-04 01:20:19 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
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.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-269261-227-vs7sF0RFkY>