1. 07 2月, 2008 3 次提交
  2. 29 1月, 2008 1 次提交
  3. 22 10月, 2007 2 次提交
  4. 17 10月, 2007 5 次提交
  5. 27 7月, 2007 1 次提交
    • E
      fix inode_table test in ext234_check_descriptors · 780dcdb2
      Eric Sandeen 提交于
      ext[234]_check_descriptors sanity checks block group descriptor geometry at
      mount time, testing whether the block bitmap, inode bitmap, and inode table
      reside wholly within the blockgroup.  However, the inode table test is off
      by one so that if the last block in the inode table resides on the last
      block of the block group, the test incorrectly fails.  This is because it
      tests the last block as (start + length) rather than (start + length - 1).
      
      This can be seen by trying to mount a filesystem made such as:
      
       mkfs.ext2 -F -b 1024 -m 0 -g 256 -N 3744 fsfile 1024
      
      which yields:
      
       EXT2-fs error (device loop0): ext2_check_descriptors: Inode table for group 0 not in group (block 101)!
       EXT2-fs: group descriptors corrupted!
      
      There is a similar bug in e2fsprogs, patch already sent for that.
      
      (I wonder if inside(), outside(), and/or in_range() should someday be
      used in this and other tests throughout the ext filesystems...)
      Signed-off-by: NEric Sandeen <sandeen@redhat.com>
      Cc: <linux-ext4@vger.kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      780dcdb2
  6. 20 7月, 2007 2 次提交
  7. 18 7月, 2007 1 次提交
  8. 17 7月, 2007 1 次提交
  9. 29 6月, 2007 1 次提交
  10. 24 6月, 2007 1 次提交
  11. 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
  12. 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
  13. 13 2月, 2007 1 次提交
  14. 12 2月, 2007 1 次提交
    • H
      [PATCH] fix umask when noACL kernel meets extN tuned for ACLs · 2e7842b8
      Hugh Dickins 提交于
      Fix insecure default behaviour reported by Tigran Aivazian: if an ext2 or
      ext3 or ext4 filesystem is tuned to mount with "acl", but mounted by a
      kernel built without ACL support, then umask was ignored when creating
      inodes - though root or user has umask 022, touch creates files as 0666,
      and mkdir creates directories as 0777.
      
      This appears to have worked right until 2.6.11, when a fix to the default
      mode on symlinks (always 0777) assumed VFS applies umask: which it does,
      unless the mount is marked for ACLs; but ext[234] set MS_POSIXACL in
      s_flags according to s_mount_opt set according to def_mount_opts.
      
      We could revert to the 2.6.10 ext[234]_init_acl (adding an S_ISLNK test);
      but other filesystems only set MS_POSIXACL when ACLs are configured.  We
      could fix this at another level; but it seems most robust to avoid setting
      the s_mount_opt flag in the first place (at the expense of more ifdefs).
      
      Likewise don't set the XATTR_USER flag when built without XATTR support.
      Signed-off-by: NHugh Dickins <hugh@veritas.com>
      Cc: Tigran Aivazian <tigran@aivazian.fsnet.co.uk>
      Cc: <linux-ext4@vger.kernel.org>
      Cc: Andreas Gruenbacher <agruen@suse.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      2e7842b8
  15. 09 12月, 2006 1 次提交
    • D
      [PATCH] LOG2: Implement a general integer log2 facility in the kernel · f0d1b0b3
      David Howells 提交于
      This facility provides three entry points:
      
      	ilog2()		Log base 2 of unsigned long
      	ilog2_u32()	Log base 2 of u32
      	ilog2_u64()	Log base 2 of u64
      
      These facilities can either be used inside functions on dynamic data:
      
      	int do_something(long q)
      	{
      		...;
      		y = ilog2(x)
      		...;
      	}
      
      Or can be used to statically initialise global variables with constant values:
      
      	unsigned n = ilog2(27);
      
      When performing static initialisation, the compiler will report "error:
      initializer element is not constant" if asked to take a log of zero or of
      something not reducible to a constant.  They treat negative numbers as
      unsigned.
      
      When not dealing with a constant, they fall back to using fls() which permits
      them to use arch-specific log calculation instructions - such as BSR on
      x86/x86_64 or SCAN on FRV - if available.
      
      [akpm@osdl.org: MMC fix]
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Herbert Xu <herbert@gondor.apana.org.au>
      Cc: David Howells <dhowells@redhat.com>
      Cc: Wojtek Kaniewski <wojtekka@toxygen.net>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      f0d1b0b3
  16. 08 12月, 2006 3 次提交
  17. 12 10月, 2006 1 次提交
    • V
      [PATCH] ext2: errors behaviour fix · 5a2b4062
      Vasily Averin 提交于
      Current error behaviour for ext2 and ext3 filesystems does not fully
      correspond to the documentation and should be fixed.
      
      According to man 8 mount, ext2 and ext3 file systems allow to set one of 3
      different on-errors behaviours:
      
        ---- start of quote man 8 mount ----
      
        errors=continue / errors=remount-ro / errors=panic
      
          Define the behaviour when an error is encountered.  (Either ignore
          errors and just mark the file system erroneous and continue, or remount
          the file system read-only, or panic and halt the system.) The default is
          set in the filesystem superblock, and can be changed using tune2fs(8).
      
        ---- end of quote ----
      
      However EXT3_ERRORS_CONTINUE is not read from the superblock, and thus
      ERRORS_CONT is not saved on the sbi->s_mount_opt.  It leads to the incorrect
      handle of errors on ext3.
      
      Then we've checked corresponding code in ext2 and discovered that it is buggy
      as well:
      
      - EXT2_ERRORS_CONTINUE is not read from the superblock (the same);
      
      - parse_option() does not clean the alternative values and thus something
        like (ERRORS_CONT|ERRORS_RO) can be set;
      
      - if options are omitted, parse_option() does not set any of these options.
      
      Therefore it is possible to set any combination of these options on the ext2:
      
      - none of them may be set: EXT2_ERRORS_CONTINUE on superblock / empty mount
        options;
      
      - any of them may be set using mount options;
      
      - 2 any options may be set: by using EXT2_ERRORS_RO/EXT2_ERRORS_PANIC on the
        superblock and other value in mount options;
      
      - and finally all three options may be set by adding third option in remount.
      
      Currently ext2 uses these values only in ext2_error() and it is not leading to
      any noticeable troubles.  However somebody may be discouraged when he will try
      to workaround EXT2_ERRORS_PANIC on the superblock by using errors=continue in
      mount options.
      
      This patch:
      
      EXT2_ERRORS_CONTINUE should be read from the superblock as default value for
      error behaviour.  parse_option() should clean the alternative options and
      should not change default value taken from the superblock.
      Signed-off-by: NVasily Averin <vvs@sw.ru>
      Acked-by: NKirill Korotaev <dev@openvz.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      5a2b4062
  18. 27 9月, 2006 3 次提交
  19. 19 9月, 2006 1 次提交
  20. 17 9月, 2006 1 次提交
  21. 28 8月, 2006 1 次提交
  22. 04 7月, 2006 1 次提交
    • A
      [PATCH] lockdep: annotate the quota code · 5c81a419
      Arjan van de Ven 提交于
      The quota code plays interesting games with the lock ordering; to quote Jan:
      
      | i_mutex of inode containing quota file is acquired after all other
      | quota locks. i_mutex of all other inodes is acquired before quota
      | locks. Quota code makes sure (by resetting inode operations and
      | setting special flag on inode) that noone tries to enter quota code
      | while holding i_mutex on a quota file...
      
      The good news is that all of this special case i_mutex grabbing happens in the
      (per filesystem) low level quota write function.  For this special case we
      need a new I_MUTEX_* nesting level, since this just entirely outside any of
      the regular VFS locking rules for i_mutex.  I trust Jan on his blue eyes that
      this is not ever going to deadlock; and based on that the patch below is what
      it takes to inform lockdep of these very interesting new locking rules.
      
      The new locking rule for the I_MUTEX_QUOTA nesting level is that this is the
      deepest possible level of nesting for i_mutex, and that this only should be
      used in quota write (and possibly read) function of filesystems.  This makes
      the lock ordering of the I_MUTEX_* levels:
      
      I_MUTEX_PARENT -> I_MUTEX_CHILD -> I_MUTEX_NORMAL -> I_MUTEX_QUOTA
      
      Has no effect on non-lockdep kernels.
      Signed-off-by: NArjan van de Ven <arjan@linux.intel.com>
      Acked-by: NIngo Molnar <mingo@elte.hu>
      Cc: Jan Kara <jack@ucw.cz>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      5c81a419
  23. 01 7月, 2006 1 次提交
  24. 26 6月, 2006 2 次提交
  25. 23 6月, 2006 3 次提交
    • M
      [PATCH] percpu counter data type changes to suppport more than 2**31 ext3 free blocks counter · 0216bfcf
      Mingming Cao 提交于
      The percpu counter data type are changed in this set of patches to support
      more users like ext3 who need more than 32 bit to store the free blocks
      total in the filesystem.
      
      - Generic perpcu counters data type changes.  The size of the global counter
        and local counter were explictly specified using s64 and s32.  The global
        counter is changed from long to s64, while the local counter is changed from
        long to s32, so we could avoid doing 64 bit update in most cases.
      
      - Users of the percpu counters are updated to make use of the new
        percpu_counter_init() routine now taking an additional parameter to allow
        users to pass the initial value of the global counter.
      Signed-off-by: NMingming Cao <cmm@us.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      0216bfcf
    • D
      [PATCH] VFS: Permit filesystem to perform statfs with a known root dentry · 726c3342
      David Howells 提交于
      Give the statfs superblock operation a dentry pointer rather than a superblock
      pointer.
      
      This complements the get_sb() patch.  That reduced the significance of
      sb->s_root, allowing NFS to place a fake root there.  However, NFS does
      require a dentry to use as a target for the statfs operation.  This permits
      the root in the vfsmount to be used instead.
      
      linux/mount.h has been added where necessary to make allyesconfig build
      successfully.
      
      Interest has also been expressed for use with the FUSE and XFS filesystems.
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      Acked-by: NAl Viro <viro@zeniv.linux.org.uk>
      Cc: Nathan Scott <nathans@sgi.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      726c3342
    • 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