From patchwork Thu Feb 7 00:03:33 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: NeilBrown X-Patchwork-Id: 10800319 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 80F6813B4 for ; Thu, 7 Feb 2019 00:07:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6DE6D2D4FB for ; Thu, 7 Feb 2019 00:07:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5FF5B2D632; Thu, 7 Feb 2019 00:07:02 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from pdx1-mailman02.dreamhost.com (pdx1-mailman02.dreamhost.com [64.90.62.194]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 02ACD2D4FB for ; Thu, 7 Feb 2019 00:07:02 +0000 (UTC) Received: from pdx1-mailman02.dreamhost.com (localhost [IPv6:::1]) by pdx1-mailman02.dreamhost.com (Postfix) with ESMTP id C677F4C3CA4; Wed, 6 Feb 2019 16:07:01 -0800 (PST) X-Original-To: lustre-devel@lists.lustre.org Delivered-To: lustre-devel-lustre.org@pdx1-mailman02.dreamhost.com Received: from mx1.suse.de (mx2.suse.de [195.135.220.15]) by pdx1-mailman02.dreamhost.com (Postfix) with ESMTP id 1ED814C39B7 for ; Wed, 6 Feb 2019 16:06:59 -0800 (PST) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 951CCADE5; Thu, 7 Feb 2019 00:06:57 +0000 (UTC) From: NeilBrown To: Andreas Dilger , James Simmons , Oleg Drokin Date: Thu, 07 Feb 2019 11:03:33 +1100 Message-ID: <154949781317.10620.17224594880512218856.stgit@noble.brown> In-Reply-To: <154949776249.10620.1215070753973826063.stgit@noble.brown> References: <154949776249.10620.1215070753973826063.stgit@noble.brown> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Subject: [lustre-devel] [PATCH 12/21] lustre: cl_page.c: remove PINVRNT() 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 Errors-To: lustre-devel-bounces@lists.lustre.org Sender: "lustre-devel" X-Virus-Scanned: ClamAV using ClamSMTP This macro does nothing (it once was like 'assert'), so remove it. Signed-off-by: NeilBrown Reviewed-by: Andreas Dilger Reviewed-by: James Simmons --- drivers/staging/lustre/lustre/obdclass/cl_page.c | 33 ---------------------- 1 file changed, 33 deletions(-) diff --git a/drivers/staging/lustre/lustre/obdclass/cl_page.c b/drivers/staging/lustre/lustre/obdclass/cl_page.c index 7d00a9233a3b..31ded52e0499 100644 --- a/drivers/staging/lustre/lustre/obdclass/cl_page.c +++ b/drivers/staging/lustre/lustre/obdclass/cl_page.c @@ -55,9 +55,6 @@ static void __cl_page_delete(const struct lu_env *env, struct cl_page *pg); } \ } while (0) -# define PINVRNT(env, page, exp) \ - ((void)sizeof(env), (void)sizeof(page), (void)sizeof !!(exp)) - /** * Internal version of cl_page_get(). * @@ -382,8 +379,6 @@ void __cl_page_disown(const struct lu_env *env, enum cl_page_state state; state = pg->cp_state; - PINVRNT(env, pg, state == CPS_OWNED || state == CPS_FREEING); - PINVRNT(env, pg, cl_page_invariant(pg) || state == CPS_FREEING); cl_page_owner_clear(pg); if (state == CPS_OWNED) @@ -437,8 +432,6 @@ static int __cl_page_own(const struct lu_env *env, struct cl_io *io, const struct cl_page_slice *slice; int result = 0; - PINVRNT(env, pg, !cl_page_is_owned(pg, io)); - io = cl_io_top(io); if (pg->cp_state == CPS_FREEING) { @@ -468,7 +461,6 @@ static int __cl_page_own(const struct lu_env *env, struct cl_io *io, } } out: - PINVRNT(env, pg, ergo(result == 0, cl_page_invariant(pg))); return result; } @@ -510,8 +502,6 @@ void cl_page_assume(const struct lu_env *env, { const struct cl_page_slice *slice; - PINVRNT(env, pg, cl_object_same(pg->cp_obj, io->ci_obj)); - io = cl_io_top(io); list_for_each_entry(slice, &pg->cp_layers, cpl_linkage) { @@ -542,9 +532,6 @@ void cl_page_unassume(const struct lu_env *env, { const struct cl_page_slice *slice; - PINVRNT(env, pg, cl_page_is_owned(pg, io)); - PINVRNT(env, pg, cl_page_invariant(pg)); - io = cl_io_top(io); cl_page_owner_clear(pg); cl_page_state_set(env, pg, CPS_CACHED); @@ -570,9 +557,6 @@ EXPORT_SYMBOL(cl_page_unassume); void cl_page_disown(const struct lu_env *env, struct cl_io *io, struct cl_page *pg) { - PINVRNT(env, pg, cl_page_is_owned(pg, io) || - pg->cp_state == CPS_FREEING); - io = cl_io_top(io); __cl_page_disown(env, io, pg); } @@ -593,9 +577,6 @@ void cl_page_discard(const struct lu_env *env, { const struct cl_page_slice *slice; - PINVRNT(env, pg, cl_page_is_owned(pg, io)); - PINVRNT(env, pg, cl_page_invariant(pg)); - list_for_each_entry(slice, &pg->cp_layers, cpl_linkage) { if (slice->cpl_ops->cpo_discard) (*slice->cpl_ops->cpo_discard)(env, slice, io); @@ -652,7 +633,6 @@ static void __cl_page_delete(const struct lu_env *env, struct cl_page *pg) */ void cl_page_delete(const struct lu_env *env, struct cl_page *pg) { - PINVRNT(env, pg, cl_page_invariant(pg)); __cl_page_delete(env, pg); } EXPORT_SYMBOL(cl_page_delete); @@ -670,8 +650,6 @@ void cl_page_export(const struct lu_env *env, struct cl_page *pg, int uptodate) { const struct cl_page_slice *slice; - PINVRNT(env, pg, cl_page_invariant(pg)); - list_for_each_entry(slice, &pg->cp_layers, cpl_linkage) { if (slice->cpl_ops->cpo_export) (*slice->cpl_ops->cpo_export)(env, slice, uptodate); @@ -730,10 +708,6 @@ int cl_page_prep(const struct lu_env *env, struct cl_io *io, const struct cl_page_slice *slice; int result = 0; - PINVRNT(env, pg, cl_page_is_owned(pg, io)); - PINVRNT(env, pg, cl_page_invariant(pg)); - PINVRNT(env, pg, crt < CRT_NR); - /* * XXX this has to be called bottom-to-top, so that llite can set up * PG_writeback without risking other layers deciding to skip this @@ -819,8 +793,6 @@ int cl_page_make_ready(const struct lu_env *env, struct cl_page *pg, const struct cl_page_slice *sli; int result = 0; - PINVRNT(env, pg, crt < CRT_NR); - if (crt >= CRT_NR) return -EINVAL; @@ -856,9 +828,6 @@ int cl_page_flush(const struct lu_env *env, struct cl_io *io, const struct cl_page_slice *slice; int result = 0; - PINVRNT(env, pg, cl_page_is_owned(pg, io)); - PINVRNT(env, pg, cl_page_invariant(pg)); - list_for_each_entry(slice, &pg->cp_layers, cpl_linkage) { if (slice->cpl_ops->cpo_flush) result = (*slice->cpl_ops->cpo_flush)(env, slice, io); @@ -883,8 +852,6 @@ void cl_page_clip(const struct lu_env *env, struct cl_page *pg, { const struct cl_page_slice *slice; - PINVRNT(env, pg, cl_page_invariant(pg)); - CL_PAGE_HEADER(D_TRACE, env, pg, "%d %d\n", from, to); list_for_each_entry(slice, &pg->cp_layers, cpl_linkage) {