summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorShin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>2020-07-17 18:36:32 +0900
committerJens Axboe <axboe@kernel.dk>2020-07-21 09:17:29 -0600
commit236d23a86d6e3c14b700496e0f196f88513a5f3e (patch)
treefc96baccbcc54a66e678efbf15276696e8015d2b /configure
parentd13596b225baf61425a9ca92b0583fc3fa97765d (diff)
downloadfio-236d23a86d6e3c14b700496e0f196f88513a5f3e.tar.gz
fio-236d23a86d6e3c14b700496e0f196f88513a5f3e.tar.bz2
zbd: Support zone capacity smaller than zone size
NVMe ZNS specification defines zone capacity. The report zone interface of Linux kernel supports it. This patch adds support for this new interface. Modify configure to check availability of BLK_ZONE_REP_CAPACITY flag as well as blkzoned.h header only when target OS is Linux. If this flag is defined and set in the report zone, all sectors from the zone capacity up to the zone size are not accessible. Prevent read and write operations to these sectors by modifying zbd_adjust_block(). Of note is that this skips the region between zone capacity and zone size then reduces total I/O bytes of sequential workloads. Introduce helper functions zbd_zone_end() and zbd_zone_capacity_end() to improve readability of zone limit check code. Reviewed-by: Damien Le Moal <damien.lemoal@wdc.com> Signed-off-by: Aravind Ramesh <aravind.ramesh@wdc.com> Signed-off-by: Hans Holmberg <hans.holmberg@wdc.com> Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure19
1 files changed, 19 insertions, 0 deletions
diff --git a/configure b/configure
index 6991393b..b079a2a5 100755
--- a/configure
+++ b/configure
@@ -2390,6 +2390,7 @@ if compile_prog "" "" "valgrind_dev"; then
fi
print_config "Valgrind headers" "$valgrind_dev"
+if test "$targetos" = "Linux" ; then
##########################################
# <linux/blkzoned.h> probe
if test "$linux_blkzoned" != "yes" ; then
@@ -2408,6 +2409,24 @@ fi
print_config "Zoned block device support" "$linux_blkzoned"
##########################################
+# Check BLK_ZONE_REP_CAPACITY
+cat > $TMPC << EOF
+#include <linux/blkzoned.h>
+int main(void)
+{
+ return BLK_ZONE_REP_CAPACITY;
+}
+EOF
+if compile_prog "" "" "blkzoned report capacity"; then
+ output_sym "CONFIG_HAVE_REP_CAPACITY"
+ rep_capacity="yes"
+else
+ rep_capacity="no"
+fi
+print_config "Zoned block device capacity" "$rep_capacity"
+fi
+
+##########################################
# libzbc probe
if test "$libzbc" != "yes" ; then
libzbc="no"