diff options
author | Brian Behlendorf <[email protected]> | 2017-03-09 17:43:36 -0800 |
---|---|---|
committer | GitHub <[email protected]> | 2017-03-09 17:43:36 -0800 |
commit | ef1bdf363c021525c1db9630647dea73498c6bfd (patch) | |
tree | e8a0f6cb68803d158f31c94638747a18a102c102 /include/sys | |
parent | 589bb918ef39058b1f06da72092e895835a7aaff (diff) |
Fix ZVOL BLKFLSBUF ioctl
The BLKFLSBUF ioctl is expected to do two things:
- flush dirty pages to stable storage, and
- invalidate clean pages
Unfortunately, the existing implementation of BLKFLSBUF in
zvol_ioctl() only flushes pages which are part of the current
TXG to disk. There may be additional dirty pages in the
page cache which haven't yet been submitted to the DMU and
therefore aren't part of any TXG.
Furthermore because zvol_ioctl() returns 0 the generic
blkdev_flushbuf() does not invalidate the page cache.
Resolve the issue by moving bdev_flush() in to zvol_ioctl()
and explicitly waiting for a full TXG sync. Then invalidate
the page cache. The associated ARC buffers need not be
evicted since they cannot be bypassed using O_DIRECT.
Reviewed-by: Chunwei Chen <[email protected]>
Reviewed-by: George Melikov <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Closes #5871
Closes #5879
Diffstat (limited to 'include/sys')
0 files changed, 0 insertions, 0 deletions