Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp1442572pxv; Fri, 23 Jul 2021 08:25:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxXT1DUNl2/xJyp1kpfYrBntIy0Ss1/J9rVaSYDm7PoscQR9wDeAEEccxpBWNzjt8TS8Khe X-Received: by 2002:a6b:7948:: with SMTP id j8mr4341118iop.32.1627053934924; Fri, 23 Jul 2021 08:25:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627053934; cv=none; d=google.com; s=arc-20160816; b=cW1xfsG21CVTOK1jNJCTkDu0CJYkYTOoTEYukM+kU7NcYy6MPi/18PrBjKZWaxn85k fXx8ZK99FXUzXWtYPukkYpDzV6oxiDG1TvVY3k1e/ah/QdOsC0jrkxZaoN2wo5PjGOC0 huL2OEqxixyYItxKu9Rkn2LVb0F+xhhOnfWc5UFFHg2tYBpkE+CY1fjlrv+vQpAac58R C/BdEAjgXZijhNgsiXWADmZayr0/cFiSpL+2/jsxCZMbAN0pA+Ti/EbgmA5UV0ywFlIl QynWJULwOM/vehol6BYqM/etZM8GLMdPJDJB0k0KPNBYT1ziLFhEZ7/F6RwfbkFB4c7G F+og== 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:mail-followup-to:message-id:subject:cc:to:from:date; bh=6sKJG4vMXx31T2JABK5S+qvv5SnJHrZm/2Z9LzXdZmI=; b=mKIBHbPuY2RSWzEbCT4jwLM3NqWufaW3LQVCMTyw8LUE+OghYJwRKBh3RmW2lKWFro yzCWGB+HBPLBuWIc2Z8GQpZqLfTnO5QO/+DiH31S5fqSphx/omQ8jW7m0PyZsohJ4tg5 eSkcwRt1yg48kOmzwWJOsY2SKIZx/Jvg47i0LQ28SVuXxHtgG+vlNP0FhSBavXpdoY3Q KataE4eY70liE52Fzry3b1JCBNMUa6MoUELqMJuC1dt7oSeeZY5Kvktdrtd/C/X4saD3 fObkZnPqjr7So4gLCK+U3nT3nfjxrkehOl8JLA0aDudq5X0RV4daFXgNsAZrYKQWw7Ah mIfg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u6si4500180ioc.42.2021.07.23.08.25.23; Fri, 23 Jul 2021 08:25:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235553AbhGWOnJ (ORCPT + 99 others); Fri, 23 Jul 2021 10:43:09 -0400 Received: from out30-130.freemail.mail.aliyun.com ([115.124.30.130]:45883 "EHLO out30-130.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235526AbhGWOnJ (ORCPT ); Fri, 23 Jul 2021 10:43:09 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R711e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04423;MF=hsiangkao@linux.alibaba.com;NM=1;PH=DS;RN=7;SR=0;TI=SMTPD_---0UgjU8ce_1627053818; Received: from B-P7TQMD6M-0146.local(mailfrom:hsiangkao@linux.alibaba.com fp:SMTPD_---0UgjU8ce_1627053818) by smtp.aliyun-inc.com(127.0.0.1); Fri, 23 Jul 2021 23:23:40 +0800 Date: Fri, 23 Jul 2021 23:23:38 +0800 From: Gao Xiang To: Matthew Wilcox Cc: Christoph Hellwig , linux-erofs@lists.ozlabs.org, linux-fsdevel@vger.kernel.org, LKML , "Darrick J . Wong" , Andreas Gruenbacher Subject: Re: [PATCH v6] iomap: support tail packing inline read Message-ID: Mail-Followup-To: Matthew Wilcox , Christoph Hellwig , linux-erofs@lists.ozlabs.org, linux-fsdevel@vger.kernel.org, LKML , "Darrick J . Wong" , Andreas Gruenbacher References: <20210722031729.51628-1-hsiangkao@linux.alibaba.com> <20210722053947.GA28594@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Matthew, On Fri, Jul 23, 2021 at 04:05:29PM +0100, Matthew Wilcox wrote: > On Thu, Jul 22, 2021 at 07:39:47AM +0200, Christoph Hellwig wrote: > > @@ -675,7 +676,7 @@ static size_t iomap_write_end_inline(struct inode *inode, struct page *page, > > > > flush_dcache_page(page); > > addr = kmap_atomic(page); > > - memcpy(iomap->inline_data + pos, addr + pos, copied); > > + memcpy(iomap_inline_buf(iomap, pos), addr + pos, copied); > > This is wrong; pos can be > PAGE_SIZE, so this needs to be > addr + offset_in_page(pos). Yeah, thanks for pointing out. It seems so, since EROFS cannot test such write path, previously it was disabled explicitly. I could update it in the next version as above. Thanks, Gao Xiang