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-block@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.