1. 04 Apr, 2016 1 commit
  2. 30 Dec, 2015 1 commit
  3. 23 Jul, 2015 1 commit
    • Jan Kara's avatar
      fs: Remove ext3 filesystem driver · c290ea01
      Jan Kara authored
      The functionality of ext3 is fully supported by ext4 driver. Major
      distributions (SUSE, RedHat) already use ext4 driver to handle ext3
      filesystems for quite some time. There is some ugliness in mm resulting
      from jbd cleaning buffers in a dirty page without cleaning page dirty
      bit and also support for buffer bouncing in the block layer when stable
      pages are required is there only because of jbd. So let's remove the
      ext3 driver. This saves us some 28k lines of duplicated code.
      Acked-by: 's avatarTheodore Ts'o <tytso@mit.edu>
      Signed-off-by: 's avatarJan Kara <jack@suse.cz>
      c290ea01
  4. 08 Jun, 2015 1 commit
  5. 15 May, 2015 1 commit
  6. 11 May, 2015 3 commits
    • Al Viro's avatar
      switch ->put_link() from dentry to inode · 5f2c4179
      Al Viro authored
      only one instance looks at that argument at all; that sole
      exception wants inode rather than dentry.
      Signed-off-by: 's avatarAl Viro <viro@zeniv.linux.org.uk>
      5f2c4179
    • Al Viro's avatar
      don't pass nameidata to ->follow_link() · 6e77137b
      Al Viro authored
      its only use is getting passed to nd_jump_link(), which can obtain
      it from current->nameidata
      Signed-off-by: 's avatarAl Viro <viro@zeniv.linux.org.uk>
      6e77137b
    • Al Viro's avatar
      new ->follow_link() and ->put_link() calling conventions · 680baacb
      Al Viro authored
      a) instead of storing the symlink body (via nd_set_link()) and returning
      an opaque pointer later passed to ->put_link(), ->follow_link() _stores_
      that opaque pointer (into void * passed by address by caller) and returns
      the symlink body.  Returning ERR_PTR() on error, NULL on jump (procfs magic
      symlinks) and pointer to symlink body for normal symlinks.  Stored pointer
      is ignored in all cases except the last one.
      
      Storing NULL for opaque pointer (or not storing it at all) means no call
      of ->put_link().
      
      b) the body used to be passed to ->put_link() implicitly (via nameidata).
      Now only the opaque pointer is.  In the cases when we used the symlink body
      to free stuff, ->follow_link() now should store it as opaque pointer in addition
      to returning it.
      Signed-off-by: 's avatarAl Viro <viro@zeniv.linux.org.uk>
      680baacb
  7. 12 Apr, 2015 2 commits
  8. 17 Feb, 2015 1 commit
    • Matthew Wilcox's avatar
      vfs: remove get_xip_mem · e748dcd0
      Matthew Wilcox authored
      All callers of get_xip_mem() are now gone.  Remove checks for it,
      initialisers of it, documentation of it and the only implementation of it.
       Also remove mm/filemap_xip.c as it is now empty.  Also remove
      documentation of the long-gone get_xip_page().
      Signed-off-by: 's avatarMatthew Wilcox <matthew.r.wilcox@intel.com>
      Cc: Andreas Dilger <andreas.dilger@intel.com>
      Cc: Boaz Harrosh <boaz@plexistor.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Dave Chinner <david@fromorbit.com>
      Cc: Jan Kara <jack@suse.cz>
      Cc: Jens Axboe <axboe@kernel.dk>
      Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
      Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
      Cc: Randy Dunlap <rdunlap@infradead.org>
      Cc: Ross Zwisler <ross.zwisler@linux.intel.com>
      Cc: Theodore Ts'o <tytso@mit.edu>
      Signed-off-by: 's avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: 's avatarLinus Torvalds <torvalds@linux-foundation.org>
      e748dcd0
  9. 05 Nov, 2014 1 commit
  10. 23 Oct, 2014 1 commit
  11. 09 Oct, 2014 1 commit
  12. 07 Oct, 2014 2 commits
  13. 07 Aug, 2014 1 commit
    • NeilBrown's avatar
      VFS: allow ->d_manage() to declare -EISDIR in rcu_walk mode. · b8faf035
      NeilBrown authored
      In REF-walk mode, ->d_manage can return -EISDIR to indicate
      that the dentry is not really a mount trap (or even a mount point)
      and that any mounts or any DCACHE_NEED_AUTOMOUNT flag should be
      ignored.
      
      RCU-walk mode doesn't currently support this, so if there is a dentry
      with DCACHE_NEED_AUTOMOUNT set but which shouldn't be a mount-trap,
      lookup_fast() will always drop in REF-walk mode.
      
      With this patch, an -EISDIR from ->d_manage will always cause mounts
      and automounts to be ignored, both in REF-walk and RCU-walk.
      Bug-fixed-by: 's avatarDan Carpenter <dan.carpenter@oracle.com>
      Cc: Ian Kent <raven@themaw.net>
      Signed-off-by: 's avatarNeilBrown <neilb@suse.de>
      Signed-off-by: 's avatarAl Viro <viro@zeniv.linux.org.uk>
      b8faf035
  14. 06 May, 2014 2 commits
    • Al Viro's avatar
      new methods: ->read_iter() and ->write_iter() · 293bc982
      Al Viro authored
      Beginning to introduce those.  Just the callers for now, and it's
      clumsier than it'll eventually become; once we finish converting
      aio_read and aio_write instances, the things will get nicer.
      
      For now, these guys are in parallel to ->aio_read() and ->aio_write();
      they take iocb and iov_iter, with everything in iov_iter already
      validated.  File offset is passed in iocb->ki_pos, iov/nr_segs -
      in iov_iter.
      
      Main concerns in that series are stack footprint and ability to
      split the damn thing cleanly.
      
      [fix from Peter Ujfalusi <peter.ujfalusi@ti.com> folded]
      Signed-off-by: 's avatarAl Viro <viro@zeniv.linux.org.uk>
      293bc982
    • Al Viro's avatar
      pass iov_iter to ->direct_IO() · d8d3d94b
      Al Viro authored
      unmodified, for now
      Signed-off-by: 's avatarAl Viro <viro@zeniv.linux.org.uk>
      d8d3d94b
  15. 02 Apr, 2014 1 commit
  16. 01 Apr, 2014 1 commit
  17. 31 Jan, 2014 1 commit
  18. 16 Sep, 2013 1 commit
    • Miklos Szeredi's avatar
      vfs: improve i_op->atomic_open() documentation · 0854d450
      Miklos Szeredi authored
      Fix documentation of ->atomic_open() and related functions: finish_open()
      and finish_no_open().  Also add details that seem to be unclear and a
      source of bugs (some of which are fixed in the following series).
      
      Cc-ing maintainers of all filesystems implementing ->atomic_open().
      Signed-off-by: 's avatarMiklos Szeredi <mszeredi@suse.cz>
      Cc: Eric Van Hensbergen <ericvh@gmail.com>
      Cc: Sage Weil <sage@inktank.com>
      Cc: Steve French <sfrench@samba.org>
      Cc: Steven Whitehouse <swhiteho@redhat.com>
      Cc: Trond Myklebust <Trond.Myklebust@netapp.com>
      Signed-off-by: 's avatarAl Viro <viro@zeniv.linux.org.uk>
      0854d450
  19. 03 Jul, 2013 3 commits
  20. 29 Jun, 2013 2 commits
  21. 22 May, 2013 1 commit
    • Lukas Czerner's avatar
      mm: change invalidatepage prototype to accept length · d47992f8
      Lukas Czerner authored
      Currently there is no way to truncate partial page where the end
      truncate point is not at the end of the page. This is because it was not
      needed and the functionality was enough for file system truncate
      operation to work properly. However more file systems now support punch
      hole feature and it can benefit from mm supporting truncating page just
      up to the certain point.
      
      Specifically, with this functionality truncate_inode_pages_range() can
      be changed so it supports truncating partial page at the end of the
      range (currently it will BUG_ON() if 'end' is not at the end of the
      page).
      
      This commit changes the invalidatepage() address space operation
      prototype to accept range to be invalidated and update all the instances
      for it.
      
      We also change the block_invalidatepage() in the same way and actually
      make a use of the new length argument implementing range invalidation.
      
      Actual file system implementations will follow except the file systems
      where the changes are really simple and should not change the behaviour
      in any way .Implementation for truncate_page_range() which will be able
      to accept page unaligned ranges will follow as well.
      Signed-off-by: 's avatarLukas Czerner <lczerner@redhat.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Hugh Dickins <hughd@google.com>
      d47992f8
  22. 26 Feb, 2013 1 commit
    • Jeff Layton's avatar
      vfs: kill FS_REVAL_DOT by adding a d_weak_revalidate dentry op · ecf3d1f1
      Jeff Layton authored
      The following set of operations on a NFS client and server will cause
      
          server# mkdir a
          client# cd a
          server# mv a a.bak
          client# sleep 30  # (or whatever the dir attrcache timeout is)
          client# stat .
          stat: cannot stat `.': Stale NFS file handle
      
      Obviously, we should not be getting an ESTALE error back there since the
      inode still exists on the server. The problem is that the lookup code
      will call d_revalidate on the dentry that "." refers to, because NFS has
      FS_REVAL_DOT set.
      
      nfs_lookup_revalidate will see that the parent directory has changed and
      will try to reverify the dentry by redoing a LOOKUP. That of course
      fails, so the lookup code returns ESTALE.
      
      The problem here is that d_revalidate is really a bad fit for this case.
      What we really want to know at this point is whether the inode is still
      good or not, but we don't really care what name it goes by or whether
      the dcache is still valid.
      
      Add a new d_op->d_weak_revalidate operation and have complete_walk call
      that instead of d_revalidate. The intent there is to allow for a
      "weaker" d_revalidate that just checks to see whether the inode is still
      good. This is also gives us an opportunity to kill off the FS_REVAL_DOT
      special casing.
      
      [AV: changed method name, added note in porting, fixed confusion re
      having it possibly called from RCU mode (it won't be)]
      
      Cc: NeilBrown <neilb@suse.de>
      Signed-off-by: 's avatarJeff Layton <jlayton@redhat.com>
      Signed-off-by: 's avatarAl Viro <viro@zeniv.linux.org.uk>
      ecf3d1f1
  23. 20 Dec, 2012 1 commit
  24. 03 Aug, 2012 1 commit
  25. 01 Aug, 2012 1 commit
    • Mel Gorman's avatar
      mm: add support for a filesystem to activate swap files and use direct_IO for writing swap pages · 62c230bc
      Mel Gorman authored
      Currently swapfiles are managed entirely by the core VM by using ->bmap to
      allocate space and write to the blocks directly.  This effectively ensures
      that the underlying blocks are allocated and avoids the need for the swap
      subsystem to locate what physical blocks store offsets within a file.
      
      If the swap subsystem is to use the filesystem information to locate the
      blocks, it is critical that information such as block groups, block
      bitmaps and the block descriptor table that map the swap file were
      resident in memory.  This patch adds address_space_operations that the VM
      can call when activating or deactivating swap backed by a file.
      
        int swap_activate(struct file *);
        int swap_deactivate(struct file *);
      
      The ->swap_activate() method is used to communicate to the file that the
      VM relies on it, and the address_space should take adequate measures such
      as reserving space in the underlying device, reserving memory for mempools
      and pinning information such as the block descriptor table in memory.  The
      ->swap_deactivate() method is called on sys_swapoff() if ->swap_activate()
      returned success.
      
      After a successful swapfile ->swap_activate, the swapfile is marked
      SWP_FILE and swapper_space.a_ops will proxy to
      sis->swap_file->f_mappings->a_ops using ->direct_io to write swapcache
      pages and ->readpage to read.
      
      It is perfectly possible that direct_IO be used to read the swap pages but
      it is an unnecessary complication.  Similarly, it is possible that
      ->writepage be used instead of direct_io to write the pages but filesystem
      developers have stated that calling writepage from the VM is undesirable
      for a variety of reasons and using direct_IO opens up the possibility of
      writing back batches of swap pages in the future.
      
      [a.p.zijlstra@chello.nl: Original patch]
      Signed-off-by: 's avatarMel Gorman <mgorman@suse.de>
      Acked-by: 's avatarRik van Riel <riel@redhat.com>
      Cc: Christoph Hellwig <hch@infradead.org>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: Eric B Munson <emunson@mgebm.net>
      Cc: Eric Paris <eparis@redhat.com>
      Cc: James Morris <jmorris@namei.org>
      Cc: Mel Gorman <mgorman@suse.de>
      Cc: Mike Christie <michaelc@cs.wisc.edu>
      Cc: Neil Brown <neilb@suse.de>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
      Cc: Trond Myklebust <Trond.Myklebust@netapp.com>
      Cc: Xiaotian Feng <dfeng@redhat.com>
      Signed-off-by: 's avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: 's avatarLinus Torvalds <torvalds@linux-foundation.org>
      62c230bc
  26. 14 Jul, 2012 7 commits
    • Al Viro's avatar
      don't pass nameidata to ->create() · ebfc3b49
      Al Viro authored
      boolean "does it have to be exclusive?" flag is passed instead;
      Local filesystem should just ignore it - the object is guaranteed
      not to be there yet.
      Signed-off-by: 's avatarAl Viro <viro@zeniv.linux.org.uk>
      ebfc3b49
    • Al Viro's avatar
      stop passing nameidata to ->lookup() · 00cd8dd3
      Al Viro authored
      Just the flags; only NFS cares even about that, but there are
      legitimate uses for such argument.  And getting rid of that
      completely would require splitting ->lookup() into a couple
      of methods (at least), so let's leave that alone for now...
      Signed-off-by: 's avatarAl Viro <viro@zeniv.linux.org.uk>
      00cd8dd3
    • Al Viro's avatar
      stop passing nameidata * to ->d_revalidate() · 0b728e19
      Al Viro authored
      Just the lookup flags.  Die, bastard, die...
      Signed-off-by: 's avatarAl Viro <viro@zeniv.linux.org.uk>
      0b728e19
    • Al Viro's avatar
      kill struct opendata · 30d90494
      Al Viro authored
      Just pass struct file *.  Methods are happier that way...
      There's no need to return struct file * from finish_open() now,
      so let it return int.  Next: saner prototypes for parts in
      namei.c
      Signed-off-by: 's avatarAl Viro <viro@zeniv.linux.org.uk>
      30d90494
    • Al Viro's avatar
      make ->atomic_open() return int · d9585277
      Al Viro authored
      Change of calling conventions:
      old		new
      NULL		1
      file		0
      ERR_PTR(-ve)	-ve
      
      Caller *knows* that struct file *; no need to return it.
      Signed-off-by: 's avatarAl Viro <viro@zeniv.linux.org.uk>
      d9585277
    • Al Viro's avatar
      ->atomic_open() prototype change - pass int * instead of bool * · 47237687
      Al Viro authored
      ... and let finish_open() report having opened the file via that sucker.
      Next step: don't modify od->filp at all.
      
      [AV: FILE_CREATE was already used by cifs; Miklos' fix folded]
      Signed-off-by: 's avatarAl Viro <viro@zeniv.linux.org.uk>
      47237687
    • Miklos Szeredi's avatar
      vfs: add i_op->atomic_open() · d18e9008
      Miklos Szeredi authored
      Add a new inode operation which is called on the last component of an open.
      Using this the filesystem can look up, possibly create and open the file in one
      atomic operation.  If it cannot perform this (e.g. the file type turned out to
      be wrong) it may signal this by returning NULL instead of an open struct file
      pointer.
      
      i_op->atomic_open() is only called if the last component is negative or needs
      lookup.  Handling cached positive dentries here doesn't add much value: these
      can be opened using f_op->open().  If the cached file turns out to be invalid,
      the open can be retried, this time using ->atomic_open() with a fresh dentry.
      
      For now leave the old way of using open intents in lookup and revalidate in
      place.  This will be removed once all the users are converted.
      
      David Howells noticed that if ->atomic_open() opens the file but does not create
      it, handle_truncate() will be called on it even if it is not a regular file.
      Fix this by checking the file type in this case too.
      Signed-off-by: 's avatarMiklos Szeredi <mszeredi@suse.cz>
      Signed-off-by: 's avatarAl Viro <viro@zeniv.linux.org.uk>
      d18e9008