Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp255237pxa; Fri, 21 Aug 2020 06:33:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyWhGPsP/QWdKXIG6AX2gGhD+aEi+hE59Hmp8bJuk0mfJ0qQ20WfJUnD9/94gFn4wo/gV2M X-Received: by 2002:aa7:da87:: with SMTP id q7mr2783731eds.166.1598016816732; Fri, 21 Aug 2020 06:33:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598016816; cv=none; d=google.com; s=arc-20160816; b=JU13PAeS+U9+a5syT9j/Cvp6s81E3wCUrhxG6VYdbKv2D+tzpMOOnC8WXoNRd+goxc 8UGnVxNiyjZbCnKoWDuGKcGTFC2UgLghHMrhGB7DWeMC4elT568DPRe3jo+5+g4rCDjx GvXHwrSifBiZlz+qH7hDQHmPDQPW+Z69JXmntCr9UIfWDtGPoJgbZ1XPqflS+bgH1xBm AngJUOShTbX63ECtPrVZuSvzx7S7FVnQFQQffatDamapulSkwB3CU4HsnEQbIBr1ZU5s oNXiO995p9bno/VDn9ItUKjVS6uxdIIcSwz5DnXe/o4gr6Y39FsMvCGWeO82nydqMEG1 hN1Q== 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=AIbazufSjLEMEQ/d/Dh4pzlQECF2J1OLKd5TXR+II1g=; b=AFQLpuC4kTnCZdVS8oAbyEGKNE9U4938Supf2Fes5NA/V9WrHUvX1O1rb2ANloPVXv s5LxYlyPycbtFQMIheOYm+lUMpOPR/+aawk+r6Xtnae2tB+MKQWSrIx5TnH9/2r7gc/u gPXSAYIyngrAg2wzVy8nGJ5y8S0wC6xp8w8Gn6pzrMKzRb6ULHhcJLRAsxt0+8FIt3Rv pagUgUuTRWg6g4Rli3hqok7b3nJogeiKB3qUbqRSo8uNX0y5v+0udOniq4uZRRZelV2l Sq9Xyj4+oFqfErJul/ztytzz6eM75QLv7erjkP0A/P2IC9r7hW6t+k6zb0lwO4b2DSZj KjCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=Cuq3iopC; 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 l17si1146268eja.654.2020.08.21.06.33.13; Fri, 21 Aug 2020 06:33:36 -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=fail header.i=@infradead.org header.s=casper.20170209 header.b=Cuq3iopC; 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 S1728709AbgHUNb7 (ORCPT + 99 others); Fri, 21 Aug 2020 09:31:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35412 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728691AbgHUNbz (ORCPT ); Fri, 21 Aug 2020 09:31:55 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 64906C061573; Fri, 21 Aug 2020 06:31:55 -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=AIbazufSjLEMEQ/d/Dh4pzlQECF2J1OLKd5TXR+II1g=; b=Cuq3iopCyVuYMmI6xbYWhJ1Kl0 0boWHRzDvAaO2vLimQwyTgS/xEuMuO++yFe37kDXEXMvaDf9/VNnh2/TPnWtZD75afcstreGP2Ax0 NMqzK6i16wUPYSmrrx4PEt+PQEVR4AOD2P+nYEBXCqmuzvfJ6r7wCoNjBEXNbpQZn2q5UsoMtAB+P TATSZC29536WsJXebAjdJo6I0UHaShiqCFYD0haW4GYBoPbgVqzedCkzez1n9rkQMZ93fDqo5WDoq nRuqig6eDHOPlm6YHAugAJu+oHcKQlJ67Gvnb2ngSzlrLCRvp3/gVpJVj8xmiKer+Q1I7l29AJBr/ CT1VtZAw==; Received: from willy by casper.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1k9794-0005mN-ND; Fri, 21 Aug 2020 13:31:50 +0000 Date: Fri, 21 Aug 2020 14:31:50 +0100 From: Matthew Wilcox To: Anju T Sudhakar Cc: hch@infradead.org, darrick.wong@oracle.com, linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, riteshh@linux.ibm.com Subject: Re: [PATCH] iomap: Fix the write_count in iomap_add_to_ioend(). Message-ID: <20200821133150.GT17456@casper.infradead.org> References: <20200819102841.481461-1-anju@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200819102841.481461-1-anju@linux.vnet.ibm.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 19, 2020 at 03:58:41PM +0530, Anju T Sudhakar wrote: > __bio_try_merge_page() may return same_page = 1 and merged = 0. > This could happen when bio->bi_iter.bi_size + len > UINT_MAX. > Handle this case in iomap_add_to_ioend() by incrementing write_count. One of the patches I have pending ignores same_page by just using the write_count as a byte count instead of a segment count. It's currently mixed into this patch but needs to be separated. http://git.infradead.org/users/willy/pagecache.git/commitdiff/0186d1dde949a458584c56b706fa8dfd252466ff (another patch does the same thing to the read count).