From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx2.suse.de ([195.135.220.15]:54790 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726545AbeLRLx7 (ORCPT ); Tue, 18 Dec 2018 06:53:59 -0500 Date: Tue, 18 Dec 2018 05:53:54 -0600 From: Goldwyn Rodrigues To: Dave Chinner Cc: linux-fsdevel@vger.kernel.org, linux-aio@kvack.org, avi@scylladb.com Subject: Re: [PATCH] fs: Return EOPNOTSUPP if block layer does not support REQ_NOWAIT Message-ID: <20181218115354.x45jvpftvwcu2aqj@merlin> References: <20181213115306.fm2mjc3qszjiwkgf@merlin> <20181213224327.GE29416@dastard> <20181214170910.stjuosemzvqkcs24@merlin> <20181216213504.GB10644@dastard> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181216213504.GB10644@dastard> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On 8:35 17/12, Dave Chinner wrote: > > > > I was not too happy getting it all the way down to block layer either. > > The multi-devices makes it worse. However, here we are and we need to > > tell the user that RWF_NOWAIT is not supported in this environment. > > RWF_NOWAIT matters for filesystems much more than the underlying > block device. If the application is accessing the blockd evice > directly, then yes, RWF_NOWAIT support in the block device matters. > But when the IO is being done through the filesystem it's far more > important to avoid blocking on filesystem locks that whatever the > block device does.... > > Hence I think that if the bio is coming from a filesystem, > REQ_NOWAIT should always be accepted or bounced with EAGAIN and > never failed with EOPNOTSUPP. It just makes no sense at all for > filesytsem based IO.... It was initially suggested where the block layer would retry getting a bio in get_request(). While request based devices were fine, the bio based ones such as MD needed extra work. However, when I actually got down to writing code for multi-device, it got more hurdles than solutions primarily in the area of bio merging. RWF_NOWAIT should have been restricted to filesystems and I think we should do away (or at least ignore) REQ_NOWAIT for now. -- Goldwyn