From patchwork Fri Aug 23 10:10:32 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naohiro Aota X-Patchwork-Id: 11111403 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 66CF713A4 for ; Fri, 23 Aug 2019 10:11:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 454AC233FD for ; Fri, 23 Aug 2019 10:11:59 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=wdc.com header.i=@wdc.com header.b="TnY+Xqlw" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404750AbfHWKL6 (ORCPT ); Fri, 23 Aug 2019 06:11:58 -0400 Received: from esa3.hgst.iphmx.com ([216.71.153.141]:47806 "EHLO esa3.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404700AbfHWKL5 (ORCPT ); Fri, 23 Aug 2019 06:11:57 -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=1566555117; x=1598091117; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=JQnGemSRC9GgoTrBYbP+B/iabFUV/w8ISdNPJGyqlWg=; b=TnY+Xqlw/omb1Avo0+pGY+hSRSo+xIo8lLvUm1gJ+ajyFgCI3FCx+BpK tvDahfWgH/c7/6GfkLbjG+tNpY6SsECgFSoQXRpFcV9UPWo4cvZL4YKEW kjVI+6WUAxb2GRJh/4Pt3WQwlq+5JcddpgibSDeE4i3qHbgXEdSXkTbFw CiAVyvCWFX7qRpyyag1v/KXK8SVpoZUGbI2U9IBNNvJvOYqDYBPDJ1biC LmOdEKAC4ZOkQvcuYCyuyWJrCFuihMEJF+uIZJw3S8AUcXwI4gHW2nYrz p1AJWY30GmDOVRgUV9VFu2p0QMDfLdV+R35+v+08gl2FtJ+2ex5cSpIKh w==; IronPort-SDR: IYlqaXEzx010cLDNmz7SQorswWeHwrxmvRmuPl1IgWKbsLlD/PrH/qYAYuE5qbahM3aJ25lxtf r1T7i7e/8FIs/VndLoEQZm/DWjlqnfJZVqRfUofd5mexU27a5U8WKuB0w79U8JzU7/mopgnJO2 OmF7EOvLnjVq+8Wm0GNQtrpRVuWltXhuFag6K9rQIdpbNfbaiKEd4gfjpMdGSSKMBqp7JfWgil O6zJ7Jh962bk2hzWXOElh2HLUd3R8ConsBMri5qzS4QTBnSqBBLPZ4T29xzycIXEB+aJFmbI47 rdA= X-IronPort-AV: E=Sophos;i="5.64,420,1559491200"; d="scan'208";a="121096271" Received: from uls-op-cesaip01.wdc.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 23 Aug 2019 18:11:57 +0800 IronPort-SDR: Ni9XqinKvU1ONUlnH/frLO6oHUOpo463UdBcv0zcGZJ1ErNsNpZVGm/yr3lyGpgcGvHe5vUPer d36dmQAxB8jNl6CDbDfwCACP8Rn4t1U2XB6ElpKhJc5fFINAHtXArgxi//uxbJBEu+krmoMiDh YzO53mPLAE7FrZXvSuprTnd4duLDNrVIFqT3/+9FgTQTq6gQzrHcHx8y7mw73+Z+zysSeeSlTq bBzwhNZE86q2iQOHon/TFzIgFeRTBjCohrlBm7LlKlmJ7N2nfYzXATlcuvpnbIDJWjgUKkofNs B6cAJ+KgGnwcTM8zFoJMqLXa Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep01.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Aug 2019 03:09:15 -0700 IronPort-SDR: eDqlaZk5zLrflJaJrt0MbYIuH+LmUUEyNrviosmSVyOYs73th87r4R7vyv1CgZRt1mYFVINOSY ZMDFJoOVwWbY7X6u/jG295LzX6LBWMY799JtR9EE0iiNIQ9KYkUIuSMeBCgFLaQfS9UCgSJTlI VNv/IlCXiN0L+275WjNiXw52PtJpVVOWejodGGVID0CzM+wu0bNZJiW/vrakv1395ho35h6va+ xq+7Irf7QY44T+dtrugEdfgxNcLlT6p7VbKP1a/RF8f0qH+e3hPIoCW/+UPauO6jv/ZISZUnC9 Ggw= WDCIronportException: Internal Received: from naota.dhcp.fujisawa.hgst.com (HELO naota.fujisawa.hgst.com) ([10.149.53.115]) by uls-op-cesaip02.wdc.com with ESMTP; 23 Aug 2019 03:11:55 -0700 From: Naohiro Aota To: linux-btrfs@vger.kernel.org, David Sterba Cc: Chris Mason , Josef Bacik , Nikolay Borisov , Damien Le Moal , Matias Bjorling , Johannes Thumshirn , Hannes Reinecke , Anand Jain , linux-fsdevel@vger.kernel.org, Naohiro Aota Subject: [PATCH v4 23/27] btrfs: disallow inode_cache in HMZONED mode Date: Fri, 23 Aug 2019 19:10:32 +0900 Message-Id: <20190823101036.796932-24-naohiro.aota@wdc.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20190823101036.796932-1-naohiro.aota@wdc.com> References: <20190823101036.796932-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 inode_cache use pre-allocation to write its cache data. However, pre-allocation is completely disabled in HMZONED mode. We can technically enable inode_cache in the same way as relocation. However, inode_cache is rarely used and the man page discourage using it. So, let's just disable it for now. Signed-off-by: Naohiro Aota --- fs/btrfs/hmzoned.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/fs/btrfs/hmzoned.c b/fs/btrfs/hmzoned.c index 871befbbb23b..f8f41cb3d22a 100644 --- a/fs/btrfs/hmzoned.c +++ b/fs/btrfs/hmzoned.c @@ -272,6 +272,12 @@ int btrfs_check_mountopts_hmzoned(struct btrfs_fs_info *info) return -EINVAL; } + if (btrfs_test_pending(info, SET_INODE_MAP_CACHE)) { + btrfs_err(info, + "cannot enable inode map caching with HMZONED mode"); + return -EINVAL; + } + return 0; }