Re: [Cluster-devel] [Q] gfs2: mmap write vs. punch_hole consistency

2019-09-06 Thread Dave Chinner
On Fri, Sep 06, 2019 at 11:48:31PM +0200, Andreas Gruenbacher wrote: > On Fri, Sep 6, 2019 at 11:28 PM Dave Chinner wrote: > > On Fri, Sep 06, 2019 at 10:52:41PM +0200, Andreas Gruenbacher wrote: > > > Hi, > > > > > > I've just fixed a mmap write vs. truncate consistency issue on gfs on > > >

Re: [Cluster-devel] [Q] gfs2: mmap write vs. punch_hole consistency

2019-09-06 Thread Andreas Gruenbacher
On Fri, Sep 6, 2019 at 11:28 PM Dave Chinner wrote: > On Fri, Sep 06, 2019 at 10:52:41PM +0200, Andreas Gruenbacher wrote: > > Hi, > > > > I've just fixed a mmap write vs. truncate consistency issue on gfs on > > filesystems with a block size smaller that the page size [1]. > > > > It turns out

Re: [Cluster-devel] [Q] gfs2: mmap write vs. punch_hole consistency

2019-09-06 Thread Dave Chinner
On Fri, Sep 06, 2019 at 10:52:41PM +0200, Andreas Gruenbacher wrote: > Hi, > > I've just fixed a mmap write vs. truncate consistency issue on gfs on > filesystems with a block size smaller that the page size [1]. > > It turns out that the same problem exists between mmap write and hole >

[Cluster-devel] [Q] gfs2: mmap write vs. punch_hole consistency

2019-09-06 Thread Andreas Gruenbacher
Hi, I've just fixed a mmap write vs. truncate consistency issue on gfs on filesystems with a block size smaller that the page size [1]. It turns out that the same problem exists between mmap write and hole punching, and since xfstests doesn't seem to cover that, I've written a new test [2].

[Cluster-devel] [PATCH] gfs2: Improve mmap write vs. truncate consistency

2019-09-06 Thread Andreas Gruenbacher
On filesystems with a block size smaller than PAGE_SIZE, page_mkwrite is called for each memory-mapped page before that page can be written to. When such a memory-mapped file is truncated down to size x which is not a multiple of the page size and then back to a larger size, the page straddling