1. Dec 07, 2009
    • Theodore Ts'o's avatar
      ext4: Use slab allocator for sub-page sized allocations · d2eecb03
      Theodore Ts'o authored
      
      
      Now that the SLUB seems to be fixed so that it respects the requested
      alignment, use kmem_cache_alloc() to allocator if the block size of
      the buffer heads to be allocated is less than the page size.
      Previously, we were using 16k page on a Power system for each buffer,
      even when the file system was using 1k or 4k block size.
      
      Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
      
      d2eecb03
  2. Jan 01, 2010
  3. Dec 23, 2009
  4. Jan 23, 2010
    • Theodore Ts'o's avatar
      ext4: Add block validity check when truncating indirect block mapped inodes · 1f2acb60
      Theodore Ts'o authored
      Add checks to ext4_free_branches() to make sure a block number found
      in an indirect block are valid before trying to free it.  If a bad
      block number is found, stop freeing the indirect block immediately,
      since the file system is corrupt and we will need to run fsck anyway.
      This also avoids spamming the logs, and specifically avoids
      driver-level "attempt to access beyond end of device" errors obscure
      what is really going on.
      
      If you get *really*, *really*, *really* unlucky, without this patch, a
      supposed indirect block containing garbage might contain a reference
      to a primary block group descriptor, in which case
      ext4_free_branches() could end up zero'ing out a block group
      descriptor block, and if then one of the block bitmaps for a block
      group described by that bg descriptor block is not in memory, and is
      read in by ext4_read_block_bitmap().  This function calls
      ext4_valid_block_bitmap(), which assumes that bg_inode_table() was
      va...
      1f2acb60
  5. Feb 16, 2010
    • Eric Sandeen's avatar
      ext4: Fix optional-arg mount options · 15121c18
      Eric Sandeen authored
      
      
      We have 2 mount options, "barrier" and "auto_da_alloc" which may or
      may not take a 1/0 argument.  This causes the ext4 superblock mount
      code to subtract uninitialized pointers and pass the result to
      kmalloc, which results in very noisy failures.
      
      Per Ted's suggestion, initialize the args struct so that
      we know whether match_token() found an argument for the
      option, and skip match_int() if not.
      
      Also, return error (0) from parse_options if we thought
      we found an argument, but match_int() Fails.
      
      Reported-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: default avatarEric Sandeen <sandeen@redhat.com>
      Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
      15121c18
  6. Feb 05, 2010
  7. Feb 13, 2010
  8. Feb 12, 2010