From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: Re: [PATCH v2 2/2] fuse: permit O_DIRECT flag in open() Date: Thu, 28 Jul 2011 07:49:43 -0400 Message-ID: <20110728114943.GA16704@infradead.org> References: <1311764179-20326-1-git-send-email-avati@gluster.com> <1311764179-20326-2-git-send-email-avati@gluster.com> <20110727210514.GD9066@infradead.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Christoph Hellwig , miklos@szeredi.hu, fuse-devel@lists.sourceforge.net, linux-fsdevel@vger.kernel.org To: Anand Avati Return-path: Received: from 173-166-109-252-newengland.hfc.comcastbusiness.net ([173.166.109.252]:55988 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755529Ab1G1Ltp (ORCPT ); Thu, 28 Jul 2011 07:49:45 -0400 Content-Disposition: inline In-Reply-To: Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Thu, Jul 28, 2011 at 01:44:08PM +0530, Anand Avati wrote: > FUSE already has a direct IO implementation (struct file_operations > fuse_direct_io_file_operation) but is currently set as a file's f_ops > only based on flags returned from the filesystem server (in the reply > of an open() call). This patch just lets the filesystem server know a > userspace application's intention to open a file with O_DIRECT and > leaves it with the decision to pick direct IO mode on the file (just > the way it already does before the patch.) There is already a > framework for direct IO operations and this patch only bridges > O_DIRECT flag with that framework. Do you still think this is entirely > incorrect? Your clearing of the O_DIRECT flag is. The current handling of O_DIRECT in the VFS is a bit nasty, but if you have an issue with that fix it up properly instead of piling more hacks on top of it.