From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, UNPARSEABLE_RELAY,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AE59EC5517A for ; Fri, 23 Oct 2020 06:33:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4C6F22223F for ; Fri, 23 Oct 2020 06:33:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="dL9hvPnk" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S372800AbgJWGdU (ORCPT ); Fri, 23 Oct 2020 02:33:20 -0400 Received: from aserp2130.oracle.com ([141.146.126.79]:37768 "EHLO aserp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S372792AbgJWGdU (ORCPT ); Fri, 23 Oct 2020 02:33:20 -0400 Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 09N6P087007778 for ; Fri, 23 Oct 2020 06:33:20 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : subject : date : message-id : in-reply-to : references; s=corp-2020-01-29; bh=Jbyq1PwcSN1lNmFKszXwqvgdYN3W8hSXzyb5AafwRDA=; b=dL9hvPnkXPxHFzRxfEZ1hCxehjUbe10poqGymTCcPBNQsNOxZYqKbwOrUE/DLR1gTDSs tDepTxoU4EHCir3G3XMcO3ZZrTFJznGa0hL/s24+AOSWyV/1seACYYUkr+VlVHMYaLEg E1HPrEagjb0rJZEBI1kxz/DxIbiMJMB5hfcKRL0CDUSiYB05hrm/hFDa+6zGcm0SLuq8 6XPF1AEAbby0q2MqPqII3780/MLTit5PwZTAmD3qp/wiMT6hAXZmdlLVJx+qB8sl28Bm FCYzpDDOiYjJpC9XWlLhOMu89JKxG5tpsI4bW0OliT31zg0XGZ6IBLmown9rM9txGvbw zw== Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by aserp2130.oracle.com with ESMTP id 347p4b9dua-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Fri, 23 Oct 2020 06:33:19 +0000 Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 09N6QAaA100450 for ; Fri, 23 Oct 2020 06:33:19 GMT Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserp3030.oracle.com with ESMTP id 348a6re9kn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Fri, 23 Oct 2020 06:33:19 +0000 Received: from abhmp0001.oracle.com (abhmp0001.oracle.com [141.146.116.7]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id 09N6XJ0O027437 for ; Fri, 23 Oct 2020 06:33:19 GMT Received: from localhost.localdomain (/67.1.244.254) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 22 Oct 2020 23:33:18 -0700 From: Allison Henderson To: linux-xfs@vger.kernel.org Subject: [PATCH v13 09/14] xfsprogs: Add feature bit XFS_SB_FEAT_INCOMPAT_LOG_DELATTR Date: Thu, 22 Oct 2020 23:33:01 -0700 Message-Id: <20201023063306.7441-10-allison.henderson@oracle.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201023063306.7441-1-allison.henderson@oracle.com> References: <20201023063306.7441-1-allison.henderson@oracle.com> X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9782 signatures=668682 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 mlxlogscore=999 bulkscore=0 spamscore=0 adultscore=0 suspectscore=1 mlxscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2010230045 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9782 signatures=668682 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=1 priorityscore=1501 clxscore=1015 malwarescore=0 mlxscore=0 bulkscore=0 lowpriorityscore=0 phishscore=0 adultscore=0 mlxlogscore=999 impostorscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2010230045 Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org This patch adds a new feature bit XFS_SB_FEAT_INCOMPAT_LOG_DELATTR which can be used to control turning on/off delayed attributes Signed-off-by: Allison Henderson --- libxfs/xfs_format.h | 8 ++++++-- libxfs/xfs_fs.h | 1 + libxfs/xfs_sb.c | 2 ++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/libxfs/xfs_format.h b/libxfs/xfs_format.h index 11e9fc5..93f1a82 100644 --- a/libxfs/xfs_format.h +++ b/libxfs/xfs_format.h @@ -481,7 +481,9 @@ xfs_sb_has_incompat_feature( return (sbp->sb_features_incompat & feature) != 0; } -#define XFS_SB_FEAT_INCOMPAT_LOG_ALL 0 +#define XFS_SB_FEAT_INCOMPAT_LOG_DELATTR (1 << 0) /* Delayed Attributes */ +#define XFS_SB_FEAT_INCOMPAT_LOG_ALL \ + (XFS_SB_FEAT_INCOMPAT_LOG_DELATTR) #define XFS_SB_FEAT_INCOMPAT_LOG_UNKNOWN ~XFS_SB_FEAT_INCOMPAT_LOG_ALL static inline bool xfs_sb_has_incompat_log_feature( @@ -567,7 +569,9 @@ static inline bool xfs_sb_version_hasreflink(struct xfs_sb *sbp) static inline bool xfs_sb_version_hasdelattr(struct xfs_sb *sbp) { - return false; + return (XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_5 && + (sbp->sb_features_log_incompat & + XFS_SB_FEAT_INCOMPAT_LOG_DELATTR)); } /* diff --git a/libxfs/xfs_fs.h b/libxfs/xfs_fs.h index 84bcffa..78e8740 100644 --- a/libxfs/xfs_fs.h +++ b/libxfs/xfs_fs.h @@ -249,6 +249,7 @@ typedef struct xfs_fsop_resblks { #define XFS_FSOP_GEOM_FLAGS_SPINODES (1 << 18) /* sparse inode chunks */ #define XFS_FSOP_GEOM_FLAGS_RMAPBT (1 << 19) /* reverse mapping btree */ #define XFS_FSOP_GEOM_FLAGS_REFLINK (1 << 20) /* files can share blocks */ +#define XFS_FSOP_GEOM_FLAGS_DELATTR (1 << 22) /* delayed attributes */ /* * Minimum and maximum sizes need for growth checks. diff --git a/libxfs/xfs_sb.c b/libxfs/xfs_sb.c index 302eea1..f9409b5 100644 --- a/libxfs/xfs_sb.c +++ b/libxfs/xfs_sb.c @@ -1143,6 +1143,8 @@ xfs_fs_geometry( geo->flags |= XFS_FSOP_GEOM_FLAGS_RMAPBT; if (xfs_sb_version_hasreflink(sbp)) geo->flags |= XFS_FSOP_GEOM_FLAGS_REFLINK; + if (xfs_sb_version_hasdelattr(sbp)) + geo->flags |= XFS_FSOP_GEOM_FLAGS_DELATTR; if (xfs_sb_version_hassector(sbp)) geo->logsectsize = sbp->sb_logsectsize; else -- 2.7.4