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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E7CE7EB64D9 for ; Tue, 4 Jul 2023 15:53:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231514AbjGDPxQ (ORCPT ); Tue, 4 Jul 2023 11:53:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53468 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231417AbjGDPxP (ORCPT ); Tue, 4 Jul 2023 11:53:15 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DD88B10C1; Tue, 4 Jul 2023 08:53:14 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 73C47612AB; Tue, 4 Jul 2023 15:53:14 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CD1ADC433C8; Tue, 4 Jul 2023 15:53:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1688485993; bh=05GUbZGWViHpYScwdOptQrC014VGB+3GnS/6jW/OyEk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=IrA9/AYPXy775wyCVoOF2paSCBV6eVrM5jC/UewQsF9MRYIRqsIg5x3ylldYWDpOe qBl750WWFfgpsMJDuxRd28CAzwRwF41EwDAProhnJ9Uw4z4U6DRIH5ZlBLGzFXJQP3 pikiFhhsML5lc9oF8noxYl0oDBOEfX3nLWq9gmj53x9AddpK+/b9W2E680xqaVSwN1 zYb6RVU6Mi60rw70qAHcPxKHetS4bd0Nb6dXoNgYgeXz14Xy0py+qzmm77xXNol1CR cixUwxUyyXzg3F9sZXr7zm4wWQZ1vty861cJgG8AJI3cE5JW5iFBPyKyGZHGJEH3CK 9EsL8hr8RDBZg== Date: Tue, 4 Jul 2023 08:53:13 -0700 From: "Darrick J. Wong" To: Jan Kara Cc: linux-fsdevel@vger.kernel.org, linux-block@vger.kernel.org, Christoph Hellwig , Christian Brauner , Jens Axboe , Kees Cook , Ted Tso , syzkaller , Alexander Popov , Eric Biggers , linux-xfs@vger.kernel.org, linux-btrfs@vger.kernel.org, Dmitry Vyukov Subject: Re: [PATCH 3/6] xfs: Block writes to log device Message-ID: <20230704155313.GO11441@frogsfrogsfrogs> References: <20230704122727.17096-1-jack@suse.cz> <20230704125702.23180-3-jack@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230704125702.23180-3-jack@suse.cz> Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org On Tue, Jul 04, 2023 at 02:56:51PM +0200, Jan Kara wrote: > Ask block layer to not allow other writers to open block device used > for xfs log. "...for the xfs log and realtime devices." With that fixed, Reviewed-by: Darrick J. Wong --D > Signed-off-by: Jan Kara > --- > fs/xfs/xfs_super.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c > index b0fbf8ea7846..3808b4507552 100644 > --- a/fs/xfs/xfs_super.c > +++ b/fs/xfs/xfs_super.c > @@ -396,8 +396,9 @@ xfs_blkdev_get( > { > int error = 0; > > - *handlep = blkdev_get_by_path(name, BLK_OPEN_READ | BLK_OPEN_WRITE, > - mp, &xfs_holder_ops); > + *handlep = blkdev_get_by_path(name, > + BLK_OPEN_READ | BLK_OPEN_WRITE | BLK_OPEN_BLOCK_WRITES, > + mp, &xfs_holder_ops); > if (IS_ERR(*handlep)) { > error = PTR_ERR(*handlep); > xfs_warn(mp, "Invalid device [%s], error=%d", name, error); > -- > 2.35.3 >