Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp25073iog; Tue, 28 Jun 2022 14:04:06 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tmGtj7aTWsAxT8GDrXrz/KH+w7rCQfkM4qpsK7EvEzyCfO4qAr94dSXvzyBNDuhYnYtBmt X-Received: by 2002:a50:ed8a:0:b0:435:6582:6864 with SMTP id h10-20020a50ed8a000000b0043565826864mr25481613edr.417.1656450246493; Tue, 28 Jun 2022 14:04:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656450246; cv=none; d=google.com; s=arc-20160816; b=F7RnkylRe124x3VoXSECiQgnw1VVVlZK6abWPTXQf6cONTLIkSNR0bwoJ2vKKYqtpf xyxbfNfli3QDFcEzr3xsILvhcoROzaSHxUZFQmNwIbWQKZVH71ju9zOZl70bxWIbbckp MBVxzP+Ui9U4BKpzlF0qWkwmPdqK7Mzk6COaxSMkSIVM4MHdxvSILoEqJrHQp8gMrUiR +ZEdrFf3jfVhqXxSE0imzhp525BRgzAt9g1WYHHnq36CpRtY+/mDnQOaTEAQ8UI7aonl HHT1vi392h2HysDvCy9dPO83FrotWT+APbxMEqRbQotArdZu7MBht0WF7O4UEdNMmztj uPMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=AxAXLtt/qHvFpa3MozdupVmWHjm0h9gbo/SJ35DEqEU=; b=W4B4Oma4s/odlJsdpOR9SoaYIU3me/iCGb7j4zQNeK222ShYb/5CJ8Iu1NcWSBTcvy dBsC5cdaE3iCXqi3vUrYcqQYD+XeZDhuDuV7RAaTwRrCQKfUkpmJDNMx4KTXxzg0sy+d L3iiNhP2kK9W11QFUCVT82mBX5d9vzJ4e2jqi/ymfWFOAPCFllWa6iI30saGLC+ys1Y9 mkrjMd/ztfqUi64DzjP6GekgQLCTS5hssUKGidm0uVHW+BznC5I1RbdAbQYS17uurfri 8m5QCvaFUa59fYCPapBMqQFmVO7UcEVAmddcvM7wlxuAMtQbZKoeJmbqn3DB+Nh8Mxmy FZRA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=AkvC6jv+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u18-20020a1709067d1200b007121245807esi5111601ejo.708.2022.06.28.14.03.32; Tue, 28 Jun 2022 14:04:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=AkvC6jv+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231429AbiF1Uqi (ORCPT + 99 others); Tue, 28 Jun 2022 16:46:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33250 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231205AbiF1UqZ (ORCPT ); Tue, 28 Jun 2022 16:46:25 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id CE2BA26540 for ; Tue, 28 Jun 2022 13:46:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1656449183; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=AxAXLtt/qHvFpa3MozdupVmWHjm0h9gbo/SJ35DEqEU=; b=AkvC6jv+M37tgpOP65vZH4/4cdLNg3KsGNIqLJpZKcQovLqmu6XRqAL/E+xQzzBvPA/mZ4 WkULmqeik0ZydXo40p3c0Rymj/7SuMfvC45W7gNwaXVWxaSQ2emh8NXYpuwYLNujyBovb7 VXso10Bg1jB0eHpYgmo+Jb51vbLycgs= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-479-Jj1d7vLEMh2BLGWcJF-AOw-1; Tue, 28 Jun 2022 16:46:20 -0400 X-MC-Unique: Jj1d7vLEMh2BLGWcJF-AOw-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id E737818A6584; Tue, 28 Jun 2022 20:46:19 +0000 (UTC) Received: from max.localdomain (unknown [10.40.193.19]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0026C40D282F; Tue, 28 Jun 2022 20:46:18 +0000 (UTC) From: Andreas Gruenbacher To: cluster-devel@redhat.com Cc: Andreas Gruenbacher , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, "Eric W. Biederman" Subject: [PATCH 5/5] gfs2: Mark the remaining process-independent glock holders as GL_NOPID Date: Tue, 28 Jun 2022 22:46:11 +0200 Message-Id: <20220628204611.651126-6-agruenba@redhat.com> In-Reply-To: <20220628204611.651126-1-agruenba@redhat.com> References: <20220628204611.651126-1-agruenba@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.84 on 10.11.54.2 X-Spam-Status: No, score=-3.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add the GL_NOPID flag for the remaining glock holders which are not associated with the current process. Signed-off-by: Andreas Gruenbacher --- fs/gfs2/inode.c | 6 ++++-- fs/gfs2/ops_fstype.c | 14 ++++++++------ fs/gfs2/super.c | 3 ++- fs/gfs2/util.c | 6 ++++-- 4 files changed, 18 insertions(+), 11 deletions(-) diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c index c8ec876f33ea..e211ed8636b5 100644 --- a/fs/gfs2/inode.c +++ b/fs/gfs2/inode.c @@ -143,7 +143,8 @@ struct inode *gfs2_inode_lookup(struct super_block *sb, unsigned int type, if (blktype != GFS2_BLKST_UNLINKED) gfs2_cancel_delete_work(io_gl); - error = gfs2_glock_nq_init(io_gl, LM_ST_SHARED, GL_EXACT, + error = gfs2_glock_nq_init(io_gl, LM_ST_SHARED, + GL_EXACT | GL_NOPID, &ip->i_iopen_gh); gfs2_glock_put(io_gl); if (unlikely(error)) @@ -720,7 +721,8 @@ static int gfs2_create_inode(struct inode *dir, struct dentry *dentry, error = insert_inode_locked4(inode, ip->i_no_addr, iget_test, &ip->i_no_addr); BUG_ON(error); - error = gfs2_glock_nq_init(io_gl, LM_ST_SHARED, GL_EXACT, &ip->i_iopen_gh); + error = gfs2_glock_nq_init(io_gl, LM_ST_SHARED, GL_EXACT | GL_NOPID, + &ip->i_iopen_gh); if (error) goto fail_gunlock2; diff --git a/fs/gfs2/ops_fstype.c b/fs/gfs2/ops_fstype.c index c9b423c874a3..904a2d47c4b3 100644 --- a/fs/gfs2/ops_fstype.c +++ b/fs/gfs2/ops_fstype.c @@ -403,7 +403,8 @@ static int init_locking(struct gfs2_sbd *sdp, struct gfs2_holder *mount_gh, error = gfs2_glock_nq_num(sdp, GFS2_MOUNT_LOCK, &gfs2_nondisk_glops, - LM_ST_EXCLUSIVE, LM_FLAG_NOEXP | GL_NOCACHE, + LM_ST_EXCLUSIVE, + LM_FLAG_NOEXP | GL_NOCACHE | GL_NOPID, mount_gh); if (error) { fs_err(sdp, "can't acquire mount glock: %d\n", error); @@ -413,7 +414,7 @@ static int init_locking(struct gfs2_sbd *sdp, struct gfs2_holder *mount_gh, error = gfs2_glock_nq_num(sdp, GFS2_LIVE_LOCK, &gfs2_nondisk_glops, LM_ST_SHARED, - LM_FLAG_NOEXP | GL_EXACT, + LM_FLAG_NOEXP | GL_EXACT | GL_NOPID, &sdp->sd_live_gh); if (error) { fs_err(sdp, "can't acquire live glock: %d\n", error); @@ -689,7 +690,7 @@ static int init_statfs(struct gfs2_sbd *sdp) iput(pn); pn = NULL; ip = GFS2_I(sdp->sd_sc_inode); - error = gfs2_glock_nq_init(ip->i_gl, LM_ST_EXCLUSIVE, 0, + error = gfs2_glock_nq_init(ip->i_gl, LM_ST_EXCLUSIVE, GL_NOPID, &sdp->sd_sc_gh); if (error) { fs_err(sdp, "can't lock local \"sc\" file: %d\n", error); @@ -778,7 +779,7 @@ static int init_journal(struct gfs2_sbd *sdp, int undo) error = gfs2_glock_nq_num(sdp, sdp->sd_lockstruct.ls_jid, &gfs2_journal_glops, LM_ST_EXCLUSIVE, - LM_FLAG_NOEXP | GL_NOCACHE, + LM_FLAG_NOEXP | GL_NOCACHE | GL_NOPID, &sdp->sd_journal_gh); if (error) { fs_err(sdp, "can't acquire journal glock: %d\n", error); @@ -788,7 +789,8 @@ static int init_journal(struct gfs2_sbd *sdp, int undo) ip = GFS2_I(sdp->sd_jdesc->jd_inode); sdp->sd_jinode_gl = ip->i_gl; error = gfs2_glock_nq_init(ip->i_gl, LM_ST_SHARED, - LM_FLAG_NOEXP | GL_EXACT | GL_NOCACHE, + LM_FLAG_NOEXP | GL_EXACT | + GL_NOCACHE | GL_NOPID, &sdp->sd_jinode_gh); if (error) { fs_err(sdp, "can't acquire journal inode glock: %d\n", @@ -959,7 +961,7 @@ static int init_per_node(struct gfs2_sbd *sdp, int undo) pn = NULL; ip = GFS2_I(sdp->sd_qc_inode); - error = gfs2_glock_nq_init(ip->i_gl, LM_ST_EXCLUSIVE, 0, + error = gfs2_glock_nq_init(ip->i_gl, LM_ST_EXCLUSIVE, GL_NOPID, &sdp->sd_qc_gh); if (error) { fs_err(sdp, "can't lock local \"qc\" file: %d\n", error); diff --git a/fs/gfs2/super.c b/fs/gfs2/super.c index bdb773e5c88f..90db4a289269 100644 --- a/fs/gfs2/super.c +++ b/fs/gfs2/super.c @@ -346,7 +346,8 @@ static int gfs2_lock_fs_check_clean(struct gfs2_sbd *sdp) } error = gfs2_glock_nq_init(sdp->sd_freeze_gl, LM_ST_EXCLUSIVE, - LM_FLAG_NOEXP, &sdp->sd_freeze_gh); + LM_FLAG_NOEXP | GL_NOPID, + &sdp->sd_freeze_gh); if (error) goto out; diff --git a/fs/gfs2/util.c b/fs/gfs2/util.c index 8241029a2a5d..95d733dd3c25 100644 --- a/fs/gfs2/util.c +++ b/fs/gfs2/util.c @@ -226,7 +226,8 @@ static void signal_our_withdraw(struct gfs2_sbd *sdp) */ fs_warn(sdp, "Requesting recovery of jid %d.\n", sdp->sd_lockstruct.ls_jid); - gfs2_holder_reinit(LM_ST_EXCLUSIVE, LM_FLAG_TRY_1CB | LM_FLAG_NOEXP, + gfs2_holder_reinit(LM_ST_EXCLUSIVE, + LM_FLAG_TRY_1CB | LM_FLAG_NOEXP | GL_NOPID, &sdp->sd_live_gh); msleep(GL_GLOCK_MAX_HOLD); /* @@ -251,7 +252,8 @@ static void signal_our_withdraw(struct gfs2_sbd *sdp) fs_warn(sdp, "Unable to recover our journal jid %d.\n", sdp->sd_lockstruct.ls_jid); gfs2_glock_dq_wait(&sdp->sd_live_gh); - gfs2_holder_reinit(LM_ST_SHARED, LM_FLAG_NOEXP | GL_EXACT, + gfs2_holder_reinit(LM_ST_SHARED, + LM_FLAG_NOEXP | GL_EXACT | GL_NOPID, &sdp->sd_live_gh); gfs2_glock_nq(&sdp->sd_live_gh); } -- 2.35.1