Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 29 Aug 2016 18:24:19 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-bugs@FreeBSD.org
Subject:   [Bug 212245] ZFS volume (zvol) does not honor fsync()
Message-ID:  <bug-212245-8@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D212245

            Bug ID: 212245
           Summary: ZFS volume (zvol) does not honor fsync()
           Product: Base System
           Version: 10.3-RELEASE
          Hardware: amd64
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: kern
          Assignee: freebsd-bugs@FreeBSD.org
          Reporter: lordcrc@gmail.com
                CC: freebsd-amd64@FreeBSD.org
                CC: freebsd-amd64@FreeBSD.org

Created attachment 174200
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D174200&action=
=3Dedit
Program used to reproduce the issue

It seems that ZFS does not honor fsync() done on zvols.

This issue affects iSCSI targets backed by ZFS volumes, which are forced to=
 run
with sync=3Dalways to ensure consistency. Running sync=3Dalways has a drast=
ic
performance impact.

To reproduce:
- Log in via remote SSH console (important).
- Create a ZFS pool and a zvol.
- Format zvol with UFS.
- Mount zvol UFS partition.
- Cd into mount point.
- Compile and run the attached program.
- Physically remove power to the computer.
- Write down the last number shown in the SSH console window.
- Reboot computer and log in.
- Mount zvol partition if needed.
- Cd into mount point.
- Display contents of "output.txt"
- Compare last line of "output.txt" with last line shown in SSH console.

Expected output:
If the SSH console's last number was 11291, the last number in "output.txt"
should be 11291 or 11292.

Actual output:
The last line in "output.txt" is a lot further behind the output in the SSH
console.



Here's the commands I used to set up the UFS partition:

History for 'tank0':
2016-08-29.19:39:35 zpool create tank0 /dev/ada0s2
2016-08-29.19:43:57 zpool import tank0
2016-08-29.19:44:50 zfs create -V 500M tank0/testvol

gpart add -t freebsd-ufs -a 1M /dev/zvol/tank0/testvol

newfs -U /dev/zvol/tank0/testvolp1

mkdir test

mount /dev/zvol/tank0/testvolp1 test



The supplied program shows the expected output if run directly on a "native"
UFS partition, as well as when run on a zvol using ZFS-on-Linux (on a Debian
machine).

--=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-212245-8>