1. 01 7月, 2009 1 次提交
  2. 28 4月, 2009 12 次提交
  3. 09 4月, 2009 2 次提交
  4. 02 4月, 2009 2 次提交
    • M
      fuse: allow private mappings of "direct_io" files · fc280c96
      Miklos Szeredi 提交于
      Allow MAP_PRIVATE mmaps of "direct_io" files.  This is necessary for
      execute support.
      
      MAP_SHARED mappings require some sort of coherency between the
      underlying file and the mapping.  With "direct_io" it is difficult to
      provide this, so for the moment just disallow shared (read-write and
      read-only) mappings altogether.
      Signed-off-by: NMiklos Szeredi <mszeredi@suse.cz>
      fc280c96
    • M
      fuse: allow kernel to access "direct_io" files · f4975c67
      Miklos Szeredi 提交于
      Allow the kernel read and write on "direct_io" files.  This is
      necessary for nfs export and execute support.
      
      The implementation is simple: if an access from the kernel is
      detected, don't perform get_user_pages(), just use the kernel address
      provided by the requester to copy from/to the userspace filesystem.
      Signed-off-by: NMiklos Szeredi <mszeredi@suse.cz>
      f4975c67
  5. 01 4月, 2009 1 次提交
    • N
      mm: page_mkwrite change prototype to match fault · c2ec175c
      Nick Piggin 提交于
      Change the page_mkwrite prototype to take a struct vm_fault, and return
      VM_FAULT_xxx flags.  There should be no functional change.
      
      This makes it possible to return much more detailed error information to
      the VM (and also can provide more information eg.  virtual_address to the
      driver, which might be important in some special cases).
      
      This is required for a subsequent fix.  And will also make it easier to
      merge page_mkwrite() with fault() in future.
      Signed-off-by: NNick Piggin <npiggin@suse.de>
      Cc: Chris Mason <chris.mason@oracle.com>
      Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
      Cc: Miklos Szeredi <miklos@szeredi.hu>
      Cc: Steven Whitehouse <swhiteho@redhat.com>
      Cc: Mark Fasheh <mfasheh@suse.com>
      Cc: Joel Becker <joel.becker@oracle.com>
      Cc: Artem Bityutskiy <dedekind@infradead.org>
      Cc: Felix Blyakher <felixb@sgi.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      c2ec175c
  6. 30 3月, 2009 1 次提交
  7. 26 1月, 2009 1 次提交
  8. 05 1月, 2009 1 次提交
    • N
      fs: symlink write_begin allocation context fix · 54566b2c
      Nick Piggin 提交于
      With the write_begin/write_end aops, page_symlink was broken because it
      could no longer pass a GFP_NOFS type mask into the point where the
      allocations happened.  They are done in write_begin, which would always
      assume that the filesystem can be entered from reclaim.  This bug could
      cause filesystem deadlocks.
      
      The funny thing with having a gfp_t mask there is that it doesn't really
      allow the caller to arbitrarily tinker with the context in which it can be
      called.  It couldn't ever be GFP_ATOMIC, for example, because it needs to
      take the page lock.  The only thing any callers care about is __GFP_FS
      anyway, so turn that into a single flag.
      
      Add a new flag for write_begin, AOP_FLAG_NOFS.  Filesystems can now act on
      this flag in their write_begin function.  Change __grab_cache_page to
      accept a nofs argument as well, to honour that flag (while we're there,
      change the name to grab_cache_page_write_begin which is more instructive
      and does away with random leading underscores).
      
      This is really a more flexible way to go in the end anyway -- if a
      filesystem happens to want any extra allocations aside from the pagecache
      ones in ints write_begin function, it may now use GFP_KERNEL (rather than
      GFP_NOFS) for common case allocations (eg.  ocfs2_alloc_write_ctxt, for a
      random example).
      
      [kosaki.motohiro@jp.fujitsu.com: fix ubifs]
      [kosaki.motohiro@jp.fujitsu.com: fix fuse]
      Signed-off-by: NNick Piggin <npiggin@suse.de>
      Reviewed-by: NKOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
      Cc: <stable@kernel.org>		[2.6.28.x]
      Signed-off-by: NKOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      [ Cleaned up the calling convention: just pass in the AOP flags
        untouched to the grab_cache_page_write_begin() function.  That
        just simplifies everybody, and may even allow future expansion of the
        logic.   - Linus ]
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      54566b2c
  9. 02 12月, 2008 2 次提交
  10. 26 11月, 2008 6 次提交
    • T
      fuse: add fuse_ prefix to several functions · b93f858a
      Tejun Heo 提交于
      Add fuse_ prefix to request_send*() and get_root_inode() as some of
      those functions will be exported for CUSE.  With or without CUSE
      export, having the function names scoped is a good idea for
      debuggability.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Signed-off-by: NMiklos Szeredi <mszeredi@suse.cz>
      b93f858a
    • T
      fuse: implement poll support · 95668a69
      Tejun Heo 提交于
      Implement poll support.  Polled files are indexed using kh in a RB
      tree rooted at fuse_conn->polled_files.
      
      Client should send FUSE_NOTIFY_POLL notification once after processing
      FUSE_POLL which has FUSE_POLL_SCHEDULE_NOTIFY set.  Sending
      notification unconditionally after the latest poll or everytime file
      content might have changed is inefficient but won't cause malfunction.
      
      fuse_file_poll() can sleep and requires patches from the following
      thread which allows f_op->poll() to sleep.
      
        http://thread.gmane.org/gmane.linux.kernel/726176Signed-off-by: NTejun Heo <tj@kernel.org>
      Signed-off-by: NMiklos Szeredi <mszeredi@suse.cz>
      95668a69
    • T
      fuse: add file kernel handle · acf99433
      Tejun Heo 提交于
      The file handle, fuse_file->fh, is opaque value supplied by userland
      FUSE server and uniqueness is not guaranteed.  Add file kernel handle,
      fuse_file->kh, which is allocated by the kernel on file allocation and
      guaranteed to be unique.
      
      This will be used by poll to match notification to the respective file
      but can be used for other purposes where unique file handle is
      necessary.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Signed-off-by: NMiklos Szeredi <mszeredi@suse.cz>
      acf99433
    • T
      fuse: implement ioctl support · 59efec7b
      Tejun Heo 提交于
      Generic ioctl support is tricky to implement because only the ioctl
      implementation itself knows which memory regions need to be read
      and/or written.  To support this, fuse client can request retry of
      ioctl specifying memory regions to read and write.  Deep copying
      (nested pointers) can be implemented by retrying multiple times
      resolving one depth of dereference at a time.
      
      For security and cleanliness considerations, ioctl implementation has
      restricted mode where the kernel determines data transfer directions
      and sizes using the _IOC_*() macros on the ioctl command.  In this
      mode, retry is not allowed.
      
      For all FUSE servers, restricted mode is enforced.  Unrestricted ioctl
      will be used by CUSE.
      
      Plese read the comment on top of fs/fuse/file.c::fuse_file_do_ioctl()
      for more information.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Signed-off-by: NMiklos Szeredi <mszeredi@suse.cz>
      59efec7b
    • T
      fuse: don't let fuse_req->end() put the base reference · e9bb09dd
      Tejun Heo 提交于
      fuse_req->end() was supposed to be put the base reference but there's
      no reason why it should.  It only makes things more complex.  Move it
      out of ->end() and make it the responsibility of request_end().
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Signed-off-by: NMiklos Szeredi <mszeredi@suse.cz>
      e9bb09dd
    • M
      fuse: style fixes · 1729a16c
      Miklos Szeredi 提交于
      Fix coding style errors reported by checkpatch and others.  Uptdate
      copyright date to 2008.
      Signed-off-by: NMiklos Szeredi <mszeredi@suse.cz>
      1729a16c
  11. 16 10月, 2008 2 次提交
  12. 27 7月, 2008 1 次提交
  13. 26 7月, 2008 1 次提交
  14. 13 5月, 2008 1 次提交
    • M
      fuse: add flag to turn on big writes · 78bb6cb9
      Miklos Szeredi 提交于
      Prior to 2.6.26 fuse only supported single page write requests.  In theory all
      fuse filesystem should be able support bigger than 4k writes, as there's
      nothing in the API to prevent it.  Unfortunately there's a known case in
      NTFS-3G where big writes cause filesystem corruption.  There could also be
      other filesystems, where the lack of testing with big write requests would
      result in bugs.
      
      To prevent such problems on a kernel upgrade, disable big writes by default,
      but let filesystems set a flag to turn it on.
      Signed-off-by: NMiklos Szeredi <mszeredi@suse.cz>
      Cc: Szabolcs Szakacsits <szaka@ntfs-3g.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      78bb6cb9
  15. 01 5月, 2008 1 次提交
  16. 30 4月, 2008 5 次提交