From patchwork Mon Sep 30 18:56:18 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Simmons X-Patchwork-Id: 11167221 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 E685A13B1 for ; Mon, 30 Sep 2019 19:04:04 +0000 (UTC) Received: from pdx1-mailman02.dreamhost.com (pdx1-mailman02.dreamhost.com [64.90.62.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id CE99D224EF for ; Mon, 30 Sep 2019 19:04:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CE99D224EF Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lustre-devel-bounces@lists.lustre.org Received: from pdx1-mailman02.dreamhost.com (localhost [IPv6:::1]) by pdx1-mailman02.dreamhost.com (Postfix) with ESMTP id C50695E4651; Mon, 30 Sep 2019 11:59:53 -0700 (PDT) X-Original-To: lustre-devel@lists.lustre.org Delivered-To: lustre-devel-lustre.org@pdx1-mailman02.dreamhost.com Received: from smtp4.ccs.ornl.gov (smtp4.ccs.ornl.gov [160.91.203.40]) by pdx1-mailman02.dreamhost.com (Postfix) with ESMTP id DC0B15C3B96 for ; Mon, 30 Sep 2019 11:57:36 -0700 (PDT) Received: from star.ccs.ornl.gov (star.ccs.ornl.gov [160.91.202.134]) by smtp4.ccs.ornl.gov (Postfix) with ESMTP id A4C701005F1C; Mon, 30 Sep 2019 14:56:57 -0400 (EDT) Received: by star.ccs.ornl.gov (Postfix, from userid 2004) id A3A0FA9; Mon, 30 Sep 2019 14:56:57 -0400 (EDT) From: James Simmons To: Andreas Dilger , Oleg Drokin , NeilBrown Date: Mon, 30 Sep 2019 14:56:18 -0400 Message-Id: <1569869810-23848-120-git-send-email-jsimmons@infradead.org> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1569869810-23848-1-git-send-email-jsimmons@infradead.org> References: <1569869810-23848-1-git-send-email-jsimmons@infradead.org> Subject: [lustre-devel] [PATCH 119/151] lustre: uapi: rename LCM_FL_NOT_FLR to LCM_FL_NONE X-BeenThere: lustre-devel@lists.lustre.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "For discussing Lustre software development." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Lustre Development List MIME-Version: 1.0 Errors-To: lustre-devel-bounces@lists.lustre.org Sender: "lustre-devel" From: Andreas Dilger Having "lfs getstripe" print out "lcm_flags: not_flr" is not very useful, as the composite files may not relate to FLR (e.g. PFL). Rename "LCM_FL_NOT_FLR" to "LCM_FL_NONE" so it is more clear there are no composite flags on the layout. Print out "0" for flags if no flags are set, to match old behaviour. WC-bug-id: https://jira.whamcloud.com/browse/LU-9771 Lustre-commit: fa15e5347c2e ("LU-9771 util: rename LCM_FL_NOT_FLR to LCM_FL_NONE") Signed-off-by: Andreas Dilger Reviewed-on: https://review.whamcloud.com/31047 Reviewed-by: Bobi Jam Reviewed-by: Jian Yu Reviewed-by: Jinshan Xiong Reviewed-by: Oleg Drokin Signed-off-by: James Simmons --- fs/lustre/lov/lov_cl_internal.h | 4 ++-- fs/lustre/lov/lov_object.c | 4 ++-- fs/lustre/ptlrpc/wiretest.c | 4 ++-- include/uapi/linux/lustre/lustre_user.h | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/fs/lustre/lov/lov_cl_internal.h b/fs/lustre/lov/lov_cl_internal.h index 4ab8fba..875af37 100644 --- a/fs/lustre/lov/lov_cl_internal.h +++ b/fs/lustre/lov/lov_cl_internal.h @@ -354,14 +354,14 @@ static inline struct lov_stripe_md_entry *lov_lse(struct lov_object *lov, int i) static inline unsigned int lov_flr_state(const struct lov_object *lov) { if (lov->lo_type != LLT_COMP) - return LCM_FL_NOT_FLR; + return LCM_FL_NONE; return lov->u.composite.lo_flags & LCM_FL_FLR_MASK; } static inline bool lov_is_flr(const struct lov_object *lov) { - return lov_flr_state(lov) != LCM_FL_NOT_FLR; + return lov_flr_state(lov) != LCM_FL_NONE; } static inline struct lov_layout_entry *lov_entry(struct lov_object *lov, int i) diff --git a/fs/lustre/lov/lov_object.c b/fs/lustre/lov/lov_object.c index 51b95f2..6ba821b 100644 --- a/fs/lustre/lov/lov_object.c +++ b/fs/lustre/lov/lov_object.c @@ -629,7 +629,7 @@ static int lov_init_composite(const struct lu_env *env, struct lov_device *dev, comp->lo_entry_count = lsm->lsm_entry_count; comp->lo_preferred_mirror = -1; - if (equi(flr_state == LCM_FL_NOT_FLR, comp->lo_mirror_count > 1)) + if (equi(flr_state == LCM_FL_NONE, comp->lo_mirror_count > 1)) return -EINVAL; comp->lo_mirrors = kcalloc(comp->lo_mirror_count, @@ -669,7 +669,7 @@ static int lov_init_composite(const struct lu_env *env, struct lov_device *dev, lle->lle_extent = &lle->lle_lsme->lsme_extent; lle->lle_valid = !(lle->lle_lsme->lsme_flags & LCME_FL_STALE); - if (flr_state != LCM_FL_NOT_FLR) + if (flr_state != LCM_FL_NONE) mirror_id = mirror_id_of(lle->lle_lsme->lsme_id); lre = &comp->lo_mirrors[j]; diff --git a/fs/lustre/ptlrpc/wiretest.c b/fs/lustre/ptlrpc/wiretest.c index e161fe6..70ed2cd 100644 --- a/fs/lustre/ptlrpc/wiretest.c +++ b/fs/lustre/ptlrpc/wiretest.c @@ -1542,8 +1542,8 @@ void lustre_assert_wire_constants(void) LASSERTF((int)sizeof(((struct lov_comp_md_v1 *)0)->lcm_entries[0]) == 48, "found %lld\n", (long long)(int)sizeof(((struct lov_comp_md_v1 *)0)->lcm_entries[0])); BUILD_BUG_ON(LOV_MAGIC_COMP_V1 != (0x0BD60000 | 0x0BD0)); - LASSERTF(LCM_FL_NOT_FLR == 0, "found %lld\n", - (long long)LCM_FL_NOT_FLR); + LASSERTF(LCM_FL_NONE == 0, "found %lld\n", + (long long)LCM_FL_NONE); LASSERTF(LCM_FL_RDONLY == 1, "found %lld\n", (long long)LCM_FL_RDONLY); LASSERTF(LCM_FL_WRITE_PENDING == 2, "found %lld\n", diff --git a/include/uapi/linux/lustre/lustre_user.h b/include/uapi/linux/lustre/lustre_user.h index cea7d13..4e673cd 100644 --- a/include/uapi/linux/lustre/lustre_user.h +++ b/include/uapi/linux/lustre/lustre_user.h @@ -530,7 +530,7 @@ static inline __u16 mirror_id_of(__u32 id) */ enum lov_comp_md_flags { /* the least 2 bits are used by FLR to record file state */ - LCM_FL_NOT_FLR = 0, + LCM_FL_NONE = 0, LCM_FL_RDONLY = 1, LCM_FL_WRITE_PENDING = 2, LCM_FL_SYNC_PENDING = 3,