diff options
author | Dmitry Fomichev <dmitry.fomichev@wdc.com> | 2020-04-07 10:58:59 +0900 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2020-04-07 14:47:05 -0600 |
commit | 56a1932582ca46e2d23fdc60bb39508797c797f2 (patch) | |
tree | 2ba42a0d0a1fa359b0a87fb451e2bf52f2b97511 /configure | |
parent | 6c5b11d3d31fc6a9ae6ba8602ffc03e729476f57 (diff) | |
download | fio-56a1932582ca46e2d23fdc60bb39508797c797f2.tar.gz fio-56a1932582ca46e2d23fdc60bb39508797c797f2.tar.bz2 |
fio: Introduce libzbc IO engine
Many storage users in the field are using Linux enterprise distributions
with somewhat old kernel versions 3.x that do not have zoned block
device/ZBC/ZAC support, or distributions with more recent kernel
versions that do not have zoned block device support enabled by
default, i.e. not supported by the distribution vendor.
Despite this, there are many examples of production applications using
SMR disks directly using SCSI passthrough commands.
SMR disks performance tests and qualification using fio in such
environments is possible using the sg IO engine but writing scripts
is not easy as the zonemode=zbd cannot be used due to its lack of
support for ZBC operations (report zones, zone reset, etc).
Rather than modifying the sg IO engine, a simpler approach to provide
passthrough SMR support in fio is to use libzbc
(https://github.com/hgst/libzbc) to implement a ZBC compliant ioengine
supporting zonemode=zbd zone operations. With this, it becomes possible
to run more easily fio against SMR disks on systems without kernel
zoned block device support. This approach will also naturally enable
support for other ZBD disks varieties besides ZAC/ZBC SMR disks, namely
the upcoming Zone Domains/Zone Realms (ZD/ZR) drives, aka, dynamic
hybrid SMR drives.
This new libzbc IO engine implements the three IO engine methods related
to zoned devices: get_zoned_model(), report_zones() and reset_wp(),
allowing the use of zonemode=zbd. Special open_file(), close_file() and
get_file_size() methods are provided and implemented using libzbc
functions. The queue() operation allows only synchronous read and write
operations using the libzbc functions zbc_pread() and zbc_pwrite().
Signed-off-by: Dmitry Fomichev <dmitry.fomichev@wdc.com>
Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 34 |
1 files changed, 34 insertions, 0 deletions
@@ -2398,6 +2398,37 @@ fi print_config "Zoned block device support" "$linux_blkzoned" ########################################## +# libzbc probe +if test "$libzbc" != "yes" ; then + libzbc="no" +fi +cat > $TMPC << EOF +#include <libzbc/zbc.h> +int main(int argc, char **argv) +{ + struct zbc_device *dev = NULL; + + return zbc_open("foo=bar", O_RDONLY, &dev); +} +EOF +if compile_prog "" "-lzbc" "libzbc"; then + libzbcvermaj=$(pkg-config --modversion libzbc | sed 's/\.[0-9]*\.[0-9]*//') + if test "$libzbcvermaj" -ge "5" ; then + libzbc="yes" + LIBS="-lzbc $LIBS" + else + print_config "libzbc engine" "Unsupported libzbc version (version 5 or above required)" + libzbc="no" + fi +else + if test "$libzbc" = "yes" ; then + feature_not_found "libzbc" "libzbc or libzbc/zbc.h" + fi + libzbc="no" +fi +print_config "libzbc engine" "$libzbc" + +########################################## # check march=armv8-a+crc+crypto if test "$march_armv8_a_crc_crypto" != "yes" ; then march_armv8_a_crc_crypto="no" @@ -2864,6 +2895,9 @@ fi if test "$linux_blkzoned" = "yes" ; then output_sym "CONFIG_HAS_BLKZONED" fi +if test "$libzbc" = "yes" ; then + output_sym "CONFIG_LIBZBC" +fi if test "$zlib" = "no" ; then echo "Consider installing zlib-dev (zlib-devel, some fio features depend on it." if test "$build_static" = "yes"; then |