1. 25 6月, 2011 10 次提交
    • L
      ext3/ext4 Documentation: remove bh/nobh since it has been deprecated · ad434017
      Lukas Czerner 提交于
      Bh and nobh mount option has been deprecated in ext4
      (206f7ab4) and in ext3
      (4c4d3901)
      so remove those options from documentation.
      Signed-off-by: NLukas Czerner <lczerner@redhat.com>
      Reviewed-by: NEric Sandeen <sandeen@redhat.com>
      Signed-off-by: NJan Kara <jack@suse.cz>
      ad434017
    • J
      ext3: Improve truncate error handling · ee3e77f1
      Jan Kara 提交于
      New truncate calling convention allows us to handle errors from
      ext3_block_truncate_page(). So reorganize the code so that
      ext3_block_truncate_page() is called before we change inode size.
      
      This also removes unnecessary block zeroing from error recovery after failed
      buffered writes (zeroing isn't needed because we could have never written
      non-zero data to disk). We have to be careful and keep zeroing in direct IO
      write error recovery because there we might have already overwritten end of the
      last file block.
      Signed-off-by: NJan Kara <jack@suse.cz>
      ee3e77f1
    • 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
    • P
      ext2: include fs.h into ext2_fs.h · fbcc9e62
      Petr Uzel 提交于
      AC_CHECK_HEADERS([linux/ext2_fs.h])
      fails with
      
      configure:34666: checking linux/ext2_fs.h usability
      configure:34666: gcc -std=gnu99 -c -ggdb3 -O0 -Wunreachable-code  conftest.c >&5
      In file included from conftest.c:406:0:
      /usr/include/linux/ext2_fs.h: In function 'ext2_mask_flags':
      /usr/include/linux/ext2_fs.h:182:21: error: 'FS_DIRSYNC_FL' undeclared (first use in this function)
      /usr/include/linux/ext2_fs.h:182:21: note: each undeclared identifier is reported only once for each function it appears in
      /usr/include/linux/ext2_fs.h:182:37: error: 'FS_TOPDIR_FL' undeclared (first use in this function)
      /usr/include/linux/ext2_fs.h:184:19: error: 'FS_NODUMP_FL' undeclared (first use in this function)
      /usr/include/linux/ext2_fs.h:184:34: error: 'FS_NOATIME_FL' undeclared (first use in this function)
      
      It's reasonable to have headers that include all necessary definitions. So fix
      this by including fs.h into ext2_fs.h.
      Signed-off-by: NPetr Uzel <petr.uzel@suse.cz>
      Signed-off-by: NJan Kara <jack@suse.cz>
      fbcc9e62
    • J
      ext3: Fix oops in ext3_try_to_allocate_with_rsv() · ad95c5e9
      Jan Kara 提交于
      Block allocation is called from two places: ext3_get_blocks_handle() and
      ext3_xattr_block_set(). These two callers are not necessarily synchronized
      because xattr code holds only xattr_sem and i_mutex, and
      ext3_get_blocks_handle() may hold only truncate_mutex when called from
      writepage() path. Block reservation code does not expect two concurrent
      allocations to happen to the same inode and thus assertions can be triggered
      or reservation structure corruption can occur.
      
      Fix the problem by taking truncate_mutex in xattr code to serialize
      allocations.
      
      CC: Sage Weil <sage@newdream.net>
      CC: stable@kernel.org
      Reported-by: NFyodor Ustinov <ufm@ufm.su>
      Signed-off-by: NJan Kara <jack@suse.cz>
      ad95c5e9
    • D
      jbd: fix a bug of leaking jh->b_jcount · bd5c9e18
      Ding Dinghua 提交于
      journal_get_create_access should drop jh->b_jcount in error handling path
      Signed-off-by: NDing Dinghua <dingdinghua@nrchpc.ac.cn>
      Signed-off-by: NJan Kara <jack@suse.cz>
      bd5c9e18
    • J
      jbd: remove dependency on __GFP_NOFAIL · 05713082
      Jan Kara 提交于
      The callers of start_this_handle() (or better ext3_journal_start()) are not
      really prepared to handle allocation failures. Such failures can for example
      result in silent data loss when it happens in ext3_..._writepage().  OTOH
      __GFP_NOFAIL is going away so we just retry allocation in start_this_handle().
      
      This loop is potentially dangerous because the oom killer cannot be invoked
      for GFP_NOFS allocation, so there is a potential for infinitely looping.
      But still this is better than silent data loss.
      Signed-off-by: NJan Kara <jack@suse.cz>
      05713082
    • 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
    • L
      jbd: Add fixed tracepoints · 99cb1a31
      Lukas Czerner 提交于
      This commit adds fixed tracepoint for jbd. It has been based on fixed
      tracepoints for jbd2, however there are missing those for collecting
      statistics, since I think that it will require more intrusive patch so I
      should have its own commit, if someone decide that it is needed. Also
      there are new tracepoints in __journal_drop_transaction() and
      journal_update_superblock().
      
      The list of jbd tracepoints:
      
      jbd_checkpoint
      jbd_start_commit
      jbd_commit_locking
      jbd_commit_flushing
      jbd_commit_logging
      jbd_drop_transaction
      jbd_end_commit
      jbd_do_submit_data
      jbd_cleanup_journal_tail
      jbd_update_superblock_end
      Signed-off-by: NLukas Czerner <lczerner@redhat.com>
      Cc: Jan Kara <jack@suse.cz>
      Signed-off-by: NJan Kara <jack@suse.cz>
      99cb1a31
    • L
      ext3: Add fixed tracepoints · 785c4bcc
      Lukas Czerner 提交于
      This commit adds fixed tracepoints to the ext3 code. It is based on ext4
      tracepoints, however due to the differences of both file systems, there
      are some tracepoints missing (those for delaloc and for multi-block
      allocator) and there are some ext3 specific as well (for reservation
      windows).
      
      Here is a list:
      
      ext3_free_inode
      ext3_request_inode
      ext3_allocate_inode
      ext3_evict_inode
      ext3_drop_inode
      ext3_mark_inode_dirty
      ext3_write_begin
      ext3_ordered_write_end
      ext3_writeback_write_end
      ext3_journalled_write_end
      ext3_ordered_writepage
      ext3_writeback_writepage
      ext3_journalled_writepage
      ext3_readpage
      ext3_releasepage
      ext3_invalidatepage
      ext3_discard_blocks
      ext3_request_blocks
      ext3_allocate_blocks
      ext3_free_blocks
      ext3_sync_file_enter
      ext3_sync_file_exit
      ext3_sync_fs
      ext3_rsv_window_add
      ext3_discard_reservation
      ext3_alloc_new_reservation
      ext3_reserved
      ext3_forget
      ext3_read_block_bitmap
      ext3_direct_IO_enter
      ext3_direct_IO_exit
      ext3_unlink_enter
      ext3_unlink_exit
      ext3_truncate_enter
      ext3_truncate_exit
      ext3_get_blocks_enter
      ext3_get_blocks_exit
      ext3_load_inode
      Signed-off-by: NLukas Czerner <lczerner@redhat.com>
      Cc: Jan Kara <jack@suse.cz>
      Signed-off-by: NJan Kara <jack@suse.cz>
      785c4bcc
  2. 24 6月, 2011 23 次提交
  3. 23 6月, 2011 7 次提交