1. 07 1月, 2012 1 次提交
  2. 04 1月, 2012 1 次提交
    • A
      vfs: fix the stupidity with i_dentry in inode destructors · 6b520e05
      Al Viro 提交于
      Seeing that just about every destructor got that INIT_LIST_HEAD() copied into
      it, there is no point whatsoever keeping this INIT_LIST_HEAD in inode_init_once();
      the cost of taking it into inode_init_always() will be negligible for pipes
      and sockets and negative for everything else.  Not to mention the removal of
      boilerplate code from ->destroy_inode() instances...
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      6b520e05
  3. 19 10月, 2011 2 次提交
    • A
      jffs2: add compr=lzo and compr=zlib options · 123005f3
      Andres Salomon 提交于
      ..to allow forcing of either compression scheme.  This will override
      compiled-in defaults.  jffs2_compress is reworked a bit, as the lzo/zlib
      override shares lots of code w/ the PRIORITY mode.
      
      v2: update show_options accordingly.
      Signed-off-by: NAndres Salomon <dilinger@queued.net>
      Signed-off-by: NArtem Bityutskiy <artem.bityutskiy@intel.com>
      123005f3
    • A
      jffs2: implement mount option parsing and compression overriding · 92abc475
      Andres Salomon 提交于
      Currently jffs2 has compile-time constants (and .config options)
      controlling whether or not the various compression/decompression
      drivers are built in and enabled.  This is fine for embedded
      systems, but it clashes with distribution kernels.  Distro kernels
      tend to turn on everything; this causes OpenFirmware to fall
      over, as it understands ZLIB-compressed inodes.  Booting a kernel
      that has LZO compression enabled, writing to the boot partition,
      and then rebooting causes OFW to fail to read the kernel from
      the filesystem.  This is because LZO compression has priority
      when writing new data to jffs2, if LZO is enabled.
      
      This patch adds mount option parsing, and a single supported
      option ("compr=none").  This adds the flexibility of being
      able to specify which compressor overrides on a per-superblock
      basis.  For now, we can simply disable compression;
      additional flexibility coming soon.
      
      v2: kill some printks, and implement show_options as suggested
      by Artem Bityutskiy.
      Signed-off-by: NAndres Salomon <dilinger@queued.net>
      Signed-off-by: NArtem Bityutskiy <artem.bityutskiy@intel.com>
      92abc475
  4. 07 1月, 2011 1 次提交
    • N
      fs: icache RCU free inodes · fa0d7e3d
      Nick Piggin 提交于
      RCU free the struct inode. This will allow:
      
      - Subsequent store-free path walking patch. The inode must be consulted for
        permissions when walking, so an RCU inode reference is a must.
      - sb_inode_list_lock to be moved inside i_lock because sb list walkers who want
        to take i_lock no longer need to take sb_inode_list_lock to walk the list in
        the first place. This will simplify and optimize locking.
      - Could remove some nested trylock loops in dcache code
      - Could potentially simplify things a bit in VM land. Do not need to take the
        page lock to follow page->mapping.
      
      The downsides of this is the performance cost of using RCU. In a simple
      creat/unlink microbenchmark, performance drops by about 10% due to inability to
      reuse cache-hot slab objects. As iterations increase and RCU freeing starts
      kicking over, this increases to about 20%.
      
      In cases where inode lifetimes are longer (ie. many inodes may be allocated
      during the average life span of a single inode), a lot of this cache reuse is
      not applicable, so the regression caused by this patch is smaller.
      
      The cache-hot regression could largely be avoided by using SLAB_DESTROY_BY_RCU,
      however this adds some complexity to list walking and store-free path walking,
      so I prefer to implement this at a later date, if it is shown to be a win in
      real situations. I haven't found a regression in any non-micro benchmark so I
      doubt it will be a problem.
      Signed-off-by: NNick Piggin <npiggin@kernel.dk>
      fa0d7e3d
  5. 29 10月, 2010 1 次提交
  6. 05 10月, 2010 2 次提交
    • A
      BKL: Remove BKL from jffs2 · 1a028dd2
      Arnd Bergmann 提交于
      The BKL is only used in put_super, fill_super and remount_fs that are all
      three protected by the superblocks s_umount rw_semaphore. Therefore it is
      safe to remove the BKL entirely.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Cc: David Woodhouse <dwmw2@infradead.org>
      1a028dd2
    • J
      BKL: Explicitly add BKL around get_sb/fill_super · db719222
      Jan Blunck 提交于
      This patch is a preparation necessary to remove the BKL from do_new_mount().
      It explicitly adds calls to lock_kernel()/unlock_kernel() around
      get_sb/fill_super operations for filesystems that still uses the BKL.
      
      I've read through all the code formerly covered by the BKL inside
      do_kern_mount() and have satisfied myself that it doesn't need the BKL
      any more.
      
      do_kern_mount() is already called without the BKL when mounting the rootfs
      and in nfsctl. do_kern_mount() calls vfs_kern_mount(), which is called
      from various places without BKL: simple_pin_fs(), nfs_do_clone_mount()
      through nfs_follow_mountpoint(), afs_mntpt_do_automount() through
      afs_mntpt_follow_link(). Both later functions are actually the filesystems
      follow_link inode operation. vfs_kern_mount() is calling the specified
      get_sb function and lets the filesystem do its job by calling the given
      fill_super function.
      
      Therefore I think it is safe to push down the BKL from the VFS to the
      low-level filesystems get_sb/fill_super operation.
      
      [arnd: do not add the BKL to those file systems that already
             don't use it elsewhere]
      Signed-off-by: NJan Blunck <jblunck@infradead.org>
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Cc: Matthew Wilcox <matthew@wil.cx>
      Cc: Christoph Hellwig <hch@infradead.org>
      db719222
  7. 10 8月, 2010 1 次提交
  8. 20 5月, 2010 2 次提交
  9. 22 9月, 2009 1 次提交
  10. 13 7月, 2009 1 次提交
  11. 12 6月, 2009 5 次提交
    • C
      jffs2: call jffs2_write_super from jffs2_sync_fs · d579ed00
      Christoph Hellwig 提交于
      The call to ->write_super from __sync_filesystem will go away, so make
      sure jffs2 performs the same actions from inside ->sync_fs.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      d579ed00
    • C
      ->write_super lock_super pushdown · ebc1ac16
      Christoph Hellwig 提交于
      Push down lock_super into ->write_super instances and remove it from the
      caller.
      
      Following filesystem don't need ->s_lock in ->write_super and are skipped:
      
       * bfs, nilfs2 - no other uses of s_lock and have internal locks in
      	->write_super
       * ext2 - uses BKL in ext2_write_super and has internal calls without s_lock
       * reiserfs - no other uses of s_lock as has reiserfs_write_lock (BKL) in
       	->write_super
       * xfs - no other uses of s_lock and uses internal lock (buffer lock on
      	superblock buffer) to serialize ->write_super.  Also xfs_fs_write_super
      	is superflous and will go away in the next merge window
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      ebc1ac16
    • C
      jffs2: move jffs2_write_super to super.c · 01ba6875
      Christoph Hellwig 提交于
      jffs2_write_super is only called from super.c and doesn't use any
      functionality from fs.c.  So move it over to super.c and make it
      static there.
      
      [should go in through the vfs tree as it is a requirement for the
       next patch]
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      01ba6875
    • C
      push BKL down into ->put_super · 6cfd0148
      Christoph Hellwig 提交于
      Move BKL into ->put_super from the only caller.  A couple of
      filesystems had trivial enough ->put_super (only kfree and NULLing of
      s_fs_info + stuff in there) to not get any locking: coda, cramfs, efs,
      hugetlbfs, omfs, qnx4, shmem, all others got the full treatment.  Most
      of them probably don't need it, but I'd rather sort that out individually.
      Preferably after all the other BKL pushdowns in that area.
      
      [AV: original used to move lock_super() down as well; these changes are
      removed since we don't do lock_super() at all in generic_shutdown_super()
      now]
      [AV: fuse, btrfs and xfs are known to need no damn BKL, exempt]
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      6cfd0148
    • C
      remove ->write_super call in generic_shutdown_super · 8c85e125
      Christoph Hellwig 提交于
      We just did a full fs writeout using sync_filesystem before, and if
      that's not enough for the filesystem it can perform it's own writeout
      in ->put_super, which many filesystems already do.
      
      Move a call to foofs_write_super into every foofs_put_super for now to
      guarantee identical behaviour until it's cleaned up by the individual
      filesystem maintainers.
      
      Exceptions:
      
       - affs already has identical copy & pasted code at the beginning of
         affs_put_super so no need to do it twice.
       - xfs does the right thing without it and I have changes pending for
         the xfs tree touching this are so I don't really need conflicts
         here..
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      8c85e125
  12. 23 10月, 2008 1 次提交
  13. 27 7月, 2008 1 次提交
  14. 01 5月, 2008 1 次提交
  15. 22 4月, 2008 1 次提交
  16. 08 2月, 2008 1 次提交
  17. 17 10月, 2007 1 次提交
  18. 20 7月, 2007 1 次提交
    • P
      mm: Remove slab destructors from kmem_cache_create(). · 20c2df83
      Paul Mundt 提交于
      Slab destructors were no longer supported after Christoph's
      c59def9f change. They've been
      BUGs for both slab and slub, and slob never supported them
      either.
      
      This rips out support for the dtor pointer from kmem_cache_create()
      completely and fixes up every single callsite in the kernel (there were
      about 224, not including the slab allocator definitions themselves,
      or the documentation references).
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      20c2df83
  19. 17 5月, 2007 1 次提交
    • C
      Remove SLAB_CTOR_CONSTRUCTOR · a35afb83
      Christoph Lameter 提交于
      SLAB_CTOR_CONSTRUCTOR is always specified. No point in checking it.
      Signed-off-by: NChristoph Lameter <clameter@sgi.com>
      Cc: David Howells <dhowells@redhat.com>
      Cc: Jens Axboe <jens.axboe@oracle.com>
      Cc: Steven French <sfrench@us.ibm.com>
      Cc: Michael Halcrow <mhalcrow@us.ibm.com>
      Cc: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
      Cc: Miklos Szeredi <miklos@szeredi.hu>
      Cc: Steven Whitehouse <swhiteho@redhat.com>
      Cc: Roman Zippel <zippel@linux-m68k.org>
      Cc: David Woodhouse <dwmw2@infradead.org>
      Cc: Dave Kleikamp <shaggy@austin.ibm.com>
      Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
      Cc: "J. Bruce Fields" <bfields@fieldses.org>
      Cc: Anton Altaparmakov <aia21@cantab.net>
      Cc: Mark Fasheh <mark.fasheh@oracle.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Jan Kara <jack@ucw.cz>
      Cc: David Chinner <dgc@sgi.com>
      Cc: "David S. Miller" <davem@davemloft.net>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      a35afb83
  20. 11 5月, 2007 1 次提交
  21. 08 5月, 2007 1 次提交
    • C
      slab allocators: Remove SLAB_DEBUG_INITIAL flag · 50953fe9
      Christoph Lameter 提交于
      I have never seen a use of SLAB_DEBUG_INITIAL.  It is only supported by
      SLAB.
      
      I think its purpose was to have a callback after an object has been freed
      to verify that the state is the constructor state again?  The callback is
      performed before each freeing of an object.
      
      I would think that it is much easier to check the object state manually
      before the free.  That also places the check near the code object
      manipulation of the object.
      
      Also the SLAB_DEBUG_INITIAL callback is only performed if the kernel was
      compiled with SLAB debugging on.  If there would be code in a constructor
      handling SLAB_DEBUG_INITIAL then it would have to be conditional on
      SLAB_DEBUG otherwise it would just be dead code.  But there is no such code
      in the kernel.  I think SLUB_DEBUG_INITIAL is too problematic to make real
      use of, difficult to understand and there are easier ways to accomplish the
      same effect (i.e.  add debug code before kfree).
      
      There is a related flag SLAB_CTOR_VERIFY that is frequently checked to be
      clear in fs inode caches.  Remove the pointless checks (they would even be
      pointless without removeal of SLAB_DEBUG_INITIAL) from the fs constructors.
      
      This is the last slab flag that SLUB did not support.  Remove the check for
      unimplemented flags from SLUB.
      Signed-off-by: NChristoph Lameter <clameter@sgi.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      50953fe9
  22. 25 4月, 2007 1 次提交
    • D
      [JFFS2] Tidy up licensing/copyright boilerplate. · c00c310e
      David Woodhouse 提交于
      In particular, remove the bit in the LICENCE file about contacting
      Red Hat for alternative arrangements. Their errant IS department broke
      that arrangement a long time ago -- the policy of collecting copyright
      assignments from contributors came to an end when the plug was pulled on
      the servers hosting the project, without notice or reason.
      
      We do still dual-license it for use with eCos, with the GPL+exception
      licence approved by the FSF as being GPL-compatible. It's just that nobody
      has the right to license it differently.
      Signed-off-by: NDavid Woodhouse <dwmw2@infradead.org>
      c00c310e
  23. 13 2月, 2007 1 次提交
  24. 08 12月, 2006 2 次提交
  25. 29 11月, 2006 1 次提交
  26. 12 10月, 2006 1 次提交
  27. 27 9月, 2006 1 次提交
  28. 01 7月, 2006 1 次提交
  29. 23 6月, 2006 1 次提交
    • D
      [PATCH] VFS: Permit filesystem to override root dentry on mount · 454e2398
      David Howells 提交于
      Extend the get_sb() filesystem operation to take an extra argument that
      permits the VFS to pass in the target vfsmount that defines the mountpoint.
      
      The filesystem is then required to manually set the superblock and root dentry
      pointers.  For most filesystems, this should be done with simple_set_mnt()
      which will set the superblock pointer and then set the root dentry to the
      superblock's s_root (as per the old default behaviour).
      
      The get_sb() op now returns an integer as there's now no need to return the
      superblock pointer.
      
      This patch permits a superblock to be implicitly shared amongst several mount
      points, such as can be done with NFS to avoid potential inode aliasing.  In
      such a case, simple_set_mnt() would not be called, and instead the mnt_root
      and mnt_sb would be set directly.
      
      The patch also makes the following changes:
      
       (*) the get_sb_*() convenience functions in the core kernel now take a vfsmount
           pointer argument and return an integer, so most filesystems have to change
           very little.
      
       (*) If one of the convenience function is not used, then get_sb() should
           normally call simple_set_mnt() to instantiate the vfsmount. This will
           always return 0, and so can be tail-called from get_sb().
      
       (*) generic_shutdown_super() now calls shrink_dcache_sb() to clean up the
           dcache upon superblock destruction rather than shrink_dcache_anon().
      
           This is required because the superblock may now have multiple trees that
           aren't actually bound to s_root, but that still need to be cleaned up. The
           currently called functions assume that the whole tree is rooted at s_root,
           and that anonymous dentries are not the roots of trees which results in
           dentries being left unculled.
      
           However, with the way NFS superblock sharing are currently set to be
           implemented, these assumptions are violated: the root of the filesystem is
           simply a dummy dentry and inode (the real inode for '/' may well be
           inaccessible), and all the vfsmounts are rooted on anonymous[*] dentries
           with child trees.
      
           [*] Anonymous until discovered from another tree.
      
       (*) The documentation has been adjusted, including the additional bit of
           changing ext2_* into foo_* in the documentation.
      
      [akpm@osdl.org: convert ipath_fs, do other stuff]
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      Acked-by: NAl Viro <viro@zeniv.linux.org.uk>
      Cc: Nathan Scott <nathans@sgi.com>
      Cc: Roland Dreier <rolandd@cisco.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      454e2398
  30. 15 5月, 2006 1 次提交
    • D
      [JFFS2] Don't pack on-medium structures, because GCC emits crappy code · 3e68fbb5
      David Woodhouse 提交于
      If we use __attribute__((packed)), GCC will _also_ assume that the
      structures aren't sensibly aligned, and it'll emit code to cope with
      that instead of straight word load/save. This can be _very_ suboptimal
      on architectures like ARM.
      
      Ideally, we want an attribute which just tells GCC not to do any
      padding, without the alignment side-effects. In the absense of that,
      we'll just drop the 'packed' attribute and hope that everything stays as
      it was (which to be fair is fairly much what we expect). And add some
      paranoia checks in the initialisation code, which should be optimised
      away completely in the normal case.
      Signed-off-by: NDavid Woodhouse <dwmw2@infradead.org>
      3e68fbb5
  31. 13 5月, 2006 1 次提交
    • K
      [JFFS2][XATTR] XATTR support on JFFS2 (version. 5) · aa98d7cf
      KaiGai Kohei 提交于
      This attached patches provide xattr support including POSIX-ACL and
      SELinux support on JFFS2 (version.5).
      
      There are some significant differences from previous version posted
      at last December.
      The biggest change is addition of EBS(Erase Block Summary) support.
      Currently, both kernel and usermode utility (sumtool) can recognize
      xattr nodes which have JFFS2_NODETYPE_XATTR/_XREF nodetype.
      
      In addition, some bugs are fixed.
      - A potential race condition was fixed.
      - Unexpected fail when updating a xattr by same name/value pair was fixed.
      - A bug when removing xattr name/value pair was fixed.
      
      The fundamental structures (such as using two new nodetypes and exclusion
      mechanism by rwsem) are unchanged. But most of implementation were reviewed
      and updated if necessary.
      Espacially, we had to change several internal implementations related to
      load_xattr_datum() to avoid a potential race condition.
      
      [1/2] xattr_on_jffs2.kernel.version-5.patch
      [2/2] xattr_on_jffs2.utils.version-5.patch
      Signed-off-by: NKaiGai Kohei <kaigai@ak.jp.nec.com>
      Signed-off-by: NDavid Woodhouse <dwmw2@infradead.org>
      aa98d7cf
  32. 24 3月, 2006 1 次提交