From patchwork Fri Jun 7 13:17:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naohiro Aota X-Patchwork-Id: 10981835 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7A73014E5 for ; Fri, 7 Jun 2019 13:19:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6B28F28BA0 for ; Fri, 7 Jun 2019 13:19:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5FA2E28BBC; Fri, 7 Jun 2019 13:19:23 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 13C6D28BA5 for ; Fri, 7 Jun 2019 13:19:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728261AbfFGNSD (ORCPT ); Fri, 7 Jun 2019 09:18:03 -0400 Received: from esa2.hgst.iphmx.com ([68.232.143.124]:56451 "EHLO esa2.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727467AbfFGNSD (ORCPT ); Fri, 7 Jun 2019 09:18:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1559913510; x=1591449510; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=mcN9WtvQEWdujXnIA7oYPdYlHv79AOG60zJ58+aPVaw=; b=SyUKUFgIU2Is/+yrEKogBLJmIgZUpPSi0feq0SPTJ83/FGXHqN8v3J/N YQPm1YVwiScLQA9XgzfBGap9cmg5X9nBgUvvJy6V44tSe3euq1joDYU+C O/JOhFY9xRKIC7H5y34o+deBpWzXnN8NYkPiqvaWZRdEOwehvx4KZY7hC E/nUgKVWXWz47zvfUWf5MbhLul63PUe+Bya0xD68a0TCui/JCEf7AEp+T 0zqJZUjRt4MIuVL6IJXJqgYUzuloI7oeQl7mfpbDiwbvccU3o882yrnWv JXNka0rUVYSTGT+bactc9sU/sDTxESMXYuPe8q4aCQE0kto1/yOtp70WK Q==; X-IronPort-AV: E=Sophos;i="5.63,563,1557158400"; d="scan'208";a="209674976" Received: from uls-op-cesaip02.wdc.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 07 Jun 2019 21:18:29 +0800 IronPort-SDR: SBbqHnJA5jmRXmt2EGP55K+bxw8dMC9uCdUJLI4j3vysUOhgbXvgMS/IK7yOzPmBxZAyDY67f5 sl7GVsmQIZ8OoXvhfvZ9HMs0TPNPpVogJM/kLy7GKw577ZxD288HlM1Gac8IVzsmUPOjtJyaa3 yaGHMt7PHLaDP03vVZijbhznoHxMaH9AU5CpRU7uxDDLqEsVogoWSUdAYswUDCD4RSQiUxWtZd b0FBTpCqu6PXBtlnUxIqMMcmOwAkprin+L8FhmLYT0oXp1/EM/ybJRGgBx/q9oQz6rnr2/MkLi ptOz4neXnvgm7GY5ogaGco/1 Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep02.wdc.com with ESMTP; 07 Jun 2019 05:55:20 -0700 IronPort-SDR: uCGEZ0Cr8PiYRuFSJSdPJVQ2ygdQWLtl5ZOTaxWaNxZ5uUJ8wPn9mI/bAShPxilfe9967eTrdh Njp/lHbIUK8ZLUe+QpPApZlrUxiltbLJr9XQ9PWMpcdDoopi0m9RPDOS6ik5uU/Qd8SMiLfB/1 my/12itXS3Mw7U9MS3ZeOhdKSzW4HFrZXNBKM1jg6e4EqRJoVjpTxe32tyD8lvGQyM9UCniG95 /4D6Q9wDaX8Kw9C9LlLdeZOgj+mGoQOZ2IxvXgUHbn3leqrg79tB/1KNp4ozbsAtReuxsgE3hz 2WI= Received: from naota.dhcp.fujisawa.hgst.com (HELO naota.fujisawa.hgst.com) ([10.149.53.115]) by uls-op-cesaip02.wdc.com with ESMTP; 07 Jun 2019 06:18:01 -0700 From: Naohiro Aota To: linux-btrfs@vger.kernel.org, David Sterba Cc: Chris Mason , Josef Bacik , Qu Wenruo , Nikolay Borisov , linux-kernel@vger.kernel.org, Hannes Reinecke , linux-fsdevel@vger.kernel.org, Damien Le Moal , =?utf-8?q?Matias_Bj=C3=B8rling?= , Johannes Thumshirn , Bart Van Assche , Naohiro Aota Subject: [PATCH 01/12] btrfs-progs: build: Check zoned block device support Date: Fri, 7 Jun 2019 22:17:40 +0900 Message-Id: <20190607131751.5359-1-naohiro.aota@wdc.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190607131025.31996-1-naohiro.aota@wdc.com> References: <20190607131025.31996-1-naohiro.aota@wdc.com> MIME-Version: 1.0 Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP If the kernel supports zoned block devices, the file /usr/include/linux/blkzoned.h will be present. Check this and define BTRFS_ZONED if the file is present. If it present, enables HMZONED feature, if not disable it. Signed-off-by: Damien Le Moal Signed-off-by: Naohiro Aota --- configure.ac | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/configure.ac b/configure.ac index cf792eb5488b..c637f72a8fe6 100644 --- a/configure.ac +++ b/configure.ac @@ -206,6 +206,18 @@ else AC_DEFINE([HAVE_OWN_FIEMAP_EXTENT_SHARED_DEFINE], [0], [We did not define FIEMAP_EXTENT_SHARED]) fi +AC_CHECK_HEADER(linux/blkzoned.h, [blkzoned_found=yes], [blkzoned_found=no]) +AC_ARG_ENABLE([zoned], + AS_HELP_STRING([--disable-zoned], [disable zoned block device support]), + [], [enable_zoned=$blkzoned_found] +) + +AS_IF([test "x$enable_zoned" = xyes], [ + AC_CHECK_HEADER(linux/blkzoned.h, [], + [AC_MSG_ERROR([Couldn't find linux/blkzoned.h])]) + AC_DEFINE([BTRFS_ZONED], [1], [enable zoned block device support]) +]) + dnl Define _LIBS= and _CFLAGS= by pkg-config dnl dnl The default PKG_CHECK_MODULES() action-if-not-found is end the @@ -307,6 +319,7 @@ AC_MSG_RESULT([ btrfs-restore zstd: ${enable_zstd} Python bindings: ${enable_python} Python interpreter: ${PYTHON} + zoned device: ${enable_zoned} Type 'make' to compile. ])