Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752209AbcJCBrp (ORCPT ); Sun, 2 Oct 2016 21:47:45 -0400 Received: from mx0a-00082601.pphosted.com ([67.231.145.42]:58717 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751858AbcJCBrg (ORCPT ); Sun, 2 Oct 2016 21:47:36 -0400 From: Josef Bacik To: Alex Bligh CC: Wouter Verhelst , Jens Axboe , "linux-block@vger.kernel.org" , Kernel Team , "nbd-general@lists.sourceforge.net" , "linux-kernel@vger.kernel.org" Subject: Re: [Nbd] [PATCH][V3] nbd: add multi-connection support Thread-Topic: [Nbd] [PATCH][V3] nbd: add multi-connection support Thread-Index: AQHSGcMfpMVE6C2uV0OnJ7rJi7zcvKCQOr0AgAADSgCAAG73AP//wg8AgATuTACAAJ854w== Date: Mon, 3 Oct 2016 01:47:06 +0000 Message-ID: <2B49072B-6F83-4CD2-863B-5AB21E1F7816@fb.com> References: <1475092892-8230-1-git-send-email-jbacik@fb.com> <20160929095204.mexr6wpypo3bl6mx@grep.be> <87908d95-0b7c-bc3f-f69d-94d006829daf@fb.com> <20160929164100.akytbkbtvziwaqqj@grep.be> , In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [107.15.72.49] x-ms-office365-filtering-correlation-id: 05ea24d3-5a26-4134-988c-08d3eb2f2eda x-microsoft-exchange-diagnostics: 1;DM5PR15MB1193;20:zBpI5XlDOAa2uPLW3CipwO7RPLID8zyaa4Y1WoLKMWjN/u/J/rApO9oYcb0lK7clnHUUM7z77fQXUsFslsg6AREo2bM1LS5BQE1JplAf3EtytupG66x88eXwt5P0Nn+ckwPPnzpsvEHGSrdCOuuWt0O2FHoQNpwKRJFQ9n5ONT4= x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:DM5PR15MB1193; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(158342451672863)(67672495146484); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(6040176)(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046);SRVR:DM5PR15MB1193;BCL:0;PCL:0;RULEID:;SRVR:DM5PR15MB1193; x-forefront-prvs: 008421A8FF x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(7916002)(199003)(189002)(24454002)(377454003)(3660700001)(92566002)(77096005)(99286002)(8676002)(5660300001)(5002640100001)(106356001)(110136003)(8936002)(68736007)(2900100001)(81166006)(6916009)(105586002)(106116001)(7846002)(81156014)(102836003)(36756003)(7736002)(6116002)(2906002)(122556002)(586003)(305945005)(33656002)(3846002)(101416001)(4326007)(19580395003)(50986999)(3280700002)(19580405001)(87936001)(66066001)(83716003)(97736004)(189998001)(82746002)(76176999)(93886004)(2950100002)(86362001)(11100500001)(54356999)(10400500002)(104396002);DIR:OUT;SFP:1102;SCL:1;SRVR:DM5PR15MB1193;H:DM5PR15MB1321.namprd15.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 X-MS-Exchange-CrossTenant-originalarrivaltime: 03 Oct 2016 01:47:06.9048 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 8ae927fe-1255-47a7-a2af-5f3a069daaa2 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR15MB1193 X-OriginatorOrg: fb.com X-Proofpoint-Spam-Reason: safe X-FB-Internal: Safe X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-10-02_10:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by mail.home.local id u931nPmR000318 Content-Length: 1829 Lines: 35 > On Oct 2, 2016, at 12:17 PM, Alex Bligh wrote: > > >> On 29 Sep 2016, at 17:59, Josef Bacik wrote: >> >> On 09/29/2016 12:41 PM, Wouter Verhelst wrote: >>>> On Thu, Sep 29, 2016 at 10:03:50AM -0400, Josef Bacik wrote: >>>> So think of it like normal disks with multiple channels. We don't send flushes >>>> down all the hwq's to make sure they are clear, we leave that decision up to the >>>> application (usually a FS of course). >>> >>> Well, when I asked earlier, Christoph said[1] that blk-mq assumes that >>> when a FLUSH is sent over one channel, and the reply comes in, that all >>> commands which have been received, regardless of which channel they were >>> received over, have reched disk. >>> >>> [1] Message-ID: <20160915122304.GA15501@infradead.org> >>> >>> It is impossible for nbd to make such a guarantee, due to head-of-line >>> blocking on TCP. >>> >> >> Huh I missed that. Yeah that's not possible for us for sure, I think my option >> idea is the less awful way forward if we want to address that limitation. Thanks, > > I think if the server supports flush (which you can tell), sending flush on > all channels is the only safe thing to do, without substantial protocol > changes (which I'm not sure how one would do given flush is in a sense > a synchronisation point). I think it's thus imperative this gets fixed > before the change gets merged. It's not "broken", it's working as designed, and any fs on top of this patch will be perfectly safe because they all wait for their io to complete before issuing the FLUSH. If somebody wants to address the paranoid case later then all the power to them, but this works for my use case and isn't inherently broken. If it doesn't work for yours then don't use the feature, it's that simple. Thanks, Josef