Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp1429554pxv; Fri, 23 Jul 2021 08:09:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzpE2gSmTWpf0OHqymE2FsKaQ29M7uTqvo4P0NObcNgLwygk9QcXatYvTfpB2cbSgrdPpWZ X-Received: by 2002:a92:1908:: with SMTP id 8mr3819790ilz.149.1627052957268; Fri, 23 Jul 2021 08:09:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627052957; cv=none; d=google.com; s=arc-20160816; b=OSQZv3nLZUUmuHDySWqLGq7Wq1ZMFh/zQPVAiJM+VRwatgWHRlH1SetYWyljD5QZnf TurLe3y9mqKCWqahVpnFFF75AMiw6kx4lP9TBaPmuY2hBnPVNuQE+2ecXb2BxROjpTEx BdNIX0QJf4Dt+5dIVd59Htmom2RStPpZLhNqHfXF+7pH8YJx41ZYEZgnKqMQixkMRTg9 DF+b/dYVN+VVhyQENL9U7tElwDWv13oMaJ2WnCXEI99nwBKbQHyjELA10UAwOvMWfnCr Dx93hS0xMGEHcS87j65nSXFPBZVY6q5Ui11Fnh8jLTmGwDKMxuQBegzyJDpjmR/TWpTz Z8ng== 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:dkim-signature; bh=TH+UO+4GlVJPwsICtqlb2GDVZ2D9S2sacJqluLD1cbU=; b=H/No5nM7HMvb1erdcGeRQZCsDahxr7c2zs8EY8S8R0JyBz3sDF8ZOyP9HOqF5PLae/ +lxjcpNKhaH+TS4Nt0znmLsYAv7qucfzJlcwJJxUwiwKEyntHyrAVnh6FGTaz0UpSAPa S2MwAJM0FsCsux4Y1/4/0KBSvqKYPZFRhDNlDgvpU5LKg6DGLCx4bb9WVlEpr0L84nDy 0jUTrYWEJJh9Vp25Da4CO84g3QYEXcTuRDaaJ0/N0/vO5eM4V5LafDaPsv02viQw9sAi f39RFN1OZKYCpkrV9CUvW2JbT+EZ69rz1Mv1aiNj7Gm4vm5A5W4tmQg/etPEmE6JtAn/ RnzA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=ryUceu+c; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f6si30176374jav.23.2021.07.23.08.09.02; Fri, 23 Jul 2021 08:09:17 -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; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=ryUceu+c; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235448AbhGWOZT (ORCPT + 99 others); Fri, 23 Jul 2021 10:25:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43326 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235351AbhGWOZS (ORCPT ); Fri, 23 Jul 2021 10:25:18 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EE835C061575; Fri, 23 Jul 2021 08:05:51 -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=TH+UO+4GlVJPwsICtqlb2GDVZ2D9S2sacJqluLD1cbU=; b=ryUceu+cYHelVxJMnHQDMyfPmq 1CmyM/LHAHkQgUx4cO8EdjLvKifP61OBPlPyUgIcxSaTkiH+a4dktu+nR+Gs+zi1cyNxG2Yd46ojm KxL0i0AytbtSWTbmcpgpLAgCZKlIxwEIKAn6SRJrpA0ZkVBZTAaybsgiyKcmtqYMkV3R2cEOAMa8I b9W8adfTMvE8RA61u57/ieX9FkjfJ1LgFRBAdezhXjx8d3AvAMQRJhAkIK1/urYh/4UGodi0SAHjZ p/d6loPEz9qZZq7hJPbgZ4M/XQVjZLZs+zMZA2gXsxalO2C5fU/1Q/npBzRRu0DGpsfadyaxZ7dhm TbWYshoQ==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1m6wjx-00BSns-9o; Fri, 23 Jul 2021 15:05:32 +0000 Date: Fri, 23 Jul 2021 16:05:29 +0100 From: Matthew Wilcox To: Christoph Hellwig Cc: Gao Xiang , 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: References: <20210722031729.51628-1-hsiangkao@linux.alibaba.com> <20210722053947.GA28594@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210722053947.GA28594@lst.de> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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).