Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3211920imu; Sun, 9 Dec 2018 20:31:59 -0800 (PST) X-Google-Smtp-Source: AFSGD/V2nLfyMi2BuHMN7tV1O1iJZ9a7rRsEfMaAGL5JfL4dtWW1pQ3GRvxWLO1T+p2n6mgCLzLZ X-Received: by 2002:a62:5d0c:: with SMTP id r12mr11414284pfb.0.1544416319527; Sun, 09 Dec 2018 20:31:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544416319; cv=none; d=google.com; s=arc-20160816; b=QTVscvz1p71SoqaO7VnXhAQ1RCtqo/2Li9Bw/x6478+D3izD38VP8a3jXcOeCz9Qdz OtzfXOroS+oC5P9Ot9RbdqtitXyYpmT77Ch1QeQ3RxZ/xnwR5GD9/PicsbzHRYg3hx7M TvR3i0humdsRjmZnNf/JfUjH9x/XgjOpggFmpB7e3T9zZ0RxSGWPL6TMWHb7brwv5IOd awHg93NiTDmQaPE2JXA1SQIBIV4y7Ks8jD8VCbopBhB5btoHi+GU5FThyNhcl3cCE2Jq PDeY+q3hvbZlcDfR26RySnfJL9gp2h0HASMUSjkVCXsFuxv4mVmxUIG5NUP163BQx1Ld 8/xQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=LZe0diQtVrs49/aC6pDftkvnoPmktMBHW+MlNxMM8Ok=; b=qjJdyv41IOq6vqMlKF7Xzb+NTLhNeTS73BGdCiR39fekWkpusx1YVpq+Kh1tFdbCNU p+MfTFdeypscx6jJg0yX6M8sJpL2jtroIuVIExmVaXW+b2o5AK/tdFIV/MrKlkT1aufL H19rA4zG0kAkIDIdxhc4/sV/+FUeKHnZjGnGsRav58jnCWYc2BPHwXf4B7s65K2CAklI 6eX78QbbPDuQD3LKiUi88n3EI+kzy0PLwxA7Ls0Of3ULvuBTpRpBOqlBO88KU9RsneWp I6rWVi/e4rV/5qM4mFx3PX27OrhiLbE/EnrYxz5vEaLihRlNomlUT0hKJ+NkG41Y1TC5 Vp0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b=Gk7wej82; 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 f14si9966494pln.289.2018.12.09.20.31.44; Sun, 09 Dec 2018 20:31:59 -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=Gk7wej82; 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 S1726753AbeLJEao (ORCPT + 99 others); Sun, 9 Dec 2018 23:30:44 -0500 Received: from aserp2130.oracle.com ([141.146.126.79]:57382 "EHLO aserp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726733AbeLJEal (ORCPT ); Sun, 9 Dec 2018 23:30:41 -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 wBA4SvlE183892; Mon, 10 Dec 2018 04:30:19 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=corp-2018-07-02; bh=LZe0diQtVrs49/aC6pDftkvnoPmktMBHW+MlNxMM8Ok=; b=Gk7wej82v4BiTOU8839Aq7VChgAGQdtkQaWJxNETnm7CuLkbrmD3WWB+BP6rlYXY6vez qvXpkwCfPQae3Jp+WJgj0P/7iSVziqWU/8heD+ih3E01hsyrnSNYwMN/VgkomXDPSkyr 1CQkTdD/V2Yxos37xiOUX09o/oiwNWikLZ/D6glOqwZM/3WUO5nj8mgJMBEx2MrH2s3n QXH1FiQB4HXYNOidU/3enHqAy9RjVJ/aRPb/129zLPU02yqfP+GGAJA3sEWZkt2b8EPm KZYw3uMowIWpIclTsoZlz9Rp4Wa9oT2UaGA9z6NV0RGPuVn+giSO1STqLIl4lx0oexC5 qQ== Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by aserp2130.oracle.com with ESMTP id 2p83fduu5m-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 10 Dec 2018 04:30:19 +0000 Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by aserv0021.oracle.com (8.14.4/8.14.4) with ESMTP id wBA4UJiC020024 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 10 Dec 2018 04:30:19 GMT Received: from abhmp0009.oracle.com (abhmp0009.oracle.com [141.146.116.15]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id wBA4UHOH022588; Mon, 10 Dec 2018 04:30:17 GMT Received: from localhost (/67.169.218.210) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sun, 09 Dec 2018 20:30:17 -0800 Date: Sun, 9 Dec 2018 20:30:15 -0800 From: "Darrick J. Wong" To: Bob Liu Cc: Christoph Hellwig , Dave Chinner , 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 Subject: Re: [RFC PATCH v1 0/7] Block/XFS: Support alternative mirror device retry Message-ID: <20181210043015.GS24487@magnolia> References: <1543376991-5764-1-git-send-email-allison.henderson@oracle.com> <20181128053303.GL6311@dastard> <20181128074544.GA20702@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9102 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-1812100042 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Dec 08, 2018 at 10:49:44PM +0800, Bob Liu wrote: > 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! It seems reasonable to me that the raid1 layer should set the number of retries to (number of raid1 mirrors) * min(retry count of all mirrors) so that the upper layer device (md0) would advertise 4 retry possibilities instead of 2. --D > -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. > > >