From patchwork Thu Sep 5 22:18:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allison Henderson X-Patchwork-Id: 11134037 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 3D0981593 for ; Thu, 5 Sep 2019 22:19:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 513CC20825 for ; Thu, 5 Sep 2019 22:19:14 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="abRJyTTt" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391143AbfIEWTN (ORCPT ); Thu, 5 Sep 2019 18:19:13 -0400 Received: from aserp2120.oracle.com ([141.146.126.78]:59048 "EHLO aserp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391168AbfIEWTK (ORCPT ); Thu, 5 Sep 2019 18:19:10 -0400 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x85MJ9ar049766 for ; Thu, 5 Sep 2019 22:19:09 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-2019-08-05; bh=Bpi7oyhasazZ76A9g9ipp+qbXRDj7Mep/BZAus9Yy+Q=; b=abRJyTTtqxP3jwcDFSdyrHFFsapHBe9rDnUvHFMUwibJAiB6eSbB3cVBtkZvFabnR0kV 5L4aulJ9pgHiI6YhY7SoOLhfDnOhVO3cBHEbtYuFIZhTPiojcmp2iWaS0obZ2eCJqHIv AEArwlT/mFxRrwvIt1LbYdWKW3zxr/REfNNsbF2jgLAjb3m2KKncV+7pBggXNf6th38N g1bsrnAgf8HSczAc/lo+i7HycWe5/pAxeysfdvUfovFRPLFXg/jSKXJFUANQhnqzev1t zi2hv/emO966rX+IeR2vOeNGezLcRJbgcRS42w8M/H0rEVFmtX9PmgRh5KLd6k76Hy6q 9A== Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by aserp2120.oracle.com with ESMTP id 2uuarc820e-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 05 Sep 2019 22:19:08 +0000 Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x85MIO2N101652 for ; Thu, 5 Sep 2019 22:19:05 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserp3030.oracle.com with ESMTP id 2uu1b946uc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 05 Sep 2019 22:19:05 +0000 Received: from abhmp0005.oracle.com (abhmp0005.oracle.com [141.146.116.11]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id x85MJ5TR032574 for ; Thu, 5 Sep 2019 22:19:05 GMT Received: from localhost.localdomain (/67.1.183.122) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 05 Sep 2019 15:19:04 -0700 From: Allison Collins To: linux-xfs@vger.kernel.org Subject: [PATCH v2 17/21] xfsprogs: Add feature bit XFS_SB_FEAT_INCOMPAT_LOG_DELATTR Date: Thu, 5 Sep 2019 15:18:51 -0700 Message-Id: <20190905221855.17555-18-allison.henderson@oracle.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190905221855.17555-1-allison.henderson@oracle.com> References: <20190905221855.17555-1-allison.henderson@oracle.com> X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9371 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=1 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=899 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1906280000 definitions=main-1909050207 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9371 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=952 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1906280000 definitions=main-1909050207 Sender: linux-xfs-owner@vger.kernel.org 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 Collins --- libxfs/xfs_format.h | 11 ++++++++++- libxfs/xfs_fs.h | 1 + libxfs/xfs_sb.c | 2 ++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/libxfs/xfs_format.h b/libxfs/xfs_format.h index 144d716..53bcbce 100644 --- a/libxfs/xfs_format.h +++ b/libxfs/xfs_format.h @@ -479,7 +479,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( @@ -546,6 +548,13 @@ static inline bool xfs_sb_version_hasreflink(struct xfs_sb *sbp) (sbp->sb_features_ro_compat & XFS_SB_FEAT_RO_COMPAT_REFLINK); } +static inline bool xfs_sb_version_hasdelattr(struct xfs_sb *sbp) +{ + return (XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_5 && + (sbp->sb_features_log_incompat & + XFS_SB_FEAT_INCOMPAT_LOG_DELATTR)); +} + /* * end of superblock version macros */ diff --git a/libxfs/xfs_fs.h b/libxfs/xfs_fs.h index 67fceff..82f52bd 100644 --- a/libxfs/xfs_fs.h +++ b/libxfs/xfs_fs.h @@ -270,6 +270,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 << 21) /* delayed attributes */ /* * Minimum and maximum sizes need for growth checks. diff --git a/libxfs/xfs_sb.c b/libxfs/xfs_sb.c index d8a0431..519ac90 100644 --- a/libxfs/xfs_sb.c +++ b/libxfs/xfs_sb.c @@ -1109,6 +1109,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