From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 A8A4A379C54; Tue, 12 May 2026 07:11:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778569908; cv=none; b=Y6L6EMenhJ9j6t1NwTZAV7rzH2SloB5RuqzFSS5F4huiAYs1SbNcZ6hL6cNBDsHkgXMBIlC3tCx3+XARvaXG9G6hMpFv1FJ3XjgvAl7bs6e0uvfl7maNFYdNYZp6CzgfFajw4kJnwcWTWqWsXoSqN6aWyVCsMZ6GVm8t+G5cEHs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778569908; c=relaxed/simple; bh=oTkeOjEXbl4bVt9/z0YucKpdktlh9eD+Ruo6SFZVlhE=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=YBN395YteCwA71QDMpdpC9DQBKAGyhQnQhPAC1WbXFSKsVRebmnjLw5vmIigY+TbxOi2BGPKijHDQyV3jvbMvmRmDpQ67nMLP6qRF557qzIHRppNkSv1i61BzX1T7XsQXUseOk9EXjX+EWG3gI7vs6RZ2UkydRCMsCXuePZP3fA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=uv2j7SCC; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="uv2j7SCC" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C43CAC2BCB0; Tue, 12 May 2026 07:11:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1778569908; bh=oTkeOjEXbl4bVt9/z0YucKpdktlh9eD+Ruo6SFZVlhE=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=uv2j7SCChIAEuE5qdpNPXKPK9XFm+A2Y9VuBIpNTsBxttCqQYaWMN0rsAiGBhYiXY W3pwmePaa1PphsLrHjKeA35fljhz50Cf+sh/UmqmjHZbmcoHeYD5Gbne7/WO2GBTd2 X3X72l8mRd2d8MWemJYGD0xJlOv+/50gI2qzcROm9S82EYaVSziWoJ79GWnVZPb9VI y0PW2ETNW/5xkD7S679nuHkbfvAum5YdPX9FXUZGmYNyxPPQIPE/finUoal0Jy+h1y jtRPiHUDeIUQTue4219h+SzjEvAPoXvq5kSlP14yDV+lekrne4Xtwqu/qxgUIAGQNG tHvpg7vzQMTgA== Message-ID: Date: Tue, 12 May 2026 16:11:42 +0900 Precedence: bulk X-Mailing-List: linux-block@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 02/12] swap: move boilerplate code into the core swap code To: Christoph Hellwig , Andrew Morton , Chris Li , Kairui Song Cc: Christian Brauner , "Darrick J . Wong" , 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 , 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 References: <20260512053625.2950900-1-hch@lst.de> <20260512053625.2950900-3-hch@lst.de> Content-Language: en-US From: Damien Le Moal Organization: Western Digital Research In-Reply-To: <20260512053625.2950900-3-hch@lst.de> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 5/12/26 14:35, Christoph Hellwig wrote: > Make the core swap code calculate sis->pages, nr_extents and the span, > re-set sis->max based on it and don't require passing the current offset > into the swap file to swap_add_extent as all that can trivially be > calculated internally. Also truncate the spans based on the available > information. > > All this removes a lot of boilerplate code in the callers. > > Signed-off-by: Christoph Hellwig For the zonefs bits, Acked-by: Damien Le Moal -- Damien Le Moal Western Digital Research 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 0FFCACD4F26 for ; Tue, 12 May 2026 07:12:14 +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: Reply-To:From:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Subject:In-Reply-To:References:To:MIME-Version:Date: Message-ID:Sender:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=n8F9dMuQVn82K1W74HZ/fw/TCO9CfYxDs5flg7A0vVQ=; b=iMuftJj7XBAqPfTfQ9MvC2PwCl JBChAPFF0TZ+OYazxB83qd+BkRMlVibDEEE+ttK9mhU8cn4QALWXpX+YnWHI3av198V7IF2/MvHnb es1UHEwi0qbJfbI5ddwBzMFvVD/wC5t5q1MGiYvRheLMA0dU+Fq4av1/m43XhiIm5Eqo=; Received: from [127.0.0.1] (helo=sfs-ml-3.v29.lw.sourceforge.com) by sfs-ml-3.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1wMhHo-00057d-S2; Tue, 12 May 2026 07:12:13 +0000 Received: from [172.30.29.66] (helo=mx.sourceforge.net) by sfs-ml-3.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1wMhHd-00057G-2D for linux-f2fs-devel@lists.sourceforge.net; Tue, 12 May 2026 07:12:01 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:Content-Type:In-Reply-To: From:References:Cc:To:Subject:MIME-Version:Date:Message-ID: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=HqDV7IDs4hRtS25A7/4rvsfR7M1+1IrU1OOvisYqrvw=; b=HLf34JzWQKTXgrAgJ5gZ15nVSG 4s8AIUKVWyCTujpu/90WkaU4I3ZcwxeLKU8iAAk8DleP/6FxnWCIIbik9TJAVpDISQWHHCzcpeCNq yP+s+y0T4QcpPrbnNTAMD3dwvy2Blh8jRDYKpMeObbj5OB/9TBv7NX8aRO8Jv+3qE9ts=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:From:References:Cc:To: Subject:MIME-Version:Date:Message-ID: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=HqDV7IDs4hRtS25A7/4rvsfR7M1+1IrU1OOvisYqrvw=; b=jEHcopuRIYNlSRT+qyJ7VA0dZ8 /nPN0JKostL5m0XYAjhRJmR+QQuBkD/49SsKu9we4Bqsu4uOSIbsDk2X/vDApdXu7YJ0nDJeCTfdt GtSeGdMHHOoMcPfTsZaNo0sc/10m5rBTjmt+VdiJEfHf+i0RsTNY1LAqPbVzpNdw8XyI=; Received: from tor.source.kernel.org ([172.105.4.254]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1wMhHa-000192-Hr for linux-f2fs-devel@lists.sourceforge.net; Tue, 12 May 2026 07:12:01 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by tor.source.kernel.org (Postfix) with ESMTP id 5AF866001A; Tue, 12 May 2026 07:11:48 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C43CAC2BCB0; Tue, 12 May 2026 07:11:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1778569908; bh=oTkeOjEXbl4bVt9/z0YucKpdktlh9eD+Ruo6SFZVlhE=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=uv2j7SCChIAEuE5qdpNPXKPK9XFm+A2Y9VuBIpNTsBxttCqQYaWMN0rsAiGBhYiXY W3pwmePaa1PphsLrHjKeA35fljhz50Cf+sh/UmqmjHZbmcoHeYD5Gbne7/WO2GBTd2 X3X72l8mRd2d8MWemJYGD0xJlOv+/50gI2qzcROm9S82EYaVSziWoJ79GWnVZPb9VI y0PW2ETNW/5xkD7S679nuHkbfvAum5YdPX9FXUZGmYNyxPPQIPE/finUoal0Jy+h1y jtRPiHUDeIUQTue4219h+SzjEvAPoXvq5kSlP14yDV+lekrne4Xtwqu/qxgUIAGQNG tHvpg7vzQMTgA== Message-ID: Date: Tue, 12 May 2026 16:11:42 +0900 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird To: Christoph Hellwig , Andrew Morton , Chris Li , Kairui Song References: <20260512053625.2950900-1-hch@lst.de> <20260512053625.2950900-3-hch@lst.de> Content-Language: en-US Organization: Western Digital Research In-Reply-To: <20260512053625.2950900-3-hch@lst.de> X-Headers-End: 1wMhHa-000192-Hr Subject: Re: [f2fs-dev] [PATCH 02/12] swap: move boilerplate code into the core swap code 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: , From: Damien Le Moal via Linux-f2fs-devel Reply-To: Damien Le Moal Cc: Paulo Alcantara , linux-doc@vger.kernel.org, "Darrick J . Wong" , Carlos Maiolino , Hyunchul Lee , linux-mm@kvack.org, Naohiro Aota , linux-xfs@vger.kernel.org, linux-ext4@vger.kernel.org, Namjae Jeon , linux-cifs@vger.kernel.org, linux-nfs@vger.kernel.org, linux-block@vger.kernel.org, David Sterba , Jaegeuk Kim , Jens Axboe , Christian Brauner , Theodore Ts'o , linux-f2fs-devel@lists.sourceforge.net, Steve French , Trond Myklebust , Anna Schumaker , linux-fsdevel@vger.kernel.org, linux-btrfs@vger.kernel.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net On 5/12/26 14:35, Christoph Hellwig wrote: > Make the core swap code calculate sis->pages, nr_extents and the span, > re-set sis->max based on it and don't require passing the current offset > into the swap file to swap_add_extent as all that can trivially be > calculated internally. Also truncate the spans based on the available > information. > > All this removes a lot of boilerplate code in the callers. > > Signed-off-by: Christoph Hellwig For the zonefs bits, Acked-by: Damien Le Moal -- Damien Le Moal Western Digital Research _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel