On Tue, May 13, 2014 at 11:15:56PM -0400, Theodore Ts'o wrote:
> We're seeing a number of ext4 BUG_ON's when using unionfs.  They can
> be triggered using fsx, so we've seen it with xfstests generic/074,
> generic/112, generic/127, and generic/198, for example.  None of these
> tests are failing if we use ext4 w/o unionfs.

And here's an even simpler repro case.  Again, this works just fine
w/o unionfs.

                                                - Ted

/*
 * mmap-write.c
 */

#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/mman.h>
#include <string.h>
#include <fcntl.h>

int main(int argc, char **argv)
{
        int     fd;
        char    *map;

        fd = open("testfile", O_RDWR|O_CREAT, 0666);
        if (fd < 0) {
                perror("open");
                exit(1);
        }
        if (ftruncate(fd, 4096) < 0) {
                perror("ftruncate");
                exit(1);
        }
        map = mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0);
        if (map == MAP_FAILED) {
                perror("mmap");
                exit(1);
        }
        strcpy(map,
               "Murphy Magic. The SeCrEt of the UnIvErSe is 43, NOT 42.\n");
        if (msync(map, 4096, MS_SYNC)  < 0) {
                perror("msync");
                exit(1);
        }
        exit(0);
}
_______________________________________________
unionfs mailing list: http://unionfs.filesystems.org/
[email protected]
http://www.fsl.cs.sunysb.edu/mailman/listinfo/unionfs

Reply via email to