Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp111352pxa; Fri, 31 Jul 2020 07:38:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx0QP4/+sIxAV2Cr2X8MGpLcodL37BGYQSkn3NJSqGkconTy4VOg+zqb0Pmr+XzGNdpmQal X-Received: by 2002:a17:906:a284:: with SMTP id i4mr4583958ejz.490.1596206324100; Fri, 31 Jul 2020 07:38:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596206324; cv=none; d=google.com; s=arc-20160816; b=HppjPfe22fTXVOSB/zWKEtMONrRmlv/BXlZB5WakbwafxxFCg8bEnHHE4UjLh0nsZe 58FLmVOIx3QHmUqvGz+a9mBaomGRILrdJF7AXrivlMwLvNIIqd6ok5BSz/Oj7sHGVHRC SWYgORphSXtK7T/YQOgf+SuinSWhzteTXF/Tb8fqn4i+by1QE3gSlwe6buFOqvTPMfYf +XmztTSkIhKewVahYRBPW5gcR9/fLy6vkt8pkWWSucF1SLntExzvajFqDrQysFqYrzl0 3EsgerY03Vr4iwVusldpmfqUPzlBgtFUkQy+NEPQKlxL6pnP66FzUxcM+LuP+rd/6T2y E3OA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=CAU59/Kk3uhijA2RVgiAR8MuGY+ZYGPMzuMEOUcZW+4=; b=YRRhA5H6HOY2SRSP3V8mGA2tLTGeROft9oj9N6bIiINGMAo4Gt2hVZhz/KrCcrmKZ/ oNEK8NJySZcrG2WQnSWHrPEGhMcCVwp0uulJqgS6TB8+a4r7v4BkuB5pemNe0MGELrlH XYQTl0proopbzsHG8bXfV5PHCbRfSqLRtL5iWDKZRG2oXk3ZaNDuLh7bUIrnxaRo9HWq LD86ZlnxCAYz8Q4Muy6tQ1SYbQ0O8vO6fUcx/klBvjQMH4FKSjXlum2LvLoxM3B7+2BO 6oEKxlh8GXgkge+98aM19v/St0TzpIWw1tajjE+iccmOGQb453MwJCLQvnNrm6QdurPK pETA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2020-01-29 header.b=v7Bdhpsm; 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=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j11si5118276edq.584.2020.07.31.07.38.21; Fri, 31 Jul 2020 07:38:44 -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=@oracle.com header.s=corp-2020-01-29 header.b=v7Bdhpsm; 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=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729277AbgGaOh7 (ORCPT + 99 others); Fri, 31 Jul 2020 10:37:59 -0400 Received: from userp2130.oracle.com ([156.151.31.86]:47332 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728613AbgGaOh7 (ORCPT ); Fri, 31 Jul 2020 10:37:59 -0400 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 06VEWxWX101171; Fri, 31 Jul 2020 14:37:55 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : to : cc : references : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=CAU59/Kk3uhijA2RVgiAR8MuGY+ZYGPMzuMEOUcZW+4=; b=v7BdhpsmdCNuxfnY84aZtqzeqcJYGo3V6ueX/pIfXVVOAIFefyBTjSpT1+51u9UTxIdY GKEWOGF7arC+0EtKwGCNF6Dp1Pg5SdvmXExp2LXwJXZJwdSKWwLFqTmUt41Hj84YwOPs 32z59sx/KHpBBRrxSrIRzm6VADcbgrgvQi/PxZ0xnQCDVQIAOUAsgVv8k4K/p15EWvuA Xf8ERRwQGLnwwxNWXNWhG1CX9nqe5V0MaX9D3F1lxW8YwL++UvpAaWxskhv9LE5s4XBh NUxYeKM5EvVrIJ+vECrLAJJ9/SHnyk3g+GwmqG1BX58fEOL/iP2cvZb+4Zo97o3D9Etd UA== Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by userp2130.oracle.com with ESMTP id 32hu1jsd5d-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 31 Jul 2020 14:37:55 +0000 Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 06VETVl1180878; Fri, 31 Jul 2020 14:35:54 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userp3030.oracle.com with ESMTP id 32hu5ytype-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 31 Jul 2020 14:35:53 +0000 Received: from abhmp0009.oracle.com (abhmp0009.oracle.com [141.146.116.15]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 06VEZqfS031989; Fri, 31 Jul 2020 14:35:52 GMT Received: from [192.168.1.126] (/47.220.71.223) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 31 Jul 2020 07:35:52 -0700 Subject: Re: [PATCH v2: [linux-4.14.y] ] dm cache: submit writethrough writes in parallel to origin and cache To: Greg KH Cc: Linux Kernel Mailing List , Mike Snitzer References: <48659508-86e7-8107-75db-584b2896ad48@oracle.com> <20200731065431.GB1518178@kroah.com> From: John Donnelly Message-ID: <09b4fc22-2eef-1fff-a505-e3ead74474b9@oracle.com> Date: Fri, 31 Jul 2020 09:35:51 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20200731065431.GB1518178@kroah.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9698 signatures=668679 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 mlxlogscore=999 mlxscore=0 suspectscore=0 bulkscore=0 malwarescore=0 spamscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2007310108 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9698 signatures=668679 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 clxscore=1015 malwarescore=0 spamscore=0 suspectscore=0 bulkscore=0 priorityscore=1501 phishscore=0 mlxlogscore=999 lowpriorityscore=0 impostorscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2007310108 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 7/31/20 1:54 AM, Greg KH wrote: > 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? ummm .. that is weird > >> 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? spurious character from vi ;-( > > This patch can't be applied as-is :( > > greg k-h > I will repost next week Thank you.