[Bugs] [Bug 1751722] Gluster fuse mount crashed during truncate

bugzilla at redhat.com bugzilla at redhat.com
Fri Sep 20 08:05:06 UTC 2019


https://bugzilla.redhat.com/show_bug.cgi?id=1751722

Krutika Dhananjay <kdhananj at redhat.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
              Flags|needinfo?(kdhananj at redhat.c |
                   |om)                         |



--- Comment #12 from Krutika Dhananjay <kdhananj at redhat.com> ---
(In reply to Nir Soffer from comment #10)
> (In reply to Krutika Dhananjay from comment #5)
> > RCA:
> > The size going negative is when two consecutive truncates on the
> > __DIRECT_IO_TEST__ file (coming from open with O_TRUNC) happened in the
> > following sequence:
> > 
> > 1. Size of the file at the beginning - 512b
> 
> Did you reproduce this with storage with sector size of 512 or 4096?

Just checked Bipin's setup and it's 512.

[root at rhsqa-grafton8 ~]# blockdev --getss
/dev/mapper/gluster_vg_sdb-gluster_lv_vmstore
512
[root at rhsqa-grafton8 ~]# blockdev --getss
/dev/mapper/gluster_vg_sdb-gluster_lv_data 
512
[root at rhsqa-grafton8 ~]# blockdev --getss
/dev/mapper/gluster_vg_sdd-gluster_lv_engine 
512

> 
> On 4k storage I don't think we can have such file, unless there is 
> another bug in gluster.
> 
> What vdsm does is equivalent to:
> 
> out=$1
> 
> for bs in 1 512 4096; do
>     if dd if=/dev/zero bs=$bs count=1 of=$out oflag=direct conv=fsync; then
>         echo $bs
>         exit 0
>     fi
> done
> 
> echo "cannot use direct I/O" > &2
> exit 1
> 
> On storage that does not support direct I/O the result is:
> 
> $ sh detect-block-size.sh /tmp/foo
> dd: failed to open '/tmp/foo': Invalid argument
> dd: failed to open '/tmp/foo': Invalid argument
> dd: failed to open '/tmp/foo': Invalid argument
> cannot use direct I/O
> 
> $ ls -lht /tmp/foo 
> -rw-rw-r--. 1 nsoffer nsoffer 0 Sep 19 19:46 /tmp/foo
> 
> On storage with sector size of 512:
> 
> $ sh detect-block-size.sh /var/tmp/foo
> dd: error writing '/var/tmp/foo': Invalid argument
> 1+0 records in
> 0+0 records out
> 0 bytes copied, 0.000392325 s, 0.0 kB/s
> 1+0 records in
> 1+0 records out
> 512 bytes copied, 0.0601933 s, 8.5 kB/s
> 512
> 
> $ ls -lht /var/tmp/foo
> -rw-rw-r--. 1 nsoffer nsoffer 512 Sep 19 19:48 /var/tmp/foo
> 
> On storage with sector size of 4096:
> 
> $ sh detect-block-size.sh /var/tmp/vdsm-storage/mount.mount-4k/foo
> dd: error writing '/var/tmp/vdsm-storage/mount.mount-4k/foo': Invalid
> argument
> 1+0 records in
> 0+0 records out
> 0 bytes copied, 0.000116669 s, 0.0 kB/s
> dd: error writing '/var/tmp/vdsm-storage/mount.mount-4k/foo': Invalid
> argument
> 1+0 records in
> 0+0 records out
> 0 bytes copied, 0.000115637 s, 0.0 kB/s
> 1+0 records in
> 1+0 records out
> 4096 bytes (4.1 kB, 4.0 KiB) copied, 0.00483159 s, 848 kB/s
> 4096

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Bugs mailing list