From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752643AbcKYF1D (ORCPT ); Fri, 25 Nov 2016 00:27:03 -0500 Received: from imap.thunk.org ([74.207.234.97]:60674 "EHLO imap.thunk.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751237AbcKYF05 (ORCPT ); Fri, 25 Nov 2016 00:26:57 -0500 Date: Fri, 25 Nov 2016 00:26:39 -0500 From: "Theodore Ts'o" To: Fabian Frederick Cc: Jan Kara , Alexander Viro , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/1 linux-next] ext4: add compatibility flag check Message-ID: <20161125052639.3v56ef3clt7r52hr@thunk.org> Mail-Followup-To: Theodore Ts'o , Fabian Frederick , Jan Kara , Alexander Viro , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org References: <1480016861-24432-1-git-send-email-fabf@skynet.be> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1480016861-24432-1-git-send-email-fabf@skynet.be> User-Agent: NeoMutt/20161104 (1.7.1) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: tytso@thunk.org X-SA-Exim-Scanned: No (on imap.thunk.org); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 24, 2016 at 08:47:41PM +0100, Fabian Frederick wrote: > data=journal mount option should disable O_DIRECT access > (See Documentation/filesystems/ext4.txt) but open operations > using O_CREAT|O_RDWR|O_DIRECT|O_SYNC have no warning in return and file is being > created. This patch adds vfs super_operations compatibility flag function > returning -EPERM in such a case. > > Signed-off-by: Fabian Frederick The general practice by most file systems in Linux (for better or for worse) is to silently fall back to buffered I/O instead of failing the O_DIRECT open. Feel free to try to convince linux-fsdevel otherwise, but that is the general and historical consensus of Linux file system developers. Cheers, - Ted