Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2799264pxa; Tue, 25 Aug 2020 03:44:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyXzbrkCrf0P2GaQepKnrd/3C19aYrUmpvRT2Gj8YuEA4RWAzE06us0x4wJNWgb/1bIEnnd X-Received: by 2002:a17:906:e24e:: with SMTP id gq14mr3898255ejb.378.1598352260912; Tue, 25 Aug 2020 03:44:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598352260; cv=none; d=google.com; s=arc-20160816; b=qyMDm6jK4Q+D4WQDaqGn2IQjw+gY6XeDgzgKhXEsg2IzHFmJYAhapwtrl5IwyIviUM jN01OCNfzfoziFy8R/vsQWrAUzUC/3qEnl7+9OG8G+2ccUarWCib2vsLBe44xwNN+eyy 414lPXHdiRy73DLTR2d3TCduFZWG5ztFdLKDRio3IXx5jErF+0++JaxmBxIFzPeXga3m YXhv7ZjcWhzON4763SLCoiCY2o5lTMAR/SXH+2OABkwErGGesIk0oGeIy0byZkdR3IJF HXW/PiToIAozRDuj3NXdotarHgx5my5Tt1qdeLL+c7iFtwQkxEiFNYfHT21QOes9Hx5p kmoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=C5ZqpSMJffCKiiwFvA8SJGWVKrf2TaYte90opB8CM3k=; b=UXnJcNL/WSQwLCw1aFn6XD7eRCbbgteR8tBzaEayggYlLw8ZD+u3fofl6hx8P8plwH 9aCBwsUBSMvgi7ShmYwx5CYTQI7yu8M7Qv4l1IqgVsE+JQ0W3y0r1ZwyAiJ4HU0TerxA U+qU/UcUDrZWkaNigJPA5ZEx1uQ1rlzrvUTrBDWUXbj5VP/uSJHADdUrQkLXJ3kdF282 Pww1vJKpIX+H/vJeItAkxR3Ih+htHgG63WlKvsstiLJzxYR5fDzvU2jnNn22IeBxcLz0 /PzgUqspWLztpHAjqQYw+Guz00TizkyybNVPnJ+8fR84mh1zu9icc9AbuWnUSl1+IsgW RmPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="WVr/X9yV"; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b5si7741337eds.24.2020.08.25.03.43.47; Tue, 25 Aug 2020 03:44:20 -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=pass header.i=@gmail.com header.s=20161025 header.b="WVr/X9yV"; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728117AbgHYKks (ORCPT + 99 others); Tue, 25 Aug 2020 06:40:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53376 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726149AbgHYKks (ORCPT ); Tue, 25 Aug 2020 06:40:48 -0400 Received: from mail-ot1-x341.google.com (mail-ot1-x341.google.com [IPv6:2607:f8b0:4864:20::341]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CAF32C061574; Tue, 25 Aug 2020 03:40:47 -0700 (PDT) Received: by mail-ot1-x341.google.com with SMTP id t7so9987230otp.0; Tue, 25 Aug 2020 03:40:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=C5ZqpSMJffCKiiwFvA8SJGWVKrf2TaYte90opB8CM3k=; b=WVr/X9yVk2Yn+vjoOaqOCA5sWj/y4+cLzkd3vicMn3yp/cpDPYCVcmA9XVAS77IH/q sm8yu0svlvwwOLGtubCsQ5IbCwTuFsSuteAsty5TS5fJLNH9gAXBEsfogGfeAH00NPbC ThP2d8RaXC1ISXXU/dL3ydXjnxyVhX6VgotkUoAwEAZEyZDrackZpQZDA3EKpbzuwvQz Bf3NXlBOQqHnJJcwd+JT+XHwn55BuyCnlQBDzMJQzJVJc59KS3bkOC/sNTr6LcX/BpmJ 4ikX32h9AYfGaE4CUnzGif4/jxzTJCAQjhmtNZ/pBRX3gBvmHPvKkUzhIu76EjoPYov1 2Qqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=C5ZqpSMJffCKiiwFvA8SJGWVKrf2TaYte90opB8CM3k=; b=DVqVvev+a0t3ZwlPDRPkz7yDtfidyvZCMl7+A8x6zgpUNeqkr5xqFGRhpCNlz44CDz tJqGgAvvEMcen03r+Tq4X7TP739opEeYVty23Uf3fTJ1SATS5T9bWSO9scX9/Kkl+uMe R0+aHdYEbbHpCJXbvY3l/1JPSVoAy3NQvrKQAeXxGkgwJ7q2YCJjtDGmK999R3UXWjua tBiqRA52EUhsyQYOgiU7DaN3HCCVBmACC+1olso9TkY15hjZM7vL0S7lO3JFvdYwljo1 mNw/yfU+/BrOzQalhAx4Vvl3+GANwyY1pGn8Bc8vNmiAvCbHzXocpCwgHrcXxUErQfTW I7ZA== X-Gm-Message-State: AOAM532q9d1FGkA9NEGhkwZmXQPVd3s0EcTimv2eJTgR7dHrIgGosHqJ bO+eJi1ZRJ3FLKiZHP9hGjo2M5/BxXNQqHa+A3A= X-Received: by 2002:a05:6830:17dc:: with SMTP id p28mr6752994ota.296.1598352045426; Tue, 25 Aug 2020 03:40:45 -0700 (PDT) MIME-Version: 1.0 References: <20200505183608.10280-1-yshuiv7@gmail.com> <20200505193049.GC5694@magnolia> <20200825102040.GA15394@infradead.org> In-Reply-To: <20200825102040.GA15394@infradead.org> From: Yuxuan Shui Date: Tue, 25 Aug 2020 11:40:34 +0100 Message-ID: Subject: Re: [PATCH] iomap: iomap_bmap should accept unwritten maps To: Christoph Hellwig Cc: "Darrick J. Wong" , viro@zeniv.linux.org.uk, linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org, tytso@mit.edu, adilger.kernel@dilger.ca Content-Type: text/plain; charset="UTF-8" Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org Hi, On Tue, Aug 25, 2020 at 11:20 AM Christoph Hellwig wrote: > > On Tue, Aug 25, 2020 at 10:26:14AM +0100, Yuxuan Shui wrote: > > Hi, > > > > Do we actually want to fix this bug or not? There are a number of > > people actually seeing this bug. > > bmap should not succeed for unwritten extents. Why not? Unwritten extents are still allocated extents. > > > If you think this is not the right fix, what do you think we should > > do? If the correct fix is to make ext4 use iomap_swapfile_activate, > > maybe we should CC the ext4 people too? > > Yes, ext4 should use iomap_swapfile_activate. OK, let me CC the ext4 people. Context: https://bugzilla.kernel.org/show_bug.cgi?id=207585 > commit ac58e4fb03f9d111d733a4ad379d06eef3a24705 moved ext4_bmap from > generic_block_bmap to iomap_bmap, this introduced a regression which > prevents some user from using previously working swapfiles. The kernel > will complain about holes while there are none. > What is happening here is that the swapfile has unwritten mappings, > which is rejected by iomap_bmap, but was accepted by ext4_get_block. -- Regards Yuxuan Shui