Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1766931imu; Sat, 8 Dec 2018 06:53:25 -0800 (PST) X-Google-Smtp-Source: AFSGD/VFBhcQVMpleI0dv4bBSfwMpVHCbYpYFLL0HWsjm5gj+IQtivHGrOE5mg4ig7np5g/wflm5 X-Received: by 2002:a62:cdd:: with SMTP id 90mr6076662pfm.219.1544280805130; Sat, 08 Dec 2018 06:53:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544280805; cv=none; d=google.com; s=arc-20160816; b=H4drkfddeFGV2MqRC9xHfEO+lN9aIv1pW0zzNV2knrtFgMug6t5sNmSo8ffZ4v5Q3K VLoakBW7/Bec07pj8NU+jh+dhv8Q68ZW4jaBofQxQ2h783tZzJ+/+BloVdjmpxHFDJ0z 3HE6VcwRzT04BuchencdGcPAAdIoRqa5MTEQASIxHnlUL4Vgm1CETqZ1EHS1duXxc38b u/0mtSX/GeQwazhLKZiveYDQUcU8ap5qmRnRqxanJu0UzjOv+qRdb1xPXFNoDET5ejOa RVwH+MKZoNCYb3ukoeGsl8x9o/URPLuDQfIZ198y+d06mCjKIDQ5FrqJrym1duvaouXa Msew== 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=JFBMYZWBmc7SPf1f0x4qxLLuJRTSB5XO1i8h/f8Aqts=; b=v+XVyxvCL2Fe/6JkWzXLPHspUV/wLMDrJ08KniKXBF1j56JHVw+aNXD+PoWgfb+NuP oiTk2pjm8DRdZyY61580MFRCMCKEPDuK4xtz9cj7zGMYd6agmI1jEjZHF2tr4FcQTckU Wb3L28sMtYMGZ0PHhNLq1BgzcsJVwrWyuumqm/ODvpI7JvhR/TyROohlZmjEx/3e9lVQ +mxPj3/z6Id1dGsgOyw4fLyPHpeDK/JT2A8qB7eC161ulZDmOJDEPm3OYwlo7O5eOM4V nj2yOQNuUA86s/8wo+eGZHSXeFUir6s6oUQ74QsucJpKgtQQuWt4aX2jodGNE1Q2epm/ OB8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b=suQecOOX; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id j22si5916740pfi.252.2018.12.08.06.52.27; Sat, 08 Dec 2018 06:53:25 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b=suQecOOX; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1726165AbeLHOuT (ORCPT + 99 others); Sat, 8 Dec 2018 09:50:19 -0500 Received: from aserp2130.oracle.com ([141.146.126.79]:33948 "EHLO aserp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726140AbeLHOuS (ORCPT ); Sat, 8 Dec 2018 09:50:18 -0500 Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id wB8EmwZ8064478; Sat, 8 Dec 2018 14:49:51 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-2018-07-02; bh=JFBMYZWBmc7SPf1f0x4qxLLuJRTSB5XO1i8h/f8Aqts=; b=suQecOOXWXEYpS3IgkfgJJUc2BssI+BiO396VVjjYE75vkKIHY9thNx7qVhQFA7hk2Dh 4G2TgbAITuczQ1+xyjOsXf5vkgI0sq5eSuRMu/GBl/UXr6ytLwZvK/r6Jh7pi9k9uljO GV8QpHH+02f4rVrN+Vfj0u7muQq5unAQyuH1PPffuRUrWmjmCY22T03ph1/QcnbKL5mh rD4KlADJ2zjQ2SUYcC/+B/bv5HZZR8OztROz51+XGS3f7LTOZQeKICT6G8gxdVCt0V7D icwWa0k2RVUJACjEAuazr3+XEv95fqAzCBz7ekp/zhcVQUJvaFSlElafYAJA/IYuIRoN 7Q== Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by aserp2130.oracle.com with ESMTP id 2p83fds34f-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 08 Dec 2018 14:49:51 +0000 Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id wB8EnovL020843 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 8 Dec 2018 14:49:50 GMT Received: from abhmp0002.oracle.com (abhmp0002.oracle.com [141.146.116.8]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id wB8EnmeV028661; Sat, 8 Dec 2018 14:49:48 GMT Received: from [192.168.1.10] (/116.231.183.192) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sat, 08 Dec 2018 06:49:48 -0800 Subject: Re: [RFC PATCH v1 0/7] Block/XFS: Support alternative mirror device retry To: Christoph Hellwig , Dave Chinner Cc: Allison Henderson , linux-block@vger.kernel.org, linux-xfs@vger.kernel.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, martin.petersen@oracle.com, shirley.ma@oracle.com References: <1543376991-5764-1-git-send-email-allison.henderson@oracle.com> <20181128053303.GL6311@dastard> <20181128074544.GA20702@infradead.org> From: Bob Liu Message-ID: Date: Sat, 8 Dec 2018 22:49:44 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <20181128074544.GA20702@infradead.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9101 signatures=668679 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1812080139 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/28/18 3:45 PM, Christoph Hellwig wrote: > On Wed, Nov 28, 2018 at 04:33:03PM +1100, Dave Chinner wrote: >> - how does propagation through stacked layers work? > > The only way it works is by each layering driving it. Thus my > recommendation above bilding on your earlier one to use an index > that is filled by the driver at I/O completion time. > > E.g. > > bio_init: bi_leg = -1 > > raid1: submit bio to lower driver > raid 1 completion: set bi_leg to 0 or 1 > > Now if we want to allow stacking we need to save/restore bi_leg > before submitting to the underlying device. Which is possible, > but quite a bit of work in the drivers. > I found it's still very challenge while writing the code. save/restore bi_leg may not enough because the drivers don't know how to do fs-metadata verify. E.g two layer raid1 stacking fs: md0(copies:2) / \ layer1/raid1 md1(copies:2) md2(copies:2) / \ / \ layer2/raid1 dev0 dev1 dev2 dev3 Assume dev2 is corrupted => md2: don't know how to do fs-metadata verify. => md0: fs verify fail, retry md1(preserve md2). Then md2 will never be retried even dev3 may also has the right copy. Unless the upper layer device(md0) can know the amount of copy is 4 instead of 2? And need a way to handle the mapping. Did I miss something? Thanks! -Bob >> - is it generic/abstract enough to be able to work with >> RAID5/6 to trigger verification/recovery from the parity >> information in the stripe? > > If we get the non -1 bi_leg for paritity raid this is an inidicator > that parity rebuild needs to happen. For multi-parity setups we could > also use different levels there. >