diff options
author | Matthew Macy <[email protected]> | 2019-10-28 09:53:39 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2019-10-28 09:53:39 -0700 |
commit | d46f0deb035bd26840dc6284fc6e1bb392097c92 (patch) | |
tree | 35cb36d78d2e4b67a14c43a30c739453ea37888b /cmd/zdb | |
parent | 4a22ba5be0aab1480aeac4581025ce6d7ce4b4a1 (diff) |
Add wrapper for Linux BLKFLSBUF ioctl
FreeBSD has no analog. Buffered block devices were removed a decade
plus ago.
Reviewed-by: Igor Kozhukhov <[email protected]>
Reviewed-by: Jorgen Lundman <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Matt Macy <[email protected]>
Closes #9508
Diffstat (limited to 'cmd/zdb')
-rw-r--r-- | cmd/zdb/zdb.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd/zdb/zdb.c b/cmd/zdb/zdb.c index dd8e652d9..7c3ef3ef4 100644 --- a/cmd/zdb/zdb.c +++ b/cmd/zdb/zdb.c @@ -3444,7 +3444,7 @@ dump_label(const char *dev) exit(1); } - if (S_ISBLK(statbuf.st_mode) && ioctl(fd, BLKFLSBUF) != 0) + if (S_ISBLK(statbuf.st_mode) && zfs_dev_flush(fd) != 0) (void) printf("failed to invalidate cache '%s' : %s\n", path, strerror(errno)); |