Received: by 2002:a25:ca44:0:0:0:0:0 with SMTP id a65csp2470764ybg; Thu, 30 Jul 2020 23:55:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwJTY9q77jaxIOJMDn8aNXX+N2DsccUPJ1QLY34O+eWzFRE1LuurpgR4pk0xwZkylhYWz1+ X-Received: by 2002:a50:d80c:: with SMTP id o12mr2505932edj.244.1596178556229; Thu, 30 Jul 2020 23:55:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596178556; cv=none; d=google.com; s=arc-20160816; b=z9nQSXWmj/TO4Q1Gran8p6CzQGIuLFlGx7qXXiachudRPh+eNHyAq0nOmdST4emsBB kA5UYHvYGFKEc3p21lW7ex4SsxfugAuyFFkQZGTzqN43I926y7Q0zkdXqOeg2NxTOhwr z4i63+Y5LNnFZVURY3kgL2Qh9FFpjpbrrB/pkZgBjF3sjosEnbSkhhC9QZIwVnxtPgE0 Q8g65DdfoR2EgRVYBcbyri5vUkaE8aILmaIm490D7f6Ni9RL+EybrYjoNR7BJTUksgK5 xAfI8ycaFZNTZwqLZTjEJO1ODE1tAQtL5KtuOM5TQV65CUXXJjA66mKQjoFuO9rNPZaa PHjw== 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=G10RcVmRQhZtlnUEaxUOg8AVAVhJm47XxuBKHfBev10=; b=DQQ9plwylTFyRNB/ZgSEghJYs009TWz9dGXJEPSwxfkh2Ct3uGj88ReryvgdX2Fgw6 44C7aknYEE1rHma/AwF0PL31Y0AzbgAnCvD2BquZYUvTGTT+W3xu+zOuB5+HXg6a/pAi HUxzoRaX0o4Z5Nj6HOsD00tq9T7WXar1pfHUeymz8LvdUha0q13xF3RT23j4Uh1tjiGq 1soslY0/djnN6IhhWzsvT6eRLiwCjfQ1H0/1iAd6VrXm2vHIBGt/J5MzyqjU5l7znEMy hNe4qnCBKYOA64/y49/3FS+w1y6OE6toLxrVyd+KtYr8NmeEDfQZdre5SG1tO6jPJjmZ 5LqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Lr9L1KwK; 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 n6si4622555edi.269.2020.07.30.23.55.33; Thu, 30 Jul 2020 23:55:56 -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=@kernel.org header.s=default header.b=Lr9L1KwK; 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 S1731499AbgGaGyo (ORCPT + 99 others); Fri, 31 Jul 2020 02:54:44 -0400 Received: from mail.kernel.org ([198.145.29.99]:59660 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731224AbgGaGyo (ORCPT ); Fri, 31 Jul 2020 02:54:44 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B2660207F5; Fri, 31 Jul 2020 06:54:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1596178484; bh=fPtI3iB0w+i9NqvkRZZDNHizCXiZekrYk0lhbejzVOE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Lr9L1KwKgWeUJgLL/j+abV6HCcYORLKzFEMMJkF7+dGwegpezY2pNaOemcq9rynaO BM3/yElUq2pxZ93BNdb9mWSAueNkErA+SwMdBSRxV70wtZ8CRihTEhSqNcqYbQ1Ujb VUOlZnPF3j6QRQIO5U37/xpQDgVjCmS3p+CyuLi4= Date: Fri, 31 Jul 2020 08:54:31 +0200 From: Greg KH To: John Donnelly Cc: Linux Kernel Mailing List , Mike Snitzer Subject: Re: [PATCH v2: [linux-4.14.y] ] dm cache: submit writethrough writes in parallel to origin and cache Message-ID: <20200731065431.GB1518178@kroah.com> References: <48659508-86e7-8107-75db-584b2896ad48@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <48659508-86e7-8107-75db-584b2896ad48@oracle.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 30, 2020 at 03:33:42PM -0500, John Donnelly wrote: > From: Mike Snitzer > > Discontinue issuing writethrough write IO in series to the origin and > then cache. > > Use bio_clone_fast() to create a new origin clone bio that will be > mapped to the origin device and then bio_chain() it to the bio that gets > remapped to the cache device. The origin clone bio does _not_ have a > copy of the per_bio_data -- as such check_if_tick_bio_needed() will not > be called. > > The cache bio (parent bio) will not complete until the origin bio has > completed -- this fulfills bio_clone_fast()'s requirements as well as > the requirement to not complete the original IO until the write IO has > completed to both the origin and cache device. > > Signed-off-by: Mike Snitzer > > (cherry picked from commit 2df3bae9a6543e90042291707b8db0cbfbae9ee9) > > Fixes: 4ec34f2196d125ff781170ddc6c3058c08ec5e73 (dm bio record: > save/restore bi_end_io and bi_integrity ) > > 4ec34f21 introduced a mkfs.ext4 hang on a LVM device that has been > modified with lvconvert --cachemode=writethrough. > > CC:stable@vger.kernel.org for 4.14.x . > > Signed-off-by: John Donnelly > Reviewed-by: Somasundaram Krishnasamy > > conflicts: > drivers/md/dm-cache-target.c. - Corrected usage of > writethrough_mode(&cache->feature) that was caught by > compiler, and removed unused static functions : writethrough_endio(), > defer_writethrough_bio(), wake_deferred_writethrough_worker() > that generated warnings. > --- > drivers/md/dm-cache-target.c | 94 > ++++++++++++++++++-------------------------- Line wrapped? > 1 file changed, 38 insertions(+), 56 deletions(-) > > diff --git a/drivers/md/dm-cache-target.c b/drivers/md/dm-cache-target.c > index 69cdb29ef6be..2d9566bfe08b 100644 > --- a/drivers/md/dm-cache-target.c > +++ b/drivers/md/dm-cache-target.c > @@ -1,5 +1,5 @@ > /* > - * Copyright (C) 2012 Red Hat. All rights reserved. > + i Copyright (C) 2012 Red Hat. All rights reserved. What happened here? This patch can't be applied as-is :( greg k-h