Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3021317pxk; Mon, 7 Sep 2020 00:13:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwbsbYAfW3gjXVV7MKOdZ3ZECI8SViV6L70e3mLvdPZn6fe1pOW0Pz7avKvrQVc3Lx31LYX X-Received: by 2002:a05:6402:6c1:: with SMTP id n1mr20819064edy.215.1599462832380; Mon, 07 Sep 2020 00:13:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599462832; cv=none; d=google.com; s=arc-20160816; b=nxkxKJguqSNZgAzwJMkKeuLEkIv9oPBr7ht0M6kGCF8ZJW4B6QYoy5PS6KZ7T3d8Lg f4F3uAnS8ySVFyKXt1VIKNF+0uHcjc0220VfEQNJoQ7vClAjAw8eUaaqm/ebSpjN4MLj xlOIAPwpbR8IVTsmhvYTWQuxZhHq7aEjg/cOlB2NhcvHmWcff6c5uBFUc0w5ybXu1OKx quKPR24Q/50hIpvoNgMXRW7pGraSbyJ/FD/ducfzphaKjQgpqRKzIBTHuCVLHpH62cJ8 24iGmpwBvqZIrx5wIFMWwJhlan4F0KwPJAE5wKvzO0PU6bfEfDqLEXGfGZiJvvtG1Mwa t6pQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=t/uLsl5AXin2cAViLg4Mxi6tBTprZgEYc53F0H7n0lo=; b=xTIot7S/m+k6zYGcQ2vPMrisfgWAGQaN4AcBsGpbXWI5sT+zLMiYUQQJLoPfnxG1DU sgJCcf/S1gge7LbcW1OiYilwJRm5XbhW1xodAOHZnorUnSR7B+IE+dE0s/tTvQEkP3nV pypsWw58wjUSnSCwh2FL5rBnt2slDX0zZk8mj0v6M55CjomgHaSyFvXsNMPnOEN2hhb4 JFDHwRZQZEfXbVbW43JHVVgiMvmpqQCjzBAWDbgmIU4R7aUy+J6qbFXeak+vlXEVPRA/ LV+6mfcxjFJOP7K86tgkJ71msCAxGJXE+QMoAyDmJZBmjVCj4pR+B14WhLcPws2vvT3V jo+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=sq7Wdxpx; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 7si48758edx.162.2020.09.07.00.13.29; Mon, 07 Sep 2020 00:13:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=sq7Wdxpx; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726841AbgIGHNM (ORCPT + 99 others); Mon, 7 Sep 2020 03:13:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60428 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726802AbgIGHNL (ORCPT ); Mon, 7 Sep 2020 03:13:11 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5B8A4C061573; Mon, 7 Sep 2020 00:13:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=t/uLsl5AXin2cAViLg4Mxi6tBTprZgEYc53F0H7n0lo=; b=sq7WdxpxnmMJ8WWESWXfPZpLsN Tff3aZz7wGmc+yxuGIUKAuDFJMRtdrK2lzhPQYUrK7JR4PMlY9vv3ZYL3q4fA+WALY9KdGFNRvJQX e7hNeZwLHyMzrHqkIOKD4ZP8rrRjFTnfq60NziD4ekdtp/gCdFPnYchURqD5g2UVibjXB9/oaDLq5 ElDFa6fffnZ1Qm3ErZispjREou77C+6jznLHmUJ1xrZV6ahhV73Ct3zuH4SlsVI86YYsx/XYNkLn8 BUDDKVnynTd1B6kQCG+HdVWyvbrhHBgXFSZ+peUShI+YET9c+XnQrnE/rtUsi8jIHziwRfBNNjvH/ cLuN7X3Q==; Received: from hch by casper.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1kFBKv-0007NJ-0x; Mon, 07 Sep 2020 07:13:09 +0000 Date: Mon, 7 Sep 2020 08:13:08 +0100 From: Christoph Hellwig To: Ritesh Harjani Cc: linux-ext4@vger.kernel.org, jack@suse.cz, tytso@mit.edu, linux-fsdevel@vger.kernel.org, darrick.wong@oracle.com, linux-kernel@vger.kernel.org, Yuxuan Shui Subject: Re: [PATCH] ext4: Implement swap_activate aops using iomap Message-ID: <20200907071308.GC27898@infradead.org> References: <20200904091653.1014334-1-riteshh@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200904091653.1014334-1-riteshh@linux.ibm.com> X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Fri, Sep 04, 2020 at 02:46:53PM +0530, Ritesh Harjani wrote: > After moving ext4's bmap to iomap interface, swapon functionality > on files created using fallocate (which creates unwritten extents) are > failing. This is since iomap_bmap interface returns 0 for unwritten > extents and thus generic_swapfile_activate considers this as holes > and hence bail out with below kernel msg :- > > [340.915835] swapon: swapfile has holes > > To fix this we need to implement ->swap_activate aops in ext4 > which will use ext4_iomap_report_ops. Since we only need to return > the list of extents so ext4_iomap_report_ops should be enough. Looks good, Reviewed-by: Christoph Hellwig