diff --git a/0001-file-posix-Handle-undetectable-alignment.patch b/0001-file-posix-Handle-undetectable-alignment.patch
new file mode 100644
index 0000000..01ab7b6
--- /dev/null
+++ b/0001-file-posix-Handle-undetectable-alignment.patch
@@ -0,0 +1,151 @@
+From: Nir Soffer <nirsof@gmail.com>
+Date: Tue, 13 Aug 2019 21:21:03 +0300
+Subject: [PATCH] file-posix: Handle undetectable alignment
+
+In some cases buf_align or request_alignment cannot be detected:
+
+1. With Gluster, buf_align cannot be detected since the actual I/O is
+   done on Gluster server, and qemu buffer alignment does not matter.
+   Since we don't have alignment requirement, buf_align=1 is the best
+   value.
+
+2. With local XFS filesystem, buf_align cannot be detected if reading
+   from unallocated area. In this we must align the buffer, but we don't
+   know what is the correct size. Using the wrong alignment results in
+   I/O error.
+
+3. With Gluster backed by XFS, request_alignment cannot be detected if
+   reading from unallocated area. In this case we need to use the
+   correct alignment, and failing to do so results in I/O errors.
+
+4. With NFS, the server does not use direct I/O, so both buf_align cannot
+   be detected. In this case we don't need any alignment so we can use
+   buf_align=1 and request_alignment=1.
+
+These cases seems to work when storage sector size is 512 bytes, because
+the current code starts checking align=512. If the check succeeds
+because alignment cannot be detected we use 512. But this does not work
+for storage with 4k sector size.
+
+To determine if we can detect the alignment, we probe first with
+align=1. If probing succeeds, maybe there are no alignment requirement
+(cases 1, 4) or we are probing unallocated area (cases 2, 3). Since we
+don't have any way to tell, we treat this as undetectable alignment. If
+probing with align=1 fails with EINVAL, but probing with one of the
+expected alignments succeeds, we know that we found a working alignment.
+
+Practically the alignment requirements are the same for buffer
+alignment, buffer length, and offset in file. So in case we cannot
+detect buf_align, we can use request alignment. If we cannot detect
+request alignment, we can fallback to a safe value. To use this logic,
+we probe first request alignment instead of buf_align.
+
+Here is a table showing the behaviour with current code (the value in
+parenthesis is the optimal value).
+
+Case    Sector    buf_align (opt)   request_alignment (opt)     result
+======================================================================
+1       512       512   (1)          512   (512)                 OK
+1       4096      512   (1)          4096  (4096)                FAIL
+----------------------------------------------------------------------
+2       512       512   (512)        512   (512)                 OK
+2       4096      512   (4096)       4096  (4096)                FAIL
+----------------------------------------------------------------------
+3       512       512   (1)          512   (512)                 OK
+3       4096      512   (1)          512   (4096)                FAIL
+----------------------------------------------------------------------
+4       512       512   (1)          512   (1)                   OK
+4       4096      512   (1)          512   (1)                   OK
+
+Same cases with this change:
+
+Case    Sector    buf_align (opt)   request_alignment (opt)     result
+======================================================================
+1       512       512   (1)          512   (512)                 OK
+1       4096      4096  (1)          4096  (4096)                OK
+----------------------------------------------------------------------
+2       512       512   (512)        512   (512)                 OK
+2       4096      4096  (4096)       4096  (4096)                OK
+----------------------------------------------------------------------
+3       512       4096  (1)          4096  (512)                 OK
+3       4096      4096  (1)          4096  (4096)                OK
+----------------------------------------------------------------------
+4       512       4096  (1)          4096  (1)                   OK
+4       4096      4096  (1)          4096  (1)                   OK
+
+I tested that provisioning VMs and copying disks on local XFS and
+Gluster with 4k bytes sector size work now, resolving bugs [1],[2].
+I tested also on XFS, NFS, Gluster with 512 bytes sector size.
+
+[1] https://bugzilla.redhat.com/1737256
+[2] https://bugzilla.redhat.com/1738657
+
+Signed-off-by: Nir Soffer <nsoffer@redhat.com>
+Signed-off-by: Kevin Wolf <kwolf@redhat.com>
+(cherry picked from commit a6b257a08e3d72219f03e461a52152672fec0612)
+---
+ block/file-posix.c | 36 +++++++++++++++++++++++++-----------
+ 1 file changed, 25 insertions(+), 11 deletions(-)
+
+diff --git a/block/file-posix.c b/block/file-posix.c
+index 4479cc7ab4..b8b4dad553 100644
+--- a/block/file-posix.c
++++ b/block/file-posix.c
+@@ -323,6 +323,7 @@ static void raw_probe_alignment(BlockDriverState *bs, int fd, Error **errp)
+     BDRVRawState *s = bs->opaque;
+     char *buf;
+     size_t max_align = MAX(MAX_BLOCKSIZE, getpagesize());
++    size_t alignments[] = {1, 512, 1024, 2048, 4096};
+ 
+     /* For SCSI generic devices the alignment is not really used.
+        With buffered I/O, we don't have any restrictions. */
+@@ -349,25 +350,38 @@ static void raw_probe_alignment(BlockDriverState *bs, int fd, Error **errp)
+     }
+ #endif
+ 
+-    /* If we could not get the sizes so far, we can only guess them */
+-    if (!s->buf_align) {
++    /*
++     * If we could not get the sizes so far, we can only guess them. First try
++     * to detect request alignment, since it is more likely to succeed. Then
++     * try to detect buf_align, which cannot be detected in some cases (e.g.
++     * Gluster). If buf_align cannot be detected, we fallback to the value of
++     * request_alignment.
++     */
++
++    if (!bs->bl.request_alignment) {
++        int i;
+         size_t align;
+-        buf = qemu_memalign(max_align, 2 * max_align);
+-        for (align = 512; align <= max_align; align <<= 1) {
+-            if (raw_is_io_aligned(fd, buf + align, max_align)) {
+-                s->buf_align = align;
++        buf = qemu_memalign(max_align, max_align);
++        for (i = 0; i < ARRAY_SIZE(alignments); i++) {
++            align = alignments[i];
++            if (raw_is_io_aligned(fd, buf, align)) {
++                /* Fallback to safe value. */
++                bs->bl.request_alignment = (align != 1) ? align : max_align;
+                 break;
+             }
+         }
+         qemu_vfree(buf);
+     }
+ 
+-    if (!bs->bl.request_alignment) {
++    if (!s->buf_align) {
++        int i;
+         size_t align;
+-        buf = qemu_memalign(s->buf_align, max_align);
+-        for (align = 512; align <= max_align; align <<= 1) {
+-            if (raw_is_io_aligned(fd, buf, align)) {
+-                bs->bl.request_alignment = align;
++        buf = qemu_memalign(max_align, 2 * max_align);
++        for (i = 0; i < ARRAY_SIZE(alignments); i++) {
++            align = alignments[i];
++            if (raw_is_io_aligned(fd, buf + align, max_align)) {
++                /* Fallback to request_aligment. */
++                s->buf_align = (align != 1) ? align : bs->bl.request_alignment;
+                 break;
+             }
+         }
diff --git a/0002-block-posix-Always-allocate-the-first-block.patch b/0002-block-posix-Always-allocate-the-first-block.patch
new file mode 100644
index 0000000..40a55b7
--- /dev/null
+++ b/0002-block-posix-Always-allocate-the-first-block.patch
@@ -0,0 +1,369 @@
+From: Nir Soffer <nirsof@gmail.com>
+Date: Tue, 27 Aug 2019 04:05:27 +0300
+Subject: [PATCH] block: posix: Always allocate the first block
+
+When creating an image with preallocation "off" or "falloc", the first
+block of the image is typically not allocated. When using Gluster
+storage backed by XFS filesystem, reading this block using direct I/O
+succeeds regardless of request length, fooling alignment detection.
+
+In this case we fallback to a safe value (4096) instead of the optimal
+value (512), which may lead to unneeded data copying when aligning
+requests.  Allocating the first block avoids the fallback.
+
+Since we allocate the first block even with preallocation=off, we no
+longer create images with zero disk size:
+
+    $ ./qemu-img create -f raw test.raw 1g
+    Formatting 'test.raw', fmt=raw size=1073741824
+
+    $ ls -lhs test.raw
+    4.0K -rw-r--r--. 1 nsoffer nsoffer 1.0G Aug 16 23:48 test.raw
+
+And converting the image requires additional cluster:
+
+    $ ./qemu-img measure -f raw -O qcow2 test.raw
+    required size: 458752
+    fully allocated size: 1074135040
+
+When using format like vmdk with multiple files per image, we allocate
+one block per file:
+
+    $ ./qemu-img create -f vmdk -o subformat=twoGbMaxExtentFlat test.vmdk 4g
+    Formatting 'test.vmdk', fmt=vmdk size=4294967296 compat6=off hwversion=undefined subformat=twoGbMaxExtentFlat
+
+    $ ls -lhs test*.vmdk
+    4.0K -rw-r--r--. 1 nsoffer nsoffer 2.0G Aug 27 03:23 test-f001.vmdk
+    4.0K -rw-r--r--. 1 nsoffer nsoffer 2.0G Aug 27 03:23 test-f002.vmdk
+    4.0K -rw-r--r--. 1 nsoffer nsoffer  353 Aug 27 03:23 test.vmdk
+
+I did quick performance test for copying disks with qemu-img convert to
+new raw target image to Gluster storage with sector size of 512 bytes:
+
+    for i in $(seq 10); do
+        rm -f dst.raw
+        sleep 10
+        time ./qemu-img convert -f raw -O raw -t none -T none src.raw dst.raw
+    done
+
+Here is a table comparing the total time spent:
+
+Type    Before(s)   After(s)    Diff(%)
+---------------------------------------
+real      530.028    469.123      -11.4
+user       17.204     10.768      -37.4
+sys        17.881      7.011      -60.7
+
+We can see very clear improvement in CPU usage.
+
+Signed-off-by: Nir Soffer <nsoffer@redhat.com>
+Message-id: 20190827010528.8818-2-nsoffer@redhat.com
+Reviewed-by: Max Reitz <mreitz@redhat.com>
+Signed-off-by: Max Reitz <mreitz@redhat.com>
+(cherry picked from commit 3a20013fbb26d2a1bd11ef148eefdb1508783787)
+---
+ block/file-posix.c               | 51 ++++++++++++++++++++++++++++++++
+ tests/qemu-iotests/059.out       |  2 +-
+ tests/qemu-iotests/150.out       | 11 -------
+ tests/qemu-iotests/150.out.qcow2 | 11 +++++++
+ tests/qemu-iotests/150.out.raw   | 12 ++++++++
+ tests/qemu-iotests/175           | 19 ++++++++----
+ tests/qemu-iotests/175.out       |  8 ++---
+ tests/qemu-iotests/178.out.qcow2 |  4 +--
+ tests/qemu-iotests/221.out       | 12 +++++---
+ tests/qemu-iotests/253.out       | 12 +++++---
+ 10 files changed, 110 insertions(+), 32 deletions(-)
+ delete mode 100644 tests/qemu-iotests/150.out
+ create mode 100644 tests/qemu-iotests/150.out.qcow2
+ create mode 100644 tests/qemu-iotests/150.out.raw
+
+diff --git a/block/file-posix.c b/block/file-posix.c
+index b8b4dad553..8ea98896ce 100644
+--- a/block/file-posix.c
++++ b/block/file-posix.c
+@@ -1749,6 +1749,43 @@ static int handle_aiocb_discard(void *opaque)
+     return ret;
+ }
+ 
++/*
++ * Help alignment probing by allocating the first block.
++ *
++ * When reading with direct I/O from unallocated area on Gluster backed by XFS,
++ * reading succeeds regardless of request length. In this case we fallback to
++ * safe alignment which is not optimal. Allocating the first block avoids this
++ * fallback.
++ *
++ * fd may be opened with O_DIRECT, but we don't know the buffer alignment or
++ * request alignment, so we use safe values.
++ *
++ * Returns: 0 on success, -errno on failure. Since this is an optimization,
++ * caller may ignore failures.
++ */
++static int allocate_first_block(int fd, size_t max_size)
++{
++    size_t write_size = (max_size < MAX_BLOCKSIZE)
++        ? BDRV_SECTOR_SIZE
++        : MAX_BLOCKSIZE;
++    size_t max_align = MAX(MAX_BLOCKSIZE, getpagesize());
++    void *buf;
++    ssize_t n;
++    int ret;
++
++    buf = qemu_memalign(max_align, write_size);
++    memset(buf, 0, write_size);
++
++    do {
++        n = pwrite(fd, buf, write_size, 0);
++    } while (n == -1 && errno == EINTR);
++
++    ret = (n == -1) ? -errno : 0;
++
++    qemu_vfree(buf);
++    return ret;
++}
++
+ static int handle_aiocb_truncate(void *opaque)
+ {
+     RawPosixAIOData *aiocb = opaque;
+@@ -1788,6 +1825,17 @@ static int handle_aiocb_truncate(void *opaque)
+                 /* posix_fallocate() doesn't set errno. */
+                 error_setg_errno(errp, -result,
+                                  "Could not preallocate new data");
++            } else if (current_length == 0) {
++                /*
++                 * posix_fallocate() uses fallocate() if the filesystem
++                 * supports it, or fallback to manually writing zeroes. If
++                 * fallocate() was used, unaligned reads from the fallocated
++                 * area in raw_probe_alignment() will succeed, hence we need to
++                 * allocate the first block.
++                 *
++                 * Optimize future alignment probing; ignore failures.
++                 */
++                allocate_first_block(fd, offset);
+             }
+         } else {
+             result = 0;
+@@ -1849,6 +1897,9 @@ static int handle_aiocb_truncate(void *opaque)
+         if (ftruncate(fd, offset) != 0) {
+             result = -errno;
+             error_setg_errno(errp, -result, "Could not resize file");
++        } else if (current_length == 0 && offset > current_length) {
++            /* Optimize future alignment probing; ignore failures. */
++            allocate_first_block(fd, offset);
+         }
+         return result;
+     default:
+diff --git a/tests/qemu-iotests/059.out b/tests/qemu-iotests/059.out
+index 4fab42a28c..fe3f861f3c 100644
+--- a/tests/qemu-iotests/059.out
++++ b/tests/qemu-iotests/059.out
+@@ -27,7 +27,7 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824000 subformat=twoGbMax
+ image: TEST_DIR/t.vmdk
+ file format: vmdk
+ virtual size: 0.977 TiB (1073741824000 bytes)
+-disk size: 16 KiB
++disk size: 1.97 MiB
+ Format specific information:
+     cid: XXXXXXXX
+     parent cid: XXXXXXXX
+diff --git a/tests/qemu-iotests/150.out b/tests/qemu-iotests/150.out
+deleted file mode 100644
+index 2a54e8dcfa..0000000000
+--- a/tests/qemu-iotests/150.out
++++ /dev/null
+@@ -1,11 +0,0 @@
+-QA output created by 150
+-
+-=== Mapping sparse conversion ===
+-
+-Offset          Length          File
+-
+-=== Mapping non-sparse conversion ===
+-
+-Offset          Length          File
+-0               0x100000        TEST_DIR/t.IMGFMT
+-*** done
+diff --git a/tests/qemu-iotests/150.out.qcow2 b/tests/qemu-iotests/150.out.qcow2
+new file mode 100644
+index 0000000000..2a54e8dcfa
+--- /dev/null
++++ b/tests/qemu-iotests/150.out.qcow2
+@@ -0,0 +1,11 @@
++QA output created by 150
++
++=== Mapping sparse conversion ===
++
++Offset          Length          File
++
++=== Mapping non-sparse conversion ===
++
++Offset          Length          File
++0               0x100000        TEST_DIR/t.IMGFMT
++*** done
+diff --git a/tests/qemu-iotests/150.out.raw b/tests/qemu-iotests/150.out.raw
+new file mode 100644
+index 0000000000..3cdc7727a5
+--- /dev/null
++++ b/tests/qemu-iotests/150.out.raw
+@@ -0,0 +1,12 @@
++QA output created by 150
++
++=== Mapping sparse conversion ===
++
++Offset          Length          File
++0               0x1000          TEST_DIR/t.IMGFMT
++
++=== Mapping non-sparse conversion ===
++
++Offset          Length          File
++0               0x100000        TEST_DIR/t.IMGFMT
++*** done
+diff --git a/tests/qemu-iotests/175 b/tests/qemu-iotests/175
+index 51e62c8276..7ba28b3c1b 100755
+--- a/tests/qemu-iotests/175
++++ b/tests/qemu-iotests/175
+@@ -37,14 +37,16 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
+ # the file size.  This function hides the resulting difference in the
+ # stat -c '%b' output.
+ # Parameter 1: Number of blocks an empty file occupies
+-# Parameter 2: Image size in bytes
++# Parameter 2: Minimal number of blocks in an image
++# Parameter 3: Image size in bytes
+ _filter_blocks()
+ {
+     extra_blocks=$1
+-    img_size=$2
++    min_blocks=$2
++    img_size=$3
+ 
+-    sed -e "s/blocks=$extra_blocks\\(\$\\|[^0-9]\\)/nothing allocated/" \
+-        -e "s/blocks=$((extra_blocks + img_size / 512))\\(\$\\|[^0-9]\\)/everything allocated/"
++    sed -e "s/blocks=$min_blocks\\(\$\\|[^0-9]\\)/min allocation/" \
++        -e "s/blocks=$((extra_blocks + img_size / 512))\\(\$\\|[^0-9]\\)/max allocation/"
+ }
+ 
+ # get standard environment, filters and checks
+@@ -60,16 +62,21 @@ size=$((1 * 1024 * 1024))
+ touch "$TEST_DIR/empty"
+ extra_blocks=$(stat -c '%b' "$TEST_DIR/empty")
+ 
++# We always write the first byte; check how many blocks this filesystem
++# allocates to match empty image alloation.
++printf "\0" > "$TEST_DIR/empty"
++min_blocks=$(stat -c '%b' "$TEST_DIR/empty")
++
+ echo
+ echo "== creating image with default preallocation =="
+ _make_test_img $size | _filter_imgfmt
+-stat -c "size=%s, blocks=%b" $TEST_IMG | _filter_blocks $extra_blocks $size
++stat -c "size=%s, blocks=%b" $TEST_IMG | _filter_blocks $extra_blocks $min_blocks $size
+ 
+ for mode in off full falloc; do
+     echo
+     echo "== creating image with preallocation $mode =="
+     IMGOPTS=preallocation=$mode _make_test_img $size | _filter_imgfmt
+-    stat -c "size=%s, blocks=%b" $TEST_IMG | _filter_blocks $extra_blocks $size
++    stat -c "size=%s, blocks=%b" $TEST_IMG | _filter_blocks $extra_blocks $min_blocks $size
+ done
+ 
+ # success, all done
+diff --git a/tests/qemu-iotests/175.out b/tests/qemu-iotests/175.out
+index 6d9a5ed84e..263e521262 100644
+--- a/tests/qemu-iotests/175.out
++++ b/tests/qemu-iotests/175.out
+@@ -2,17 +2,17 @@ QA output created by 175
+ 
+ == creating image with default preallocation ==
+ Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1048576
+-size=1048576, nothing allocated
++size=1048576, min allocation
+ 
+ == creating image with preallocation off ==
+ Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1048576 preallocation=off
+-size=1048576, nothing allocated
++size=1048576, min allocation
+ 
+ == creating image with preallocation full ==
+ Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1048576 preallocation=full
+-size=1048576, everything allocated
++size=1048576, max allocation
+ 
+ == creating image with preallocation falloc ==
+ Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1048576 preallocation=falloc
+-size=1048576, everything allocated
++size=1048576, max allocation
+  *** done
+diff --git a/tests/qemu-iotests/178.out.qcow2 b/tests/qemu-iotests/178.out.qcow2
+index 55a8dc926f..9e7d8c44df 100644
+--- a/tests/qemu-iotests/178.out.qcow2
++++ b/tests/qemu-iotests/178.out.qcow2
+@@ -101,7 +101,7 @@ converted image file size in bytes: 196608
+ == raw input image with data (human) ==
+ 
+ Formatting 'TEST_DIR/t.qcow2', fmt=IMGFMT size=1073741824
+-required size: 393216
++required size: 458752
+ fully allocated size: 1074135040
+ wrote 512/512 bytes at offset 512
+ 512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+@@ -257,7 +257,7 @@ converted image file size in bytes: 196608
+ 
+ Formatting 'TEST_DIR/t.qcow2', fmt=IMGFMT size=1073741824
+ {
+-    "required": 393216,
++    "required": 458752,
+     "fully-allocated": 1074135040
+ }
+ wrote 512/512 bytes at offset 512
+diff --git a/tests/qemu-iotests/221.out b/tests/qemu-iotests/221.out
+index 9f9dd52bb0..dca024a0c3 100644
+--- a/tests/qemu-iotests/221.out
++++ b/tests/qemu-iotests/221.out
+@@ -3,14 +3,18 @@ QA output created by 221
+ === Check mapping of unaligned raw image ===
+ 
+ Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=65537
+-[{ "start": 0, "length": 66048, "depth": 0, "zero": true, "data": false, "offset": OFFSET}]
+-[{ "start": 0, "length": 66048, "depth": 0, "zero": true, "data": false, "offset": OFFSET}]
++[{ "start": 0, "length": 4096, "depth": 0, "zero": false, "data": true, "offset": OFFSET},
++{ "start": 4096, "length": 61952, "depth": 0, "zero": true, "data": false, "offset": OFFSET}]
++[{ "start": 0, "length": 4096, "depth": 0, "zero": false, "data": true, "offset": OFFSET},
++{ "start": 4096, "length": 61952, "depth": 0, "zero": true, "data": false, "offset": OFFSET}]
+ wrote 1/1 bytes at offset 65536
+ 1 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+-[{ "start": 0, "length": 65536, "depth": 0, "zero": true, "data": false, "offset": OFFSET},
++[{ "start": 0, "length": 4096, "depth": 0, "zero": false, "data": true, "offset": OFFSET},
++{ "start": 4096, "length": 61440, "depth": 0, "zero": true, "data": false, "offset": OFFSET},
+ { "start": 65536, "length": 1, "depth": 0, "zero": false, "data": true, "offset": OFFSET},
+ { "start": 65537, "length": 511, "depth": 0, "zero": true, "data": false, "offset": OFFSET}]
+-[{ "start": 0, "length": 65536, "depth": 0, "zero": true, "data": false, "offset": OFFSET},
++[{ "start": 0, "length": 4096, "depth": 0, "zero": false, "data": true, "offset": OFFSET},
++{ "start": 4096, "length": 61440, "depth": 0, "zero": true, "data": false, "offset": OFFSET},
+ { "start": 65536, "length": 1, "depth": 0, "zero": false, "data": true, "offset": OFFSET},
+ { "start": 65537, "length": 511, "depth": 0, "zero": true, "data": false, "offset": OFFSET}]
+ *** done
+diff --git a/tests/qemu-iotests/253.out b/tests/qemu-iotests/253.out
+index 607c0baa0b..3d08b305d7 100644
+--- a/tests/qemu-iotests/253.out
++++ b/tests/qemu-iotests/253.out
+@@ -3,12 +3,16 @@ QA output created by 253
+ === Check mapping of unaligned raw image ===
+ 
+ Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1048575
+-[{ "start": 0, "length": 1048576, "depth": 0, "zero": true, "data": false, "offset": OFFSET}]
+-[{ "start": 0, "length": 1048576, "depth": 0, "zero": true, "data": false, "offset": OFFSET}]
++[{ "start": 0, "length": 4096, "depth": 0, "zero": false, "data": true, "offset": OFFSET},
++{ "start": 4096, "length": 1044480, "depth": 0, "zero": true, "data": false, "offset": OFFSET}]
++[{ "start": 0, "length": 4096, "depth": 0, "zero": false, "data": true, "offset": OFFSET},
++{ "start": 4096, "length": 1044480, "depth": 0, "zero": true, "data": false, "offset": OFFSET}]
+ wrote 65535/65535 bytes at offset 983040
+ 63.999 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+-[{ "start": 0, "length": 983040, "depth": 0, "zero": true, "data": false, "offset": OFFSET},
++[{ "start": 0, "length": 4096, "depth": 0, "zero": false, "data": true, "offset": OFFSET},
++{ "start": 4096, "length": 978944, "depth": 0, "zero": true, "data": false, "offset": OFFSET},
+ { "start": 983040, "length": 65536, "depth": 0, "zero": false, "data": true, "offset": OFFSET}]
+-[{ "start": 0, "length": 983040, "depth": 0, "zero": true, "data": false, "offset": OFFSET},
++[{ "start": 0, "length": 4096, "depth": 0, "zero": false, "data": true, "offset": OFFSET},
++{ "start": 4096, "length": 978944, "depth": 0, "zero": true, "data": false, "offset": OFFSET},
+ { "start": 983040, "length": 65536, "depth": 0, "zero": false, "data": true, "offset": OFFSET}]
+ *** done
diff --git a/qemu.spec b/qemu.spec
index df5b9d7..dffe3b9 100644
--- a/qemu.spec
+++ b/qemu.spec
@@ -148,7 +148,7 @@
 Summary: QEMU is a FAST! processor emulator
 Name: qemu
 Version: 4.1.0
-Release: 1%{?rcrel}%{?dist}
+Release: 2%{?rcrel}%{?dist}
 Epoch: 2
 License: GPLv2 and BSD and MIT and CC-BY
 URL: http://www.qemu.org/
@@ -172,6 +172,10 @@ Source20: kvm-x86.modprobe.conf
 # /etc/security/limits.d/95-kvm-ppc64-memlock.conf
 Source21: 95-kvm-ppc64-memlock.conf
 
+# gluster 4K block size fixes (bz #1737256)
+Patch0001: 0001-file-posix-Handle-undetectable-alignment.patch
+Patch0002: 0002-block-posix-Always-allocate-the-first-block.patch
+
 
 # documentation deps
 BuildRequires: texinfo
@@ -1854,6 +1858,9 @@ getent passwd qemu >/dev/null || \
 
 
 %changelog
+* Wed Sep 04 2019 Cole Robinson <crobinso@redhat.com> - 2:4.1.0-2
+- gluster 4K block size fixes (bz #1737256)
+
 * Mon Aug 19 2019 Cole Robinson <aintdiscole@gmail.com> - 2:4.1.0-1
 - Update to qemu-4.1.0 GA