Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2343435imm; Thu, 9 Aug 2018 11:12:24 -0700 (PDT) X-Google-Smtp-Source: AA+uWPycV+DwXQd7+K/Pcsk0zVVDqKzly/SK2vaVyK3KtGN9SWW0q3YpiOA3nswl1hTJCHGhLo/a X-Received: by 2002:a63:f206:: with SMTP id v6-v6mr3121051pgh.319.1533838344015; Thu, 09 Aug 2018 11:12:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533838343; cv=none; d=google.com; s=arc-20160816; b=YRL88MQLqinuSd5rqU39zw3cl9qBKY4DhAPHRAdgdtiWKp9vt+bkv5Uy0mBc9E9wT3 j9aBOU7kbLloSXygA06Y/TAbJPYIkjLz30Or5YVdTi0SWy2YD3zNxKKeiwkx2r77XbTn 0YLOw4h4UYDGhc1K/oWA52nG8YeQAOvlvR7OV3aKdCRwCJ+AEvwEyxQIw9kg9mgkA1lf 5vT5QsF5xVRnOXmXETqY79mwap0qzcB6tAu1u/JYl22qWKr6LPNnxTm8L5bzDgvoshV7 Z4GWRIayvoo3pQZSB4TEdeVUC5NrDMHIx3NF7ppCMlkHIwFaJjZXOgdLMzDpaQooM9VP jxdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=As0lKa5+Tv1HOY4/e5U6uHnlYo/L2iz6KBMvgOghx1Y=; b=C2LTCndf0G24L9OTYSz0HZ1TFCcaXtDIbEIyyxi/RXEcIx/c3olWThlvrvdEnC8UvT PsBqiAzBH+LZO+6moD9a1XQxbAkLbLuTktwCfdbe8gBmc1Ld0oYDX+CeF3Tx4Mczv2QA 0LT5vWmXs3XlloXRe3CGnrOZ2dbWIj4ne+84zU+GLIwoTzR70uwbtkaMd+K/0+Pq49Xx RbbuRCPc7uj/OgVytMeBv/wJe4lk/yC5jaJCdjg39Fc1QaypgAcA0aSnyntkCuxGzBAu UYMIxvYZs/0yTiejjAfpXgj9v92ZH/EsmMn1BRrTU6wlaqN66xr0tUTS5zQ1Dsc1c/zX aM+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b="ZCmVuOg/"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v6-v6si6026171ply.300.2018.08.09.11.12.09; Thu, 09 Aug 2018 11:12:23 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b="ZCmVuOg/"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727138AbeHIUhL (ORCPT + 99 others); Thu, 9 Aug 2018 16:37:11 -0400 Received: from mail-pf1-f193.google.com ([209.85.210.193]:45171 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726744AbeHIUhK (ORCPT ); Thu, 9 Aug 2018 16:37:10 -0400 Received: by mail-pf1-f193.google.com with SMTP id i26-v6so3204767pfo.12; Thu, 09 Aug 2018 11:11:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=As0lKa5+Tv1HOY4/e5U6uHnlYo/L2iz6KBMvgOghx1Y=; b=ZCmVuOg/8mUD/pHRWoLO2xWqalxH6ZPuvTCZH7XOdigAWIVj/2e/lmiF4WzUOOT+1f MKNLo9fyl0HMqJcX+spvYlpVsOj4L4A3+fnSvq/cIs2BmSS3y2ndxF5hjmntkcYBhdl1 S4oPoU8FnHU4otOsvZtGZWzqX2OR7pdSx6/zZ7ecTjZ/thsfkkZ8Q2p9sG8UhPMR/9gI cRHMVReU2bA4/TddrH/JBeEBn0SRRh9pEf5i6mK22etQObTQumQJnPbucz5ewp4JMlYV 2SQyVV3BX/5vAybol4xNgl9gTy5w+0ZxwbK+xtH1jTTZ7wKv5VefIyxzGwwcAVuwuMMJ KlwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=As0lKa5+Tv1HOY4/e5U6uHnlYo/L2iz6KBMvgOghx1Y=; b=VuHONOtvh616urvewvb8mDLwDEKPBFseJOMeDCfCpnikTjcUSToB6zuc9j1gh/v/ar R55NmhcLvaY55EQJq8jQfC7Y3+ztKt2tOAG64iB20UI8aQDweZhwL/iD6y+0cDy14FkW iGQVDIYtpi0gheJbN3JVAB5x8FApJ4q3XgTOMVE70eVQw6tUAfM3UzM+6jm6uzxQ1pVA Ebusp915//PbzHTXvCxk5ViEVZb2SyvwIT0KzUakQNGF/bUwLyIUxM64l9uTOJNd/+NP SKW9+GWrkckGt05m2V6e6AjKuQXK4ddDhL7Z0AJAky6HTsz9PHtmL5oOodnDEju/sGgv BqLw== X-Gm-Message-State: AOUpUlG8LcHrruVpXMrHEWsUFxdXQ36HY0Y2LAMmFzkbiIbVEw+4OTzF V98jtk1eXgoeS0onNQF1A5o= X-Received: by 2002:a62:1f8c:: with SMTP id l12-v6mr3482696pfj.143.1533838270075; Thu, 09 Aug 2018 11:11:10 -0700 (PDT) Received: from localhost (h101-111-148-072.catv02.itscom.jp. [101.111.148.72]) by smtp.gmail.com with ESMTPSA id i125-v6sm7017445pgc.16.2018.08.09.11.11.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 09 Aug 2018 11:11:09 -0700 (PDT) From: Naohiro Aota To: David Sterba , linux-btrfs@vger.kernel.org Cc: Chris Mason , Josef Bacik , linux-kernel@vger.kernel.org, Hannes Reinecke , Damien Le Moal , Bart Van Assche , Matias Bjorling , Naohiro Aota Subject: [RFC PATCH 01/12] btrfs-progs: build: Check zoned block device support Date: Fri, 10 Aug 2018 03:10:54 +0900 Message-Id: <20180809181105.12856-1-naota@elisp.net> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180809180450.5091-1-naota@elisp.net> References: <20180809180450.5091-1-naota@elisp.net> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 df02f206..616d62a1 100644 --- a/configure.ac +++ b/configure.ac @@ -207,6 +207,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 @@ -308,6 +320,7 @@ AC_MSG_RESULT([ btrfs-restore zstd: ${enable_zstd} Python bindings: ${enable_python} Python interpreter: ${PYTHON} + zoned device: ${enable_zoned} Type 'make' to compile. ]) -- 2.18.0