From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 86935399892; Wed, 13 May 2026 05:58:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=213.95.11.211 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778651890; cv=none; b=Hjoy804OFQq0c6RumaVK3nUMD9qAq/TumN6yLcaHCWcemrW74AjhmGe9rurmMmIZ4FBA2V5OaNxRGYq6LYN/MJD1ilwFBmP4HA9i5d2xVN7ttSYV+EQre5WfMaPbl7GGphqN2jeMgMsSLe9w82N5Tfgmfbqz+y74fIIzc7kLQLM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778651890; c=relaxed/simple; bh=6gADW/r0Q2L91Ad7k458G1bjfrM1odyRd1gYZBQ6Klo=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=AKJm8fhxFOvKXISRLL2w5W0WqOmoKJO9ySyP8tIH10ldnKwu6jhsZKOoumxyAeDSwE5RZpUMIWblHls23WJrl6pdkqbw4bvI444/ciZ0SFg5ZIubi4F6jnqmWrJ61BFeo/35oH5rv+0buYAoSrCuuPPY+2WbhqAgA3WmxvZiKWM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lst.de; spf=pass smtp.mailfrom=lst.de; arc=none smtp.client-ip=213.95.11.211 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lst.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lst.de Received: by verein.lst.de (Postfix, from userid 2407) id 54A9368BEB; Wed, 13 May 2026 07:58:06 +0200 (CEST) Date: Wed, 13 May 2026 07:58:06 +0200 From: Christoph Hellwig To: "Darrick J. Wong" Cc: Christoph Hellwig , Andrew Morton , Chris Li , Kairui Song , Christian Brauner , Jens Axboe , David Sterba , Theodore Ts'o , Jaegeuk Kim , Chao Yu , Trond Myklebust , Anna Schumaker , Namjae Jeon , Hyunchul Lee , Steve French , Paulo Alcantara , Carlos Maiolino , Damien Le Moal , Naohiro Aota , linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-doc@vger.kernel.org, linux-mm@kvack.org, linux-block@vger.kernel.org, linux-btrfs@vger.kernel.org, linux-ext4@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-nfs@vger.kernel.org, linux-cifs@vger.kernel.org Subject: Re: [PATCH 09/12] swap: push down setting sis->bdev into ->swap_activate Message-ID: <20260513055806.GC1236@lst.de> References: <20260512053625.2950900-1-hch@lst.de> <20260512053625.2950900-10-hch@lst.de> <20260512170846.GJ9555@frogsfrogsfrogs> Precedence: bulk X-Mailing-List: linux-btrfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20260512170846.GJ9555@frogsfrogsfrogs> User-Agent: Mutt/1.5.17 (2007-11-01) On Tue, May 12, 2026 at 10:08:46AM -0700, Darrick J. Wong wrote: > > + /* Only one bdev per swap file for now. */ > > + if (!sis->bdev) > > + sis->bdev = bdev; > > + else if (bdev != sis->bdev) > > + return -EINVAL; > > Should this return error if the bdev is zoned? AFAICT XFS and zonefs > already guard against this, but other fses might be more naïve. Yes, now that the bdev is passed down to add_swap_extent we could consolidate the check here. 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 lists.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E2AABCD4851 for ; Wed, 13 May 2026 05:58:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.sourceforge.net; s=beta; h=Content-Transfer-Encoding:Content-Type:Cc: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: Subject:In-Reply-To:MIME-Version:References:Message-ID:To:From:Date:Sender: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=3oTQlcy6jiMfw9c6NkbhBAA+0KqaI7VkZQAG4aO4HN0=; b=Lww87K8xxcshUUnCRLSkezXmAC wuNKibPLaPvVsFh/hQiH0/uEv16MNTZabYWGITHmmbalc+B9wV3oq0IX7bRW+M14VyyRiblZE5EIB a2VHHrQlvyPRwr2zv35RYm7uZ70czLD8IZi2WFEawwFq++z5TypxMEKKnJyOTfIEVGGo=; Received: from [127.0.0.1] (helo=sfs-ml-4.v29.lw.sourceforge.com) by sfs-ml-4.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1wN2cJ-0006k2-Pu; Wed, 13 May 2026 05:58:47 +0000 Received: from [172.30.29.66] (helo=mx.sourceforge.net) by sfs-ml-4.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1wN2bs-0006jZ-83 for linux-f2fs-devel@lists.sourceforge.net; Wed, 13 May 2026 05:58:20 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=In-Reply-To:Content-Transfer-Encoding:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=5Jiz10ZDYj4IBN0PjLt8n74QKlzPqxshMpcaZgQjE+0=; b=UhetXyCpIk6KVpWs4Ced+FVsv+ XgBpSqrn2OW94pD2R1L4A+MZFosawHOLBow4VRxEINUbLMQ4fJ1R/MgFIQd4P7oOxlegzAH0q4FWf w1c75ShPQ6HyIy1FYIE2SmSUhgz9uWznuNEYiXjmv/tSGNE1fyRGxnAdIf4c5H/KwIyk=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=In-Reply-To:Content-Transfer-Encoding:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=5Jiz10ZDYj4IBN0PjLt8n74QKlzPqxshMpcaZgQjE+0=; b=KYKBrCnrI03q4XZeqN5L7H/Fjs 6Xq37vsFbGItRcZxtYD84tq7infiin6cEZ5N8VflpPAi8evHCI/W6A2NZFv4Hz7WTrW66W/m0RbB0 cjVWHttDDb/cQH9mzv3gsdRcJ1PMR6POhV4Opb4tVjU2/RV9JrNws2s6hmyCP4VKQlcA=; Received: from verein.lst.de ([213.95.11.211]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1wN2bq-0005M0-9g for linux-f2fs-devel@lists.sourceforge.net; Wed, 13 May 2026 05:58:20 +0000 Received: by verein.lst.de (Postfix, from userid 2407) id 54A9368BEB; Wed, 13 May 2026 07:58:06 +0200 (CEST) Date: Wed, 13 May 2026 07:58:06 +0200 From: Christoph Hellwig To: "Darrick J. Wong" Message-ID: <20260513055806.GC1236@lst.de> References: <20260512053625.2950900-1-hch@lst.de> <20260512053625.2950900-10-hch@lst.de> <20260512170846.GJ9555@frogsfrogsfrogs> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20260512170846.GJ9555@frogsfrogsfrogs> User-Agent: Mutt/1.5.17 (2007-11-01) X-Headers-End: 1wN2bq-0005M0-9g Subject: Re: [f2fs-dev] [PATCH 09/12] swap: push down setting sis->bdev into ->swap_activate X-BeenThere: linux-f2fs-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paulo Alcantara , linux-doc@vger.kernel.org, Carlos Maiolino , Hyunchul Lee , linux-mm@kvack.org, Christoph Hellwig , Naohiro Aota , linux-xfs@vger.kernel.org, linux-ext4@vger.kernel.org, Namjae Jeon , Chris Li , linux-nfs@vger.kernel.org, linux-block@vger.kernel.org, Damien Le Moal , David Sterba , Jaegeuk Kim , Jens Axboe , Christian Brauner , Kairui Song , Theodore Ts'o , linux-cifs@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, Steve French , linux-btrfs@vger.kernel.org, Anna Schumaker , linux-fsdevel@vger.kernel.org, Andrew Morton , Trond Myklebust Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net On Tue, May 12, 2026 at 10:08:46AM -0700, Darrick J. Wong wrote: > > + /* Only one bdev per swap file for now. */ > > + if (!sis->bdev) > > + sis->bdev =3D bdev; > > + else if (bdev !=3D sis->bdev) > > + return -EINVAL; > = > Should this return error if the bdev is zoned? AFAICT XFS and zonefs > already guard against this, but other fses might be more na=EFve. Yes, now that the bdev is passed down to add_swap_extent we could consolidate the check here. _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel