Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp379952pxk; Thu, 24 Sep 2020 07:50:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyykUA76sQcj2H94Z/SXgl8VxV1FqX4+rvlcOBk6+7b98O5DJ4CKeJVq48FHMehiuMNG/vz X-Received: by 2002:aa7:d501:: with SMTP id y1mr263549edq.29.1600959042095; Thu, 24 Sep 2020 07:50:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600959042; cv=none; d=google.com; s=arc-20160816; b=Nyi2TrGQ8e55K1fC2r3XlmOtIv5WJhySIVewM/LjncYEZaZvsIU0xLYN/spQvmksT3 KqU/bL2r0BWRJy9DOn7CQ2bs6Mkq8s1DmA7N2KF2BpmwMNEoiPl4hck0zyfiwbsIjq2m XdAK+yOcsG4h6h6hdFNONx0Kv9cEUmv3s5PqsDvKqtoyHZ8ulI9/jDxiAWTmRwzRGvPn XicmP6fSpf2sr8ulttMT/IKqvOSDpqqq4ge+WrbT1Nf5DkgR9wOflLRUghvDyafYeNQZ RmvCPSJEtWKK/COoqxGrqIXwvZTCSvGlcQb6fH2/woii/CparwlgmjMJV+cVfXOlmpaX MY/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=rP9o4OvPHQm13gFQ07gOyGt8ht141yK5qUVmieLK/vE=; b=jEQHmyVG/C6OdrVblt/1OZ3LxsKLinxBZqLD0mieQwvc3oJ8KZHEuHgbsf8UG580hm l4Znex8tSGSeT6kZWubcrA07Uc3Gl1kdgVZ1zP4YVDZk8PtAIJMzsMHnyOLXOFE5K67C J9iFYCDdgO7RnOXWs0zWtIXFWCcccsTJlX+k+CGiQwTKy6LXQfTw0boMx4pWS+DGfwa0 AarQq20FjIKwMYiVtXzWaMp8mHnI1rywDC6VdBH4n5rAZjfv0cUJyTRI7QZ30N9z1Ipg NjuMjLTrCXEbOq9To/KmCCmJs0OM0S5+Vle8ypxctnM8rsj/J+t9dqVGmrgztGt+hq+w qwnA== ARC-Authentication-Results: i=1; mx.google.com; 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 v24si2016171eju.655.2020.09.24.07.50.17; Thu, 24 Sep 2020 07:50:42 -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; 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 S1727889AbgIXOuL (ORCPT + 99 others); Thu, 24 Sep 2020 10:50:11 -0400 Received: from outgoing-auth-1.mit.edu ([18.9.28.11]:48184 "EHLO outgoing.mit.edu" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727859AbgIXOuL (ORCPT ); Thu, 24 Sep 2020 10:50:11 -0400 Received: from callcc.thunk.org (pool-72-74-133-215.bstnma.fios.verizon.net [72.74.133.215]) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id 08OEnxrL014845 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 24 Sep 2020 10:49:59 -0400 Received: by callcc.thunk.org (Postfix, from userid 15806) id 41AF642003C; Thu, 24 Sep 2020 10:49:59 -0400 (EDT) Date: Thu, 24 Sep 2020 10:49:59 -0400 From: "Theodore Y. Ts'o" To: Ritesh Harjani Cc: linux-ext4@vger.kernel.org, jack@suse.cz, 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: <20200924144959.GE482521@mit.edu> 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> 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. > > Reported-by: Yuxuan Shui > Fixes: ac58e4fb03f ("ext4: move ext4 bmap to use iomap infrastructure") > Signed-off-by: Ritesh Harjani Thanks, applied. - Ted