mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: Chris Friesen <cfriesen@nortel.com>
Cc: linux-kernel@vger.kernel.org, hugh@veritas.com
Subject: Re: why does fsync() on a tmpfs directory give EINVAL?
Date: Thu, 16 Jun 2005 18:57:54 -0700	[thread overview]
Message-ID: <20050616185754.3646511e.akpm@osdl.org> (raw)
In-Reply-To: <42B22CD3.9080600@nortel.com>

Chris Friesen <cfriesen@nortel.com> wrote:
>
> Andrew Morton wrote:
> > Chris Friesen <cfriesen@nortel.com> wrote:
> 
> >>Currently tmpfs reuses the simple_dir_operations from libfs.c.
> >>
> >>Would it make sense to add the empty fsync() function there, and have 
> >>all other users pick it up as well?  Is this likely to break stuff?
> >  
> > Isn't simple_sync_file() suitable?
> 
> I think it would be fine.  The issue is that currently for directories 
> tmpfs doesn't have it's own set of operations--it reuses the 
> simple_dir_operations set of file ops from libfs.
> 
> We could make a tmpfs-specific set of operations that is identical to 
> simple_dir_operations but with the addition of setting the fsync 
> function to simple_sync_file().
> 
> Alternately, if it makes sense for all the users of 
> simple_dir_operations we could modify it directly and all of the other 
> users of simple_dir_operations would get the change for free.  I don't 
> know enough about the other filesystems to know if this makes sense or not.
> 

hm, what a lot of filesystems.

bix:/usr/src/linux-2.6.12-rc6> grep -rl simple_dir_operations .            
./drivers/usb/gadget/inode.c
./drivers/usb/core/inode.c
./drivers/isdn/capi/capifs.c
./drivers/oprofile/oprofilefs.c
./drivers/misc/ibmasm/ibmasmfs.c
./fs/libfs.c
./fs/debugfs/inode.c
./fs/autofs/inode.c
./fs/devpts/inode.c
./fs/hugetlbfs/inode.c
./fs/ramfs/inode.c
./include/linux/fs.h
./net/sunrpc/rpc_pipe.c
./kernel/cpuset.c
./security/selinux/selinuxfs.c
./ipc/mqueue.c
./mm/shmem.c

I can't think of any reason why any of these would want fsync(dir_fd) to
return -EINVAL.


  reply	other threads:[~2005-06-17  1:58 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-16 20:07 Chris Friesen
2005-06-16 20:57 ` Andrew Morton
2005-06-16 22:54   ` Chris Friesen
2005-06-16 23:29     ` Andrew Morton
2005-06-17  1:52       ` Chris Friesen
2005-06-17  1:57         ` Andrew Morton [this message]
2005-06-17  4:46           ` Chris Wedgwood
2005-06-17 13:32           ` Hugh Dickins
2005-06-17 14:28             ` Chris Friesen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050616185754.3646511e.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=cfriesen@nortel.com \
    --cc=hugh@veritas.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®