Received: by 2002:ac0:b08d:0:0:0:0:0 with SMTP id l13csp4936900imc; Mon, 25 Feb 2019 14:01:25 -0800 (PST) X-Google-Smtp-Source: AHgI3IbPiM4JDi9ltSOaXVWqWUpt5NNkDH6FUJ9jqn5mvxRqIO3tjCQEwyydnPhAiCGM4pdFIAZf X-Received: by 2002:aa7:8251:: with SMTP id e17mr6261073pfn.96.1551132085525; Mon, 25 Feb 2019 14:01:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551132085; cv=none; d=google.com; s=arc-20160816; b=O23/AQQPMjC1k+gug51cRdPmPbLES2nmKnBXt8iUZ0V/IaNTAaPOLC73bViVXspne9 uO5HDMIoGCen7VkWehEVofSUXe2MV6i1MKTwrZ8hCUPCTmkqIItr1MXRepAAUSg10Bw1 i5ypbN+znP1sXR/rG9LTwMg1tTyV+6w2aHGK4AfZhWdJeF+ACZUrkRc4d8Zx4bzJPFmJ vFQGrz7GR0oflrO/sdnJs8+ChzOL3htvyG0lJ9vV1iipV+KVLHx14ynLb65FNB1+VIUY mWKt61qzbD+4lAUXOasWbqYtZie8Z9qB6axlhL6oaF6VLItawSi4+Hkx/mlSbsm2wJuI UkWg== 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; bh=HeOVro+otyADpcyD6b86HkD7lruoKaaeHTH1sbe9jEA=; b=YFtm5c3EbyBNra/+vwVvfeg9mJn7jUQo0V+TpG/cy5z2Imc1QJ6vMfWF3wDoxiV7Od mYHshjkuszwgJ1GgGiafwxKaKJOk1LubgANvYp+DKOYPoj18pc4/BQIDpyOwMrgBme66 Qd3FDVGLNS1wUcY4U2tfHRErOeT9zn712b5mHSZoBSquPQtMMUJklA173BqAIMdRUquM Hq45VJOY6nSyboc0n3QIigx5rfvJlO7Y3Wg2rV9cH0EbxKOeO9n93w0LVkDW03Hy83eN rtsND1U1MAKUWsIA+j0GkdZfq8uCOG7ZfCD190TaQ5tUDDEZBupPvy5GmJTM3D0F4tCq 4l/w== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id cc9si11758944plb.59.2019.02.25.14.01.10; Mon, 25 Feb 2019 14:01: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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730085AbfBYVST (ORCPT + 99 others); Mon, 25 Feb 2019 16:18:19 -0500 Received: from mail-oi1-f196.google.com ([209.85.167.196]:41288 "EHLO mail-oi1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730081AbfBYVSQ (ORCPT ); Mon, 25 Feb 2019 16:18:16 -0500 Received: by mail-oi1-f196.google.com with SMTP id e7so8528216oia.8 for ; Mon, 25 Feb 2019 13:18:16 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=HeOVro+otyADpcyD6b86HkD7lruoKaaeHTH1sbe9jEA=; b=sNm8iU1utnt2QpbJ+anoJg6ClF/WSgobajSfKFA099qJKRwkKiNRT+WOC9kT8p6kQ4 p+Yap0zwJS1/f1AkAbJveHhdggG1Gj3loFwRkyJOyOwkh8LDjb5W7oN3V+CnnPr2MAHa V6E+aLQ4YHW9TawkSy8NNT2BpLo+VZ+PojxB/6BV+wotmsnmSHNYWqjZ6EK5ENLgj6nY RQELUPhOfmawhbZSC4L+8t8kTd82CBdTIx9IjDOD/vR7GVBXigbGDnaWMPKA1qp0IlHS RUHXkhgGDEr7r6/+aL2jdArcypb/r8vSvqhQvGc4PE0vX4wkM/cjgz5v0F6bbXMIq63v KmKQ== X-Gm-Message-State: AHQUAuZ9xSzjA+BJpT0T7A/Y7qcRnHilnkwSUU4NLqDcCz/dDtDfFpHI rtkmuMTpULvbmbei3uv7g8gj03cw X-Received: by 2002:aca:3687:: with SMTP id d129mr219348oia.51.1551129495812; Mon, 25 Feb 2019 13:18:15 -0800 (PST) Received: from [192.168.1.114] (162-195-240-247.lightspeed.sntcca.sbcglobal.net. [162.195.240.247]) by smtp.gmail.com with ESMTPSA id l18sm4592526otp.74.2019.02.25.13.18.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 25 Feb 2019 13:18:15 -0800 (PST) Subject: Re: [PATCH] nvmet: disable direct I/O when unavailable To: Johannes Thumshirn , Chaitanya Kulkarni , Christoph Hellwig Cc: Linux Kernel Mailinglist , Linux NVMe Mailinglist References: <20190221182234.22345-1-jthumshirn@suse.de> <6c3fa30a-d516-a453-a001-1014202ff9ce@suse.de> From: Sagi Grimberg Message-ID: <71982410-d373-a659-0c0f-8aadf06d1d96@grimberg.me> Date: Mon, 25 Feb 2019 13:18:10 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: <6c3fa30a-d516-a453-a001-1014202ff9ce@suse.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > Frankly, we have a ton of testing related special cases in the kernel. > > This one is a) simple and small, only 10 LoC, b) far away from the fast > path or any other place where it could have any impact on legitimate > users and c) it prints an informal message showing you what happened. > > Sorry but this is a https://xkcd.com/386/ moment. How about we just fail it with a proper error message and let the user set buffered_io instead of trying to get smart here...