1. 25 6月, 2011 12 次提交
    • L
      ext3: Return -EINVAL when start is beyond the end of fs in ext3_trim_fs() · 2c2ea945
      Lukas Czerner 提交于
      We should return -EINVAL when the FITRIM parameters are not sane, but
      currently we are exiting silently if start is beyond the end of the
      file system. This commit fixes this so we return -EINVAL as other file
      systems do.
      Signed-off-by: NLukas Czerner <lczerner@redhat.com>
      CC: Jan Kara <jack@suse.cz>
      Signed-off-by: NJan Kara <jack@suse.cz>
      2c2ea945
    • H
      ext3/ioctl.c: silence sparse warnings about different address spaces · 81fe8c62
      H Hartley Sweeten 提交于
      The 'from' argument for copy_from_user and the 'to' argument for
      copy_to_user should both be tagged as __user address space.
      Signed-off-by: NH Hartley Sweeten <hsweeten@visionengravers.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Andreas Dilger <adilger.kernel@dilger.ca>
      Signed-off-by: NJan Kara <jack@suse.cz>
      81fe8c62
    • 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 5 次提交
    • R
      Fix CPU spinlock lockups on secondary CPU bringup · 1b19ca9f
      Russell King 提交于
      Secondary CPU bringup typically calls calibrate_delay() during its
      initialization.  However, calibrate_delay() modifies a global variable
      (loops_per_jiffy) used for udelay() and __delay().
      
      A side effect of 71c696b1 ("calibrate: extract fall-back calculation
      into own helper") introduced in the 2.6.39 merge window means that we
      end up with a substantial period where loops_per_jiffy is zero.  This
      causes the spinlock debugging code to malfunction:
      
      	u64 loops = loops_per_jiffy * HZ;
      	for (;;) {
      		for (i = 0; i < loops; i++) {
      			if (arch_spin_trylock(&lock->raw_lock))
      				return;
      			__delay(1);
      		}
      		...
      	}
      
      by never calling arch_spin_trylock() - resulting in the CPU locking
      up in an infinite loop inside __spin_lock_debug().
      
      Work around this by only writing to loops_per_jiffy only once we have
      completed all the calibration decisions.
      Tested-by: NSantosh Shilimkar <santosh.shilimkar@ti.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      Cc: <stable@kernel.org> (2.6.39-stable)
      --
      Better solutions (such as omitting the calibration for secondary CPUs,
      or arranging for calibrate_delay() to return the LPJ value and leave
      it to the caller to decide where to store it) are a possibility, but
      would be much more invasive into each architecture.
      
      I think this is the best solution for -rc and stable, but it should be
      revisited for the next merge window.
      
       init/calibrate.c |   14 ++++++++------
       1 files changed, 8 insertions(+), 6 deletions(-)
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      1b19ca9f
    • M
      serial: mrst_max3110: initialize waitqueue earlier · 33b1e693
      Mika Westerberg 提交于
      The driver went to initialize its waitqueue at the start of the main
      processing thread.  However, it is possible that this thread is not
      scheduled on a CPU before the write function is called which leads to a
      following error:
      
        BUG: spinlock bad magic on CPU#1, swapper/1
         lock: f5f3ebdc, .magic: 00000000, .owner: <none>/-1, .owner_cpu: 0
        Pid: 1, comm: swapper Not tainted 3.0.0-rc2+ #67
        Call Trace:
         [<c1289663>] spin_bug+0xa3/0xf0
         [<c12897ad>] do_raw_spin_lock+0x7d/0x150
         [<c14963de>] _raw_spin_lock_irqsave+0x4e/0x60
         [<c102f2bb>] __wake_up+0x1b/0x50
         [<c12d3715>] serial_m3110_con_write+0x55/0x60
         [<c1041575>] __call_console_drivers+0x75/0x90
         [<c10415d9>] _call_console_drivers+0x49/0x80
         [<c1041baa>] console_unlock+0xca/0x1f0
         [<c10420ef>] vprintk+0x18f/0x4f0
         [<c14928a3>] printk+0x18/0x1a
         [<c1042730>] register_console+0x2e0/0x350
         [<c12d098e>] uart_add_one_port+0x33e/0x3d0
         [<c1485ba6>] serial_m3110_probe+0x1c2/0x1df
         [<c1303db7>] spi_drv_probe+0x17/0x20
         ...
      
      Fix this by initializing the waitqueue before the main thread is
      created.
      Signed-off-by: NMika Westerberg <mika.westerberg@linux.intel.com>
      Signed-off-by: NAlan Cox <alan@linux.intel.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      33b1e693
    • W
      mrst_max3110: Change max missing message priority. · 0bb04bf3
      William Douglas 提交于
      Change print message to notice instead of error to clean up non critical
      messages showing on startup.  The MAX3111 not being present is a normal
      path for end user systems.
      Signed-off-by: NWilliam Douglas <william.douglas@intel.com>
      [rebased on 3.0, switched to dev_dbg()]
      Signed-off-by: NAlan Cox <alan@linux.intel.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      0bb04bf3
    • L
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/shaggy/jfs-2.6 · bccaeafd
      Linus Torvalds 提交于
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/shaggy/jfs-2.6:
        jfs: agstart field must be 64 bits
        JFS: Don't save agno in the inode
        jfs: Update agstart when resizing volume
        jfs: old_agsize should be 64 bits in jfs_extendfs
      bccaeafd
    • L
      Merge branch 'pm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6 · 68d0080f
      Linus Torvalds 提交于
      * 'pm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6:
        PCI / PM: Block races between runtime PM and system sleep
        PM / Domains: Update documentation
        PM / Runtime: Handle clocks correctly if CONFIG_PM_RUNTIME is unset
        PM: Fix async resume following suspend failure
        PM: Free memory bitmaps if opening /dev/snapshot fails
        PM: Rename dev_pm_info.in_suspend to is_prepared
        PM: Update documentation regarding sysdevs
        PM / Runtime: Update doc: usage count no longer incremented across system PM
      68d0080f
新手
引导
客服 返回
顶部