1. 20 11月, 2013 1 次提交
    • P
      Squashfs: Refactor decompressor interface and code · 9508c6b9
      Phillip Lougher 提交于
      The decompressor interface and code was written from
      the point of view of single-threaded operation.  In doing
      so it mixed a lot of single-threaded implementation specific
      aspects into the decompressor code and elsewhere which makes it
      difficult to seamlessly support multiple different decompressor
      implementations.
      
      This patch does the following:
      
      1.  It removes compressor_options parsing from the decompressor
          init() function.  This allows the decompressor init() function
          to be dynamically called to instantiate multiple decompressors,
          without the compressor options needing to be read and parsed each
          time.
      
      2.  It moves threading and all sleeping operations out of the
          decompressors.  In doing so, it makes the decompressors
          non-blocking wrappers which only deal with interfacing with
          the decompressor implementation.
      
      3. It splits decompressor.[ch] into decompressor generic functions
         in decompressor.[ch], and moves the single threaded
         decompressor implementation into decompressor_single.c.
      
      The result of this patch is Squashfs should now be able to
      support multiple decompressors by adding new decompressor_xxx.c
      files with specialised implementations of the functions in
      decompressor_single.c
      Signed-off-by: NPhillip Lougher <phillip@squashfs.org.uk>
      Reviewed-by: NMinchan Kim <minchan@kernel.org>
      9508c6b9
  2. 11 3月, 2013 1 次提交
  3. 03 10月, 2012 1 次提交
  4. 21 3月, 2012 1 次提交
  5. 10 3月, 2012 1 次提交
    • P
      Squashfs: add mount time sanity check for block_size and block_log match · 4b0180a4
      Phillip Lougher 提交于
      Squashfs currently has a sanity check for block_size less than or
      equal to the maximum block_size (1 Mbyte).  This catches some
      superblock corruption, but obviously with a block_size maximum
      of 1 Mbyte there's 7 correct values (4K, 8K, 16K, 32K, ... etc) and
      a lot of incorrect values which are not caught by this check.
      
      The Squashfs superblock, however, has both a block_size and
      a block_log (2^block_log == block_size).  Checking that the block_size
      matches the block_log is a much more robust check.  Corruption of the
      superblock is unlikely to produce values which match, and it also
      ensures the block_size is an exact power of two.
      Signed-off-by: NPhillip Lougher <phillip@squashfs.org.uk>
      4b0180a4
  6. 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
  7. 03 1月, 2012 1 次提交
  8. 03 11月, 2011 1 次提交
    • P
      Squashfs: Add an option to set dev block size to 4K · 7657cacf
      Phillip Lougher 提交于
      This commit adds an option to set the device block size used to 4K.
      
      By default Squashfs sets the device block size (sb_min_blocksize) to 1K
      or the smallest block size supported by the block device (if larger).
      This, because blocks are packed together and unaligned in Squashfs,
      should reduce latency.
      
      This, however, gives poor performance on MTD NAND devices where
      the optimal I/O size is 4K (even though the devices can support
      smaller block sizes).
      
      Using a 4K device block size may also improve overall I/O
      performance for some file access patterns (e.g. sequential
      accesses of files in filesystem order) on all media.
      Signed-off-by: NPhillip Lougher <phillip@squashfs.org.uk>
      7657cacf
  9. 29 5月, 2011 1 次提交
  10. 26 5月, 2011 7 次提交
  11. 01 3月, 2011 2 次提交
  12. 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
  13. 29 10月, 2010 1 次提交
  14. 05 10月, 2010 2 次提交
    • A
      BKL: Remove BKL from squashfs · 3dbc4b32
      Arnd Bergmann 提交于
      The BKL is only used in put_super and fill_super, which are both 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: Phillip Lougher <phillip@lougher.demon.co.uk>
      3dbc4b32
    • 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
  15. 18 5月, 2010 3 次提交
  16. 25 4月, 2010 2 次提交
  17. 21 1月, 2010 2 次提交
  18. 22 9月, 2009 1 次提交
  19. 13 7月, 2009 1 次提交
  20. 12 6月, 2009 1 次提交
    • 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
  21. 13 5月, 2009 1 次提交
  22. 03 4月, 2009 1 次提交
  23. 05 3月, 2009 1 次提交
  24. 16 1月, 2009 1 次提交
  25. 05 1月, 2009 1 次提交