From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from 22.17.110.36.static.bjtelecom.net ([36.110.17.22]:14235 "EHLO BJEXCAS004.didichuxing.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1751558AbdIABhG (ORCPT ); Thu, 31 Aug 2017 21:37:06 -0400 Date: Fri, 1 Sep 2017 09:36:53 +0800 From: weiping zhang To: CC: Subject: Re: [PATCH RFC v3] fs: Avoid create file when open() with O_DIRECT if fs not support Message-ID: <20170901013653.GA30611@localhost.didichuxing.com> References: <20170828130719.GA11360@localhost.didichuxing.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20170828130719.GA11360@localhost.didichuxing.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Mon, Aug 28, 2017 at 09:07:27PM +0800, weiping zhang wrote: > Some filesystems not support O_DIRECT, when user open with O_DIRECT , > an errno -EINVAL return to userspace by open_check_o_direct, but the > file has been created, it's a strange thing. Add a checking for that > can avoid creating file if fs not support O_DIRECT. > Hi AI, would you please give some comments for this patch, --- v2 -> v3: introduce a new function for checking inode support direct io or not. v1 -> v2: a common way checking if fs support direct io, no matter what underlaying filesystem is. Thanks