1. 16 5月, 2012 2 次提交
  2. 01 4月, 2012 1 次提交
  3. 05 3月, 2012 1 次提交
    • P
      BUG: headers with BUG/BUG_ON etc. need linux/bug.h · 187f1882
      Paul Gortmaker 提交于
      If a header file is making use of BUG, BUG_ON, BUILD_BUG_ON, or any
      other BUG variant in a static inline (i.e. not in a #define) then
      that header really should be including <linux/bug.h> and not just
      expecting it to be implicitly present.
      
      We can make this change risk-free, since if the files using these
      headers didn't have exposure to linux/bug.h already, they would have
      been causing compile failures/warnings.
      Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
      187f1882
  4. 04 1月, 2012 1 次提交
  5. 01 11月, 2011 1 次提交
  6. 31 8月, 2011 1 次提交
  7. 17 8月, 2011 1 次提交
  8. 21 7月, 2011 1 次提交
    • J
      fs: push i_mutex and filemap_write_and_wait down into ->fsync() handlers · 02c24a82
      Josef Bacik 提交于
      Btrfs needs to be able to control how filemap_write_and_wait_range() is called
      in fsync to make it less of a painful operation, so push down taking i_mutex and
      the calling of filemap_write_and_wait() down into the ->fsync() handlers.  Some
      file systems can drop taking the i_mutex altogether it seems, like ext3 and
      ocfs2.  For correctness sake I just pushed everything down in all cases to make
      sure that we keep the current behavior the same for everybody, and then each
      individual fs maintainer can make up their mind about what to do from there.
      Thanks,
      Acked-by: NJan Kara <jack@suse.cz>
      Signed-off-by: NJosef Bacik <josef@redhat.com>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      02c24a82
  9. 25 6月, 2011 2 次提交
    • A
      ext3: use proper little-endian bitops · 90085930
      Akinobu Mita 提交于
      ext3_{set,clear}_bit() is defined as __test_and_{set,clear}_bit_le()
      for ext3.  But all ext3_{set,clear}_bit() calls ignore return values.
      So these can be replaced with __{set,clear}_bit_le().
      
      This changes ext3_{set,clear}_bit safely, because if someone uses
      these macros without noticing the change, new ext3_{set,clear}_bit
      don't have return value and causes compiler errors where the return
      value is used.
      
      This also removes unused ext3_find_first_zero_bit().
      Signed-off-by: NAkinobu Mita <akinobu.mita@gmail.com>
      Cc: Jan Kara <jack@suse.cz>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Andreas Dilger <adilger.kernel@dilger.ca>
      Cc: linux-ext4@vger.kernel.org
      Signed-off-by: NJan Kara <jack@suse.cz>
      90085930
    • J
      ext3: Convert ext3 to new truncate calling convention · 40680f2f
      Jan Kara 提交于
      Mostly trivial conversion. We fix a bug that IS_IMMUTABLE and IS_APPEND files
      could not be truncated during failed writes as we change the code.  In fact the
      test is not needed at all because both IS_IMMUTABLE and IS_APPEND is tested in
      upper layers in do_sys_[f]truncate(), may_write(), etc.
      Signed-off-by: NJan Kara <jack@suse.cz>
      40680f2f
  10. 27 5月, 2011 1 次提交
    • C
      fs: pass exact type of data dirties to ->dirty_inode · aa385729
      Christoph Hellwig 提交于
      Tell the filesystem if we just updated timestamp (I_DIRTY_SYNC) or
      anything else, so that the filesystem can track internally if it
      needs to push out a transaction for fdatasync or not.
      
      This is just the prototype change with no user for it yet.  I plan
      to push large XFS changes for the next merge window, and getting
      this trivial infrastructure in this window would help a lot to avoid
      tree interdependencies.
      
      Also remove incorrect comments that ->dirty_inode can't block.  That
      has been changed a long time ago, and many implementations rely on it.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      aa385729
  11. 24 3月, 2011 1 次提交
  12. 02 2月, 2011 1 次提交
    • E
      fs/vfs/security: pass last path component to LSM on inode creation · 2a7dba39
      Eric Paris 提交于
      SELinux would like to implement a new labeling behavior of newly created
      inodes.  We currently label new inodes based on the parent and the creating
      process.  This new behavior would also take into account the name of the
      new object when deciding the new label.  This is not the (supposed) full path,
      just the last component of the path.
      
      This is very useful because creating /etc/shadow is different than creating
      /etc/passwd but the kernel hooks are unable to differentiate these
      operations.  We currently require that userspace realize it is doing some
      difficult operation like that and than userspace jumps through SELinux hoops
      to get things set up correctly.  This patch does not implement new
      behavior, that is obviously contained in a seperate SELinux patch, but it
      does pass the needed name down to the correct LSM hook.  If no such name
      exists it is fine to pass NULL.
      Signed-off-by: NEric Paris <eparis@redhat.com>
      2a7dba39
  13. 11 1月, 2011 2 次提交
    • E
      ext3: speed up file creates by optimizing rec_len functions · a4ae3094
      Eric Sandeen 提交于
      The addition of 64k block capability in the rec_len_from_disk
      and rec_len_to_disk functions added a bit of math overhead which
      slows down file create workloads needlessly when the architecture
      cannot even support 64k blocks, thanks to page size limits.
      
      Similar changes already exist in the ext4 codebase.
      
      The directory entry checking can also be optimized a bit
      by sprinkling in some unlikely() conditions to move the
      error handling out of line.
      
      bonnie++ sequential file creates on a 512MB ramdisk speeds up
      from about 77,000/s to about 82,000/s, about a 6% improvement.
      Signed-off-by: NEric Sandeen <sandeen@redhat.com>
      Signed-off-by: NJan Kara <jack@suse.cz>
      a4ae3094
    • L
      ext3: Add batched discard support for ext3 · b853b96b
      Lukas Czerner 提交于
      Walk through allocation groups and trim all free extents. It can be
      invoked through FITRIM ioctl on the file system. The main idea is to
      provide a way to trim the whole file system if needed, since some SSD's
      may suffer from performance loss after the whole device was filled (it
      does not mean that fs is full!).
      
      It search for free extents in allocation groups specified by Byte range
      start -> start+len. When the free extent is within this range, blocks are
      marked as used and then trimmed. Afterwards these blocks are marked as
      free in per-group bitmap.
      
      [JK: Fixed up error handling and trimming of a single group]
      Signed-off-by: NLukas Czerner <lczerner@redhat.com>
      Reviewed-by: NJan Kara <jack@suse.cz>
      Reviewed-by: NDmitry Monakhov <dmonakhov@openvz.org>
      Signed-off-by: NJan Kara <jack@suse.cz>
      b853b96b
  14. 10 8月, 2010 1 次提交
  15. 21 7月, 2010 1 次提交
  16. 28 5月, 2010 1 次提交
  17. 30 3月, 2010 1 次提交
    • L
      ext3: fix broken handling of EXT3_STATE_NEW · de329820
      Linus Torvalds 提交于
      In commit 9df93939 ("ext3: Use bitops to read/modify
      EXT3_I(inode)->i_state") ext3 changed its internal 'i_state' variable to
      use bitops for its state handling.  However, unline the same ext4
      change, it didn't actually change the name of the field when it changed
      the semantics of it.
      
      As a result, an old use of 'i_state' remained in fs/ext3/ialloc.c that
      initialized the field to EXT3_STATE_NEW.  And that does not work
      _at_all_ when we're now working with individually named bits rather than
      values that get masked.  So the code tried to mark the state to be new,
      but in actual fact set the field to EXT3_STATE_JDATA.  Which makes no
      sense at all, and screws up all the code that checks whether the inode
      was newly allocated.
      
      In particular, it made the xattr code unhappy, and caused various random
      behavior, like apparently
      
      	https://bugzilla.redhat.com/show_bug.cgi?id=577911
      
      So fix the initialization, and rename the field to match ext4 so that we
      don't have this happen again.
      
      Cc: James Morris <jmorris@namei.org>
      Cc: Stephen Smalley <sds@tycho.nsa.gov>
      Cc: Daniel J Walsh <dwalsh@redhat.com>
      Cc: Eric Paris <eparis@redhat.com>
      Cc: Jan Kara <jack@suse.cz>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      de329820
  18. 06 3月, 2010 1 次提交
  19. 05 3月, 2010 1 次提交
    • J
      ext3: Use bitops to read/modify EXT3_I(inode)->i_state · 9df93939
      Jan Kara 提交于
      At several places we modify EXT3_I(inode)->i_state without holding i_mutex
      (ext3_release_file, ext3_bmap, ext3_journalled_writepage, ext3_do_update_inode,
      ...). These modifications are racy and we can lose updates to i_state. So
      convert handling of i_state to use bitops which are atomic.
      Signed-off-by: NJan Kara <jack@suse.cz>
      9df93939
  20. 10 12月, 2009 1 次提交
    • A
      ext3: Unify log messages in ext3 · 4cf46b67
      Alexey Fisher 提交于
      Make messages produced by ext3 more unified. It should be
      easy to parse.
      
      dmesg before patch:
      [ 4893.684892] reservations ON
      [ 4893.684896] xip option not supported
      [ 4893.684964] EXT3-fs warning: maximal mount count reached, running
      e2fsck is recommended
      
      dmesg after patch:
      [  873.300792] EXT3-fs (loop0): using internal journaln
      [  873.300796] EXT3-fs (loop0): mounted filesystem with writeback data mode
      [  924.163657] EXT3-fs (loop0): error: can't find ext3 filesystem on dev loop0.
      [  723.755642] EXT3-fs (loop0): error: bad blocksize 8192
      [  357.874687] EXT3-fs (loop0): error: no journal found. mounting ext3 over ext2?
      [  873.300764] EXT3-fs (loop0): warning: maximal mount count reached, running e2fsck is recommended
      [  924.163657] EXT3-fs (loop0): error: can't find ext3 filesystem on dev loop0.
      Signed-off-by: NAlexey Fisher <bug-track@fisher-privat.net>
      Signed-off-by: NJan Kara <jack@suse.cz>
      4cf46b67
  21. 16 7月, 2009 1 次提交
    • J
      ext3: Get rid of extenddisksize parameter of ext3_get_blocks_handle() · 43237b54
      Jan Kara 提交于
      Get rid of extenddisksize parameter of ext3_get_blocks_handle(). This seems to
      be a relict from some old days and setting disksize in this function does not
      make much sence. Currently it was set only by ext3_getblk().  Since the
      parameter has some effect only if create == 1, it is easy to check that the
      three callers which end up calling ext3_getblk() with create == 1 (ext3_append,
      ext3_quota_write, ext3_mkdir) do the right thing and set disksize themselves.
      Signed-off-by: NJan Kara <jack@suse.cz>
      43237b54
  22. 03 4月, 2009 2 次提交
  23. 09 1月, 2009 2 次提交
  24. 29 10月, 2008 1 次提交
    • T
      ext3: Add support for non-native signed/unsigned htree hash algorithms · 5e1f8c9e
      Theodore Ts'o 提交于
      The original ext3 hash algorithms assumed that variables of type char
      were signed, as God and K&R intended.  Unfortunately, this assumption
      is not true on some architectures.  Userspace support for marking
      filesystems with non-native signed/unsigned chars was added two years
      ago, but the kernel-side support was never added (until now).
      Signed-off-by: N"Theodore Ts'o" <tytso@mit.edu>
      Cc: akpm@linux-foundation.org
      Cc: linux-kernel@vger.kernel.org
      5e1f8c9e
  25. 20 10月, 2008 1 次提交
    • H
      ext3: add an option to control error handling on file data · 0e4fb5e2
      Hidehiro Kawai 提交于
      If the journal doesn't abort when it gets an IO error in file data blocks,
      the file data corruption will spread silently.  Because most of
      applications and commands do buffered writes without fsync(), they don't
      notice the IO error.  It's scary for mission critical systems.  On the
      other hand, if the journal aborts whenever it gets an IO error in file
      data blocks, the system will easily become inoperable.  So this patch
      introduces a filesystem option to determine whether it aborts the journal
      or just call printk() when it gets an IO error in file data.
      
      If you mount a ext3 fs with data_err=abort option, it aborts on file data
      write error.  If you mount it with data_err=ignore, it doesn't abort, just
      call printk().  data_err=ignore is the default.
      Signed-off-by: NHidehiro Kawai <hidehiro.kawai.ez@hitachi.com>
      Cc: Jan Kara <jack@ucw.cz>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      0e4fb5e2
  26. 17 10月, 2008 1 次提交
  27. 04 10月, 2008 1 次提交
    • J
      generic block based fiemap implementation · 68c9d702
      Josef Bacik 提交于
      Any block based fs (this patch includes ext3) just has to declare its own
      fiemap() function and then call this generic function with its own
      get_block_t. This works well for block based filesystems that will map
      multiple contiguous blocks at one time, but will work for filesystems that
      only map one block at a time, you will just end up with an "extent" for each
      block. One gotcha is this will not play nicely where there is hole+data
      after the EOF. This function will assume its hit the end of the data as soon
      as it hits a hole after the EOF, so if there is any data past that it will
      not pick that up. AFAIK no block based fs does this anyway, but its in the
      comments of the function anyway just in case.
      Signed-off-by: NJosef Bacik <jbacik@redhat.com>
      Signed-off-by: NMark Fasheh <mfasheh@suse.com>
      Signed-off-by: N"Theodore Ts'o" <tytso@mit.edu>
      Cc: linux-fsdevel@vger.kernel.org
      68c9d702
  28. 26 7月, 2008 1 次提交
  29. 08 2月, 2008 1 次提交
  30. 15 11月, 2007 1 次提交
  31. 19 10月, 2007 1 次提交
    • T
      ext3: support large blocksize up to PAGESIZE · 0f0a89eb
      Takashi Sato 提交于
      This patch set supports large block size(>4k, <=64k) in ext3 just enlarging
      the block size limit.  But it is NOT possible to have 64kB blocksize on
      ext3 without some changes to the directory handling code.  The reason is
      that an empty 64kB directory block would have a rec_len == (__u16)2^16 ==
      0, and this would cause an error to be hit in the filesystem.  The proposed
      solution is treat 64k rec_len with a an impossible value like rec_len =
      0xffff to handle this.
      
      The Patch-set consists of the following 2 patches.
        [1/2]  ext3: enlarge blocksize
               - Allow blocksize up to pagesize
      
        [2/2]  ext3: fix rec_len overflow
               - prevent rec_len from overflow with 64KB blocksize
      
      Now on 64k page ppc64 box runs with this patch set we could create a 64k
      block size ext3, and able to handle empty directory block.
      Signed-off-by: NTakashi Sato <sho@tnes.nec.co.jp>
      Signed-off-by: NMingming Cao <cmm@us.ibm.com>
      Cc: <linux-ext4@vger.kernel.org>
      Acked-by: NChristoph Lameter <clameter@sgi.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      0f0a89eb
  32. 17 10月, 2007 1 次提交
  33. 09 5月, 2007 1 次提交
    • J
      ext3: copy i_flags to inode flags on write · 28be5abb
      Jan Kara 提交于
      A patch that stores inode flags such as S_IMMUTABLE, S_APPEND, etc.  from
      i_flags to EXT3_I(inode)->i_flags when inode is written to disk.  The same
      thing is done on GETFLAGS ioctl.
      
      Quota code changes these flags on quota files (to make it harder for
      sysadmin to screw himself) and these changes were not correctly propagated
      into the filesystem (especially, lsattr did not show them and users were
      wondering...).
      
      Propagate flags such as S_APPEND, S_IMMUTABLE, etc.  from i_flags into
      ext3-specific i_flags.  Hence, when someone sets these flags via a
      different interface than ioctl, they are stored correctly.
      Signed-off-by: NJan Kara <jack@suse.cz>
      Cc: <linux-ext4@vger.kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      28be5abb
  34. 13 2月, 2007 1 次提交
  35. 01 10月, 2006 1 次提交