Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1387669imu; Wed, 28 Nov 2018 08:50:17 -0800 (PST) X-Google-Smtp-Source: AFSGD/XtXsoJo/JFAbuvBtvcoL52q1NUrhioo0+QlATqJ68oZKV+z4AcjBcyEZdXw2GCGmT8NVmk X-Received: by 2002:a63:ce50:: with SMTP id r16mr33557511pgi.217.1543423817746; Wed, 28 Nov 2018 08:50:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543423817; cv=none; d=google.com; s=arc-20160816; b=DNvpChT2jew1A4H+fN5NWjH1beGlIsXBbz/Jl8g0eYqzLTVNt/lEF42fXZ2XDuFNEl 84dYeTMaaKRAePbMfStXclDItoTT32lPHQyzgIOPlFsDSG8Vj9pZDaTjhqxxigkGl6ig B/HYndxTL9xUtyQILeY7hMg4nX4nxyPR+3AbWPn/y1T2sC4jidpstkt4bEKo7lbMM9Mr 1Kt4jhIwlZ/+K4ZC0bNLKVfIVPP/CnYbL2NBkngZ+Y1i1M0A0ewthHZyDlQ0bxc8mn9s 5id0oFo7I0fTgg0wGNowQ/k/F7L0R85Zd4HTO56OdPAEuu1GevvMMpBEGdNiTQb+4+F1 /zuQ== 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=uYoS2uHWsmwFcYNxZUpnWboocvYxHxu4Drtmg5taZeM=; b=XAJKnCmXkGmU0Vnv8xViaQy56kYbIxeQmftLrf5+mtVhhOIpPq4YR/CAU9KUQ4p5Xe Pj0fNETd+qW+KzoKwV5IaySzSCppUPXs1vzsCRa4FOzUSFAG65ozq5mfeHog0T9xhSIe U35tlXPt8+RccE3f5DAc1EexBgC/4Vuxav8ZruqjqpLnygAD5q0cW3dpADLsdk3265qq Gzgfz8Aim0DDCPX8/OG/OHWo6+o+a4p7Wevukp6SHtqGIBfuIUwNwIn/GGO3DS/wuPz+ EH9d77cedoz1HeNVZTt1WuKUhkCm89Ja1IOP09Fkycb32sXo7T+Caw4L1Xllo5ee10G5 AH3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b=S9OvwBNR; 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 g59si8553241plb.302.2018.11.28.08.50.01; Wed, 28 Nov 2018 08:50:17 -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=S9OvwBNR; 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 S1729152AbeK2Dtx (ORCPT + 99 others); Wed, 28 Nov 2018 22:49:53 -0500 Received: from userp2120.oracle.com ([156.151.31.85]:60716 "EHLO userp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728798AbeK2Dtw (ORCPT ); Wed, 28 Nov 2018 22:49:52 -0500 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id wASGhulB028735; Wed, 28 Nov 2018 16:47:16 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=uYoS2uHWsmwFcYNxZUpnWboocvYxHxu4Drtmg5taZeM=; b=S9OvwBNRUK+x0aXemBm8aUKJkUDDeUEY8g1w2/d0sEXy3FwuTcqwKbVsTsU06qO6DoAH hmf3lw5Y0YpLxt0YEkZPjBW2/kV0+yl8pnTSiWhqHrbGBEnxhV1X6ozPxYUkR2bPOqYQ j/Ws+n+siRr2h8bphD+Q+F3aizVPTFA9r7yBui+RzURlJ1GlkWQpcnM3nqXhz/KrnVKT 6UdntPLa+fSxcBuPIBJXiFG+UPMqoLBwFXVGT0y4LmTeZwK9/sCZPWeo5l40xBgdJj5m YvaqYSZ/hFcge4q/BCItfAiVpuonx/QMM9UsvZ2jaGniJ9a2sUJQFHD9/FpUUkR6HUBZ QA== Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by userp2120.oracle.com with ESMTP id 2nxy9rbcb7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 28 Nov 2018 16:47:16 +0000 Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id wASGlFFH020708 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 28 Nov 2018 16:47:15 GMT Received: from abhmp0013.oracle.com (abhmp0013.oracle.com [141.146.116.19]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id wASGlEbi003497; Wed, 28 Nov 2018 16:47:14 GMT Received: from [192.168.1.226] (/70.176.225.12) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 28 Nov 2018 08:47:14 -0800 Subject: Re: [PATCH v1 5/7] xfs: Add device retry To: Bob Liu , Christoph Hellwig , Dave Chinner Cc: 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> <1543376991-5764-6-git-send-email-allison.henderson@oracle.com> <20181128050850.GJ6311@dastard> <20181128073520.GA7084@infradead.org> From: Allison Henderson Message-ID: Date: Wed, 28 Nov 2018 09:47:13 -0700 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: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9091 signatures=668686 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-1811280146 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/28/18 5:41 AM, Bob Liu wrote: > On 11/28/18 3:35 PM, Christoph Hellwig wrote: >> On Wed, Nov 28, 2018 at 04:08:50PM +1100, Dave Chinner wrote: >>> So the first time through this loop the block layer devices what >>> device to read from, then we iterate devices 1..n on error. >>> >>> Whihc means if device 0 is the only one with good information in it, >>> we may not ever actually read from it. >>> >>> I'd suggest that a hint of "-1" (or equivalent max value) should be >>> used for "device selects mirror leg" rather than 0, so we can >>> actually read from the first device on command. >> >> Yes. For one thing I think we really need to split this retry counter >> of sorts from the write hints. I.e. make both u8 types and keep them >> separate. Then start out with (u8)-1 as initialized by the block layer >> for the first attempt. The device then fills out which leg it used >> (in the completion path, so that another underlying driver doesn't >> override it!), and then the file system just preserves this value on >> a resumit, leaving the driver to chose a new value when it gets a >> non -1 value. >> > > Will update as suggested, thank you for all your feedback :) > > -Bob > Yes, thanks everyone for your feed back. Maybe Bob and I can come up with some test cases that recreate the problem scenarios described here and see if we can work out a solution to the multi bio complexities. Thanks! Allison