From mboxrd@z Thu Jan 1 00:00:00 1970 From: Brian Molnar Subject: fgetattr/fsetattr file operation Date: Wed, 3 Jun 2009 10:32:46 -0700 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit To: linux-fsdevel@vger.kernel.org Return-path: Received: from mail-gx0-f214.google.com ([209.85.217.214]:32879 "EHLO mail-gx0-f214.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756230AbZFCRco (ORCPT ); Wed, 3 Jun 2009 13:32:44 -0400 Received: by gxk10 with SMTP id 10so220487gxk.13 for ; Wed, 03 Jun 2009 10:32:46 -0700 (PDT) Sender: linux-fsdevel-owner@vger.kernel.org List-ID: There was some talk on this list a year or two ago about adding f_op->fgetattr and f_op->fsetattr methods to the VFS file_operations struct. For some reason or another, that was dropped on the floor, but I'd like to pick that back up and discus it once again. In the file-system I'm working on, there is a distinction between stat(2)s done against a pathname and fstat(2)s done against an open file descriptor. The results of the two are expected to differ in some circumstances. Moreover, I'm building this file-system in FUSE, and while I've managed to hack the underlying fuse code to achieve this behavior, it does so at a substantial performance cost. The more 'correct' solution here would be to export an fgetattr/fsetattr interface at VFS layer, then percolate that change up to the FUSE interface. Cheers, - Brian Molnar