1. 24 2月, 2014 6 次提交
    • J
      f2fs: implement a lock-free stat_show · 8b8343fa
      Jaegeuk Kim 提交于
      The stat_show is just to show the current status of f2fs.
      So, we can remove all the there-in locks.
      Signed-off-by: NJaegeuk Kim <jaegeuk.kim@samsung.com>
      8b8343fa
    • J
      f2fs: introduce a radix_tree for the free_nid list · 8a7ed66a
      Jaegeuk Kim 提交于
      This patch introduces a radix tree for the list of free_nids, which enhances
      the performance on free nid management.
      Signed-off-by: NJaegeuk Kim <jaegeuk.kim@samsung.com>
      8a7ed66a
    • G
      f2fs: introduce help macro on_build_free_nids() · f978f5a0
      Gu Zheng 提交于
      Introduce help macro on_build_free_nids() which just uses build_lock
      to judge whether the building free nid is going, so that we can remove
      the on_build_free_nids field from f2fs_sb_info.
      Signed-off-by: NGu Zheng <guz.fnst@cn.fujitsu.com>
      [Jaegeuk Kim: remove an unnecessary white line removal]
      Signed-off-by: NJaegeuk Kim <jaegeuk.kim@samsung.com>
      f978f5a0
    • J
      f2fs: fix to mark the checkpointed nat entry correctly · fffc2a00
      Jaegeuk Kim 提交于
      The nat cache entry maintains a status whether it is checkpointed or not.
      So, if a new cache entry is loaded from the last checkpoint,
      nat_entry->checkpointed should be true.
      If the cache entry is modified as being dirty, nat_entry->checkpoint should
      be false.
      Signed-off-by: NJaegeuk Kim <jaegeuk.kim@samsung.com>
      fffc2a00
    • J
      f2fs: fix to do build_stat prior to the recovery procedure · 6437d1b0
      Jaegeuk Kim 提交于
      At the end of the recovery procedure, write_checkpoint is called and updates
      the cp count which is managed by f2fs stat.
      But, previously build_stat() is called after the recovery procedure, which
      results in:
      
      BUG: unable to handle kernel NULL pointer dereference at 000000000000012c
      IP: [<ffffffffa03b1030>] write_checkpoint+0x720/0xbc0 [f2fs]
      Call Trace:
       [<ffffffff810a6b44>] ? mark_held_locks+0x74/0x140
       [<ffffffff8109a3e0>] ? __init_waitqueue_head+0x60/0x60
       [<ffffffffa03bf036>] recover_fsync_data+0x656/0xf20 [f2fs]
       [<ffffffff812ee3eb>] ? security_d_instantiate+0x1b/0x30
       [<ffffffffa03aeb4d>] f2fs_fill_super+0x94d/0xa00 [f2fs]
       [<ffffffff811a9825>] mount_bdev+0x1a5/0x1f0
       [<ffffffff8114915e>] ? __get_free_pages+0xe/0x40
       [<ffffffffa03ae200>] ? f2fs_remount+0x130/0x130 [f2fs]
       [<ffffffffa03aa575>] f2fs_mount+0x15/0x20 [f2fs]
       [<ffffffff811aa713>] mount_fs+0x43/0x1b0
       [<ffffffff811c7124>] vfs_kern_mount+0x74/0x160
       [<ffffffff811c5cb1>] ? __get_fs_type+0x51/0x60
       [<ffffffff811c9727>] do_mount+0x237/0xb50
       [<ffffffff811c936a>] ? copy_mount_options+0x3a/0x170
      
      So, this patche changes the order of recovery_fsync_data() and
      f2fs_build_stats().
      Signed-off-by: NJaegeuk Kim <jaegeuk.kim@samsung.com>
      6437d1b0
    • J
      f2fs: fix not to write data pages on the page reclaiming path · 8618b881
      Jaegeuk Kim 提交于
      Even if f2fs_write_data_page is called by the page reclaiming path, we should
      not write the page to provide enough free segments for the worst case scenario.
      Otherwise, f2fs can face with no free segment while gc is conducted, resulting
      in:
      
       ------------[ cut here ]------------
       kernel BUG at /home/zeus/f2fs_test/src/fs/f2fs/segment.c:565!
       RIP: 0010:[<ffffffffa02c3b11>]  [<ffffffffa02c3b11>] new_curseg+0x331/0x340 [f2fs]
       Call Trace:
        allocate_segment_by_default+0x204/0x280 [f2fs]
        allocate_data_block+0x108/0x210 [f2fs]
        write_data_page+0x8a/0xc0 [f2fs]
        do_write_data_page+0xe1/0x2a0 [f2fs]
        move_data_page+0x8a/0xf0 [f2fs]
        f2fs_gc+0x446/0x970 [f2fs]
        f2fs_balance_fs+0xb6/0xd0 [f2fs]
        f2fs_write_begin+0x50/0x350 [f2fs]
        ? unlock_page+0x27/0x30
        ? unlock_page+0x27/0x30
        generic_file_buffered_write+0x10a/0x280
        ? file_update_time+0xa3/0xf0
        __generic_file_aio_write+0x1c8/0x3d0
        ? generic_file_aio_write+0x52/0xb0
        ? generic_file_aio_write+0x52/0xb0
        generic_file_aio_write+0x65/0xb0
        do_sync_write+0x5a/0x90
        vfs_write+0xc5/0x1f0
        SyS_write+0x55/0xa0
        system_call_fastpath+0x16/0x1b
      Signed-off-by: NJaegeuk Kim <jaegeuk.kim@samsung.com>
      8618b881
  2. 17 2月, 2014 17 次提交
    • J
      f2fs: fix the calculation of max_nids · b63da15e
      Jaegeuk Kim 提交于
      Total nids that f2fs can use should not include 0, nid for node inode, and nid
      for meta inode.
      Signed-off-by: NJaegeuk Kim <jaegeuk.kim@samsung.com>
      b63da15e
    • C
      f2fs: show counts of checkpoint in status · 942e0be6
      Changman Lee 提交于
      This patch shows the counts of checkpoint in f2fs' status.
      Signed-off-by: NChangman Lee <cm224.lee@samsung.com>
      Signed-off-by: NJaegeuk Kim <jaegeuk.kim@samsung.com>
      942e0be6
    • C
      f2fs: introduce ra_meta_pages to readahead CP/NAT/SIT pages · 662befda
      Chao Yu 提交于
      This patch help us to cleanup the readahead code by merging ra_{sit,nat}_pages
      function into ra_meta_pages.
      Additionally the new function is used to readahead cp block in
      recover_orphan_inodes.
      
      Change log from v1:
       o fix a deadloop bug pointed by Jaegeuk Kim.
      Signed-off-by: NChao Yu <chao2.yu@samsung.com>
      Signed-off-by: NJaegeuk Kim <jaegeuk.kim@samsung.com>
      662befda
    • C
      f2fs: use inode mutex to keep atomicity of f2fs_falloc · 3375f696
      Chao Yu 提交于
      Previously without protection of inode mutex, f2fs_falloc and other data
      correlated operations will interfere with each other.
      So let's use inode mutex to keep atomicity of f2fs_falloc.
      Signed-off-by: NChao Yu <chao2.yu@samsung.com>
      Signed-off-by: NJaegeuk Kim <jaegeuk.kim@samsung.com>
      3375f696
    • J
      f2fs: clean up redundant function call · 1fe54f9d
      Jaegeuk Kim 提交于
      This patch integrates inode_[inc|dec]_dirty_dents with inc_page_count to remove
      redundant calls.
      Signed-off-by: NJaegeuk Kim <jaegeuk.kim@samsung.com>
      1fe54f9d
    • J
      f2fs: fix f2fs_write_meta_page at no checkpoint status · 203681f6
      Jaegeuk Kim 提交于
      If f2fs entered errorneous checkpoint status, it should skip writing meta
      pages instead of redirtying the pages out.
      Otherwise, it cannot unmount the partition even though f2fs is under read-only
      status.
      Signed-off-by: NJaegeuk Kim <jaegeuk.kim@samsung.com>
      203681f6
    • J
      f2fs: fix to truncate dentry pages in the error case · bd859c65
      Jaegeuk Kim 提交于
      When a new directory is allocated, if an error is occurred, we should truncate
      preallocated dentry pages too.
      
      This bug was reported by Andrey Tsyvarev after a while as follows.
      
      mkdir()->
       f2fs_add_link()->
        init_inode_metadata()->
          f2fs_init_acl()->
            f2fs_get_acl()->
              f2fs_getxattr()->
                read_all_xattrs() fails.
      
      Also there was a BUG_ON triggered after the fault in
      mkdir()->
       f2fs_add_link()->
         init_inode_metadata()->
          remove_inode_page() ->
            f2fs_bug_on(inode->i_blocks != 0 && inode->i_blocks != 1);
      
      But, previous patch wasn't perfect to resolve that bug, so the following bug
      report was also submitted.
      
      kernel BUG at fs/f2fs/inode.c:274!
      Call Trace:
       [<ffffffff811fde03>] evict+0xa3/0x1a0
       [<ffffffff811fe615>] iput+0xf5/0x180
       [<ffffffffa01c7f63>] f2fs_mkdir+0xf3/0x150 [f2fs]
       [<ffffffff811f2a77>] vfs_mkdir+0xb7/0x160
       [<ffffffff811f36bf>] SyS_mkdir+0x5f/0xc0
       [<ffffffff81680769>] system_call_fastpath+0x16/0x1b
      
      Finally, this patch resolves all the issues like below.
      
      If an error is occurred after make_empty_dir(),
       1. truncate_inode_pages()
         The make_bad_inode() prior to iput() will change i_mode to S_IFREG, which
         means that f2fs will not decrement fi->dirty_dents during f2fs_evict_inode.
         But, by calling it here, we can do that.
      
       2. truncate_blocks()
         Preallocated dentry pages are trucated here to sync i_blocks.
      
       3. remove_dirty_dir_inode()
         Remove this directory inode from the list.
      Reported-and-Tested-by: NAndrey Tsyvarev <tsyvarev@ispras.ru>
      Signed-off-by: NJaegeuk Kim <jaegeuk.kim@samsung.com>
      bd859c65
    • J
      f2fs: fix a build warning · f6517cfc
      Jaegeuk Kim 提交于
      This patch modifies flow a little bit to avoid the following build warnings.
      
      src/fs/f2fs/recovery.c: In function ‘check_index_in_prev_nodes’:
      src/fs/f2fs/recovery.c:288:51: warning: ‘sum.<U5390>.<U52f8>.ofs_in_node’ may
      	be used uninitialized in this function [-Wmaybe-uninitialized]
      src/fs/f2fs/recovery.c:260:23: warning: ‘sum.nid’ may be used uninitialized
      	in this function [-Wmaybe-uninitialized]
      Signed-off-by: NJaegeuk Kim <jaegeuk.kim@samsung.com>
      f6517cfc
    • J
      f2fs: clean up with a macro · 491c0854
      Jaegeuk Kim 提交于
      This patch adds GET_BLKOFF_FROM_SEG0 to clean up some codes.
      Signed-off-by: NJaegeuk Kim <jaegeuk.kim@samsung.com>
      491c0854
    • J
      f2fs: fix the potential mismatch between dir's i_size and i_blocks · 924a2ddb
      Jaegeuk Kim 提交于
      This is the erroneous scenario.
      
                                   i_size    on-disk i_size    i_blocks
      __f2fs_add_link()             4096           4096           2
       get_new_data_page            8192           4096           3
       -ENOSPC = init_inode_metadata
       checkpoint                     -            4096           3
       POR and reboot
      
      __f2fs_add_link()             4096           4096           3
       page = get_new_data_page (page->index = 1 by NEW_ADDR)
       add a dentry to the page successfully
      
      f2fs_rmdir()
       f2fs_empty_dir()             4096           4096           3
       f2fs_unlink() goes, since there is no valid dentry due to i_size = 4096.
       But, still there is one dentry in page->index = 1.
      
      So this patch moves the code to write dir->i_size into on-disk i_size in order
      to sync dir's i_size, on-disk i_size, and its i_blocks.
      Signed-off-by: NJaegeuk Kim <jaegeuk.kim@samsung.com>
      924a2ddb
    • J
      f2fs: remove the ugly pointer conversion · 1b1f559f
      Jaegeuk Kim 提交于
      This patch modifies the use of bi_private to remove pointer chasing for sbi.
      Previously, we had a bi_private structure, but it needs memory allocation.
      So this patch uses bi_private by the sbi pointer and adds a completion pointer
      into the sbi.
      This can achieve no memory allocation and nice use of the bi_private.
      Signed-off-by: NJaegeuk Kim <jaegeuk.kim@samsung.com>
      1b1f559f
    • J
      f2fs: fix to recover xattr node block · abb2366c
      Jaegeuk Kim 提交于
      If a new xattr node page was allocated and its inode is fsynced, we should
      recover the xattr node page during the roll-forward process after power-cut.
      But, previously, f2fs didn't handle that case, resulting in kernel panic as
      follows reported by Tom Li.
      
      BUG: unable to handle kernel paging request at ffffc9001c861a98
      IP: [<ffffffffa0295236>] check_index_in_prev_nodes+0x86/0x2d0 [f2fs]
      Call Trace:
       [<ffffffff815ece9b>] ? printk+0x48/0x4a
       [<ffffffffa029626a>] recover_fsync_data+0xdca/0xf50 [f2fs]
       [<ffffffffa02873ae>] f2fs_fill_super+0x92e/0x970 [f2fs]
       [<ffffffff8112c9f8>] mount_bdev+0x1b8/0x200
       [<ffffffffa0286a80>] ? f2fs_remount+0x130/0x130 [f2fs]
       [<ffffffffa0285e40>] f2fs_mount+0x10/0x20 [f2fs]
       [<ffffffff8112d4de>] mount_fs+0x3e/0x1b0
       [<ffffffff810ef4eb>] ? __alloc_percpu+0xb/0x10
       [<ffffffff8114761f>] vfs_kern_mount+0x6f/0x120
       [<ffffffff811497b9>] do_mount+0x259/0xa90
       [<ffffffff810ead1d>] ? memdup_user+0x3d/0x80
       [<ffffffff810eadb3>] ? strndup_user+0x53/0x70
       [<ffffffff8114a2c9>] SyS_mount+0x89/0xd0
       [<ffffffff815feae2>] system_call_fastpath+0x16/0x1b
      
      This patch adds a recovery function of xattr node pages.
      Reported-by: NTom Li <biergaizi@members.fsf.org>
      Signed-off-by: NJaegeuk Kim <jaegeuk.kim@samsung.com>
      abb2366c
    • J
      f2fs: handle dirty segments inside refresh_sit_entry · 5e443818
      Jaegeuk Kim 提交于
      This patch cleans up the refresh_sit_entry to handle locate_dirty_segments.
      Signed-off-by: NJaegeuk Kim <jaegeuk.kim@samsung.com>
      5e443818
    • J
      f2fs: update_inode_page should be done all the time · 744602cf
      Jaegeuk Kim 提交于
      In order to make fs consistency, update_inode_page should not be failed all
      the time. Otherwise, it is possible to lose some metadata in the inode like
      a link count.
      Signed-off-by: NJaegeuk Kim <jaegeuk.kim@samsung.com>
      744602cf
    • L
      Linux 3.14-rc3 · 6d0abeca
      Linus Torvalds 提交于
      6d0abeca
    • L
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs · 3962dfbe
      Linus Torvalds 提交于
      Pull btrfs fixes from Chris Mason:
       "We have a small collection of fixes in my for-linus branch.
      
        The big thing that stands out is a revert of a new ioctl.  Users
        haven't shipped yet in btrfs-progs, and Dave Sterba found a better way
        to export the information"
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs:
        Btrfs: use right clone root offset for compressed extents
        btrfs: fix null pointer deference at btrfs_sysfs_add_one+0x105
        Btrfs: unset DCACHE_DISCONNECTED when mounting default subvol
        Btrfs: fix max_inline mount option
        Btrfs: fix a lockdep warning when cleaning up aborted transaction
        Revert "btrfs: add ioctl to export size of global metadata reservation"
      3962dfbe
    • L
      Merge tag 'dt-fixes-for-3.14' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux · 4302a875
      Linus Torvalds 提交于
      Pull devicetree fixes from Rob Herring:
       "Fix booting on PPC boards.  Changes to of_match_node matching caused
        the serial port on some PPC boards to stop working.  Reverted the
        change and reimplement to split matching between new style compatible
        only matching and fallback to old matching algorithm"
      
      * tag 'dt-fixes-for-3.14' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux:
        of: search the best compatible match first in __of_match_node()
        Revert "OF: base: match each node compatible against all given matches first"
      4302a875
  3. 16 2月, 2014 12 次提交
    • K
      of: search the best compatible match first in __of_match_node() · 06b29e76
      Kevin Hao 提交于
      Currently, of_match_node compares each given match against all node's
      compatible strings with of_device_is_compatible.
      
      To achieve multiple compatible strings per node with ordering from
      specific to generic, this requires given matches to be ordered from
      specific to generic. For most of the drivers this is not true and also
      an alphabetical ordering is more sane there.
      
      Therefore, this patch introduces a function to match each of the node's
      compatible strings against all given compatible matches without type and
      name first, before checking the next compatible string. This implies
      that node's compatibles are ordered from specific to generic while
      given matches can be in any order. If we fail to find such a match
      entry, then fall-back to the old method in order to keep compatibility.
      
      Cc: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
      Signed-off-by: NKevin Hao <haokexin@gmail.com>
      Tested-by: NStephen Chivers <schivers@csc.com>
      Signed-off-by: NRob Herring <robh@kernel.org>
      06b29e76
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending · 946dd683
      Linus Torvalds 提交于
      Pull SCSI target fixes from Nicholas Bellinger:
       "Mostly minor fixes this time to v3.14-rc1 related changes.  Also
        included is one fix for a free after use regression in persistent
        reservations UNREGISTER logic that is CC'ed to >= v3.11.y stable"
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending:
        Target/sbc: Fix protection copy routine
        IB/srpt: replace strict_strtoul() with kstrtoul()
        target: Simplify command completion by removing CMD_T_FAILED flag
        iser-target: Fix leak on failure in isert_conn_create_fastreg_pool
        iscsi-target: Fix SNACK Type 1 + BegRun=0 handling
        target: Fix missing length check in spc_emulate_evpd_83()
        qla2xxx: Remove last vestiges of qla_tgt_cmd.cmd_list
        target: Fix 32-bit + CONFIG_LBDAF=n link error w/ sector_div
        target: Fix free-after-use regression in PR unregister
      946dd683
    • L
      Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux · 2d0ef4fb
      Linus Torvalds 提交于
      Pull i2c fixes from Wolfram Sang:
       "i2c has a bugfix and documentation improvements for you"
      
      * 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
        Documentation: i2c: mention ACPI method for instantiating devices
        Documentation: i2c: describe devicetree method for instantiating devices
        i2c: mv64xxx: refactor message start to ensure proper initialization
      2d0ef4fb
    • L
      Merge branches 'irq-urgent-for-linus' and 'irq-core-for-linus' of... · 5a667a0c
      Linus Torvalds 提交于
      Merge branches 'irq-urgent-for-linus' and 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
      
      Pull irq update from Thomas Gleixner:
       "Fix from the urgent branch: a trivial oneliner adding the missing
        Kconfig dependency curing build failures which have been discovered by
        several build robots.
      
        The update in the irq-core branch provides a new function in the
        irq/devres code, which is a prerequisite for driver developers to get
        rid of boilerplate code all over the place.
      
        Not a bugfix, but it has zero impact on the current kernel due to the
        lack of users.  It's simpler to provide the infrastructure to
        interested parties via your tree than fulfilling the wishlist of
        driver maintainers on which particular commit or tag this should be
        based on"
      
      * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        genirq: Add missing irq_to_desc export for CONFIG_SPARSE_IRQ=n
      
      * 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        genirq: Add devm_request_any_context_irq()
      5a667a0c
    • L
      Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 3a19c07c
      Linus Torvalds 提交于
      Pull timer fixes from Thomas Gleixner:
       "The following trilogy of patches brings you:
      
         - fix for a long standing math overflow issue with HZ < 60
      
         - an onliner fix for a corner case in the dreaded tick broadcast
           mechanism affecting a certain range of AMD machines which are
           infested with the infamous automagic C1E power control misfeature
      
         - a fix for one of the ARM platforms which allows the kernel to
           proceed and boot instead of stupidly panicing for no good reason.
           The patch is slightly larger than necessary, but it's less ugly
           than the alternative 5 liner"
      
      * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        tick: Clear broadcast pending bit when switching to oneshot
        clocksource: Kona: Print warning rather than panic
        time: Fix overflow when HZ is smaller than 60
      3a19c07c
    • L
      Merge tag 'trace-fixes-v3.14-rc2' of... · 9bd01b9b
      Linus Torvalds 提交于
      Merge tag 'trace-fixes-v3.14-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace
      
      Pull twi tracing fixes from Steven Rostedt:
       "Two urgent fixes in the tracing utility.
      
        The first is a fix for the way the ring buffer stores timestamps.
        After a restructure of the code was done, the ring buffer timestamp
        logic missed the fact that the first event on a sub buffer is to have
        a zero delta, as the full timestamp is stored on the sub buffer
        itself.  But because the delta was not cleared to zero, the timestamp
        for that event will be calculated as the real timestamp + the delta
        from the last timestamp.  This can skew the timestamps of the events
        and have them say they happened when they didn't really happen.
        That's bad.
      
        The second fix is for modifying the function graph caller site.  When
        the stop machine was removed from updating the function tracing code,
        it missed updating the function graph call site location.  It is still
        modified as if it is being done via stop machine.  But it's not.  This
        can lead to a GPF and kernel crash if the function graph call site
        happens to lie between cache lines and one CPU is executing it while
        another CPU is doing the update.  It would be a very hard condition to
        hit, but the result is severe enough to have it fixed ASAP"
      
      * tag 'trace-fixes-v3.14-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
        ftrace/x86: Use breakpoints for converting function graph caller
        ring-buffer: Fix first commit on sub-buffer having non-zero delta
      9bd01b9b
    • L
      Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 7fc92804
      Linus Torvalds 提交于
      Pull x86 EFI fixes from Peter Anvin:
       "A few more EFI-related fixes"
      
      * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/efi: Check status field to validate BGRT header
        x86/efi: Fix 32-bit fallout
      7fc92804
    • L
      Merge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc · 83660b73
      Linus Torvalds 提交于
      Pull ARM SoC fixes from Kevin Hilman:
       "A collection of ARM SoC fixes for v3.14-rc1.
      
        Mostly a collection of Kconfig, device tree data and compilation fixes
        along with fix to drivers/phy that fixes a boot regression on some
        Marvell mvebu platforms"
      
      * tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
        dma: mv_xor: Silence a bunch of LPAE-related warnings
        ARM: ux500: disable msp2 device tree node
        ARM: zynq: Reserve not DMAable space in front of the kernel
        ARM: multi_v7_defconfig: Select CONFIG_SOC_DRA7XX
        ARM: imx6: Initialize low-power mode early again
        ARM: pxa: fix various compilation problems
        ARM: pxa: fix compilation problem on AM300EPD board
        ARM: at91: add Atmel's SAMA5D3 Xplained board
        spi/atmel: document clock properties
        mmc: atmel-mci: document clock properties
        ARM: at91: enable USB host on at91sam9n12ek board
        ARM: at91/dt: fix sama5d3 ohci hclk clock reference
        ARM: at91/dt: sam9263: fix compatibility string for the I2C
        ata: sata_mv: Fix probe failures with optional phys
        drivers: phy: Add support for optional phys
        drivers: phy: Make NULL a valid phy reference
        ARM: fix HAVE_ARM_TWD selection for OMAP and shmobile
        ARM: moxart: move DMA_OF selection to driver
        ARM: hisi: fix kconfig warning on HAVE_ARM_TWD
      83660b73
    • W
    • W
    • F
      Btrfs: use right clone root offset for compressed extents · 93de4ba8
      Filipe David Borba Manana 提交于
      For non compressed extents, iterate_extent_inodes() gives us offsets
      that take into account the data offset from the file extent items, while
      for compressed extents it doesn't. Therefore we have to adjust them before
      placing them in a send clone instruction. Not doing this adjustment leads to
      the receiving end requesting for a wrong a file range to the clone ioctl,
      which results in different file content from the one in the original send
      root.
      
      Issue reproducible with the following excerpt from the test I made for
      xfstests:
      
        _scratch_mkfs
        _scratch_mount "-o compress-force=lzo"
      
        $XFS_IO_PROG -f -c "truncate 118811" $SCRATCH_MNT/foo
        $XFS_IO_PROG -c "pwrite -S 0x0d -b 39987 92267 39987" $SCRATCH_MNT/foo
      
        $BTRFS_UTIL_PROG subvolume snapshot -r $SCRATCH_MNT $SCRATCH_MNT/mysnap1
      
        $XFS_IO_PROG -c "pwrite -S 0x3e -b 80000 200000 80000" $SCRATCH_MNT/foo
        $BTRFS_UTIL_PROG filesystem sync $SCRATCH_MNT
        $XFS_IO_PROG -c "pwrite -S 0xdc -b 10000 250000 10000" $SCRATCH_MNT/foo
        $XFS_IO_PROG -c "pwrite -S 0xff -b 10000 300000 10000" $SCRATCH_MNT/foo
      
        # will be used for incremental send to be able to issue clone operations
        $BTRFS_UTIL_PROG subvolume snapshot -r $SCRATCH_MNT $SCRATCH_MNT/clones_snap
      
        $BTRFS_UTIL_PROG subvolume snapshot -r $SCRATCH_MNT $SCRATCH_MNT/mysnap2
      
        $FSSUM_PROG -A -f -w $tmp/1.fssum $SCRATCH_MNT/mysnap1
        $FSSUM_PROG -A -f -w $tmp/2.fssum -x $SCRATCH_MNT/mysnap2/mysnap1 \
            -x $SCRATCH_MNT/mysnap2/clones_snap $SCRATCH_MNT/mysnap2
        $FSSUM_PROG -A -f -w $tmp/clones.fssum $SCRATCH_MNT/clones_snap \
            -x $SCRATCH_MNT/clones_snap/mysnap1 -x $SCRATCH_MNT/clones_snap/mysnap2
      
        $BTRFS_UTIL_PROG send $SCRATCH_MNT/mysnap1 -f $tmp/1.snap
        $BTRFS_UTIL_PROG send $SCRATCH_MNT/clones_snap -f $tmp/clones.snap
        $BTRFS_UTIL_PROG send -p $SCRATCH_MNT/mysnap1 \
            -c $SCRATCH_MNT/clones_snap $SCRATCH_MNT/mysnap2 -f $tmp/2.snap
      
        _scratch_unmount
        _scratch_mkfs
        _scratch_mount
      
        $BTRFS_UTIL_PROG receive $SCRATCH_MNT -f $tmp/1.snap
        $FSSUM_PROG -r $tmp/1.fssum $SCRATCH_MNT/mysnap1 2>> $seqres.full
      
        $BTRFS_UTIL_PROG receive $SCRATCH_MNT -f $tmp/clones.snap
        $FSSUM_PROG -r $tmp/clones.fssum $SCRATCH_MNT/clones_snap 2>> $seqres.full
      
        $BTRFS_UTIL_PROG receive $SCRATCH_MNT -f $tmp/2.snap
        $FSSUM_PROG -r $tmp/2.fssum $SCRATCH_MNT/mysnap2 2>> $seqres.full
      Signed-off-by: NFilipe David Borba Manana <fdmanana@gmail.com>
      Signed-off-by: NChris Mason <clm@fb.com>
      93de4ba8
    • A
      btrfs: fix null pointer deference at btrfs_sysfs_add_one+0x105 · f085381e
      Anand Jain 提交于
      bdev is null when disk has disappeared and mounted with
      the degrade option
      
      stack trace
      ---------
      btrfs_sysfs_add_one+0x105/0x1c0 [btrfs]
      open_ctree+0x15f3/0x1fe0 [btrfs]
      btrfs_mount+0x5db/0x790 [btrfs]
      ? alloc_pages_current+0xa4/0x160
      mount_fs+0x34/0x1b0
      vfs_kern_mount+0x62/0xf0
      do_mount+0x22e/0xa80
      ? __get_free_pages+0x9/0x40
      ? copy_mount_options+0x31/0x170
      SyS_mount+0x7e/0xc0
      system_call_fastpath+0x16/0x1b
      ---------
      
      reproducer:
      -------
      mkfs.btrfs -draid1 -mraid1 /dev/sdc /dev/sdd
      (detach a disk)
      devmgt detach /dev/sdc [1]
      mount -o degrade /dev/sdd /btrfs
      -------
      
      [1] github.com/anajain/devmgt.git
      Signed-off-by: NAnand Jain <Anand.Jain@oracle.com>
      Tested-by: NHidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
      Signed-off-by: NChris Mason <clm@fb.com>
      f085381e
  4. 15 2月, 2014 5 次提交
    • W
      i2c: mv64xxx: refactor message start to ensure proper initialization · 79970db2
      Wolfram Sang 提交于
      Because the offload mechanism can fall back to a standard transfer,
      having two seperate initialization states is unfortunate. Let's just
      have one state which does things consistently. This fixes a bug where
      some preparation was missing when the fallback happened. And it makes
      the code much easier to follow. To implement this, we put the check
      if offload is possible at the top of the offload setup function.
      Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
      Tested-by: NGregory CLEMENT <gregory.clement@free-electrons.com>
      Cc: stable@vger.kernel.org # v3.12+
      Fixes: 930ab3d4 (i2c: mv64xxx: Add I2C Transaction Generator support)
      79970db2
    • L
      Merge tag 'usb-3.14-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb · ca033390
      Linus Torvalds 提交于
      Pull USB fixes from Greg KH:
       "Here is a bunch of USB fixes for 3.14-rc3.  Most of these are xhci
        reverts, fixing a bunch of reported issues with USB 3 host controller
        issues that loads of people have been hitting (with the exception of
        kernel developers, all of our machines seem to be working fine, which
        is why these took so long to get resolved...)
      
        There are some other minor fixes and new device ids, as ususal.  All
        have been in linux-next successfully"
      
      * tag 'usb-3.14-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (22 commits)
        usb: option: blacklist ZTE MF667 net interface
        Revert "usb: xhci: Link TRB must not occur within a USB payload burst"
        Revert "xhci: Avoid infinite loop when sg urb requires too many trbs"
        Revert "xhci: Set scatter-gather limit to avoid failed block writes."
        xhci 1.0: Limit arbitrarily-aligned scatter gather.
        Modpost: fixed USB alias generation for ranges including 0x9 and 0xA
        usb: core: Fix potential memory leak adding dyn USBdevice IDs
        USB: ftdi_sio: add Tagsys RFID Reader IDs
        usb: qcserial: add Netgear Aircard 340U
        usb-storage: enable multi-LUN scanning when needed
        USB: simple: add Dynastream ANT USB-m Stick device support
        usb-storage: add unusual-devs entry for BlackBerry 9000
        usb-storage: restrict bcdDevice range for Super Top in Cypress ATACB
        usb: phy: move some error messages to debug
        usb: ftdi_sio: add Mindstorms EV3 console adapter
        usb: dwc2: fix memory corruption in dwc2 driver
        usb: dwc2: fix role switch breakage
        usb: dwc2: bail out early when booting with "nousb"
        Revert "xhci: replace xhci_read_64() with readq()"
        Revert "xhci: replace xhci_write_64() with writeq()"
        ...
      ca033390
    • L
      Merge tag 'tty-3.14-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty · 40a215fb
      Linus Torvalds 提交于
      Pull tty/serial driver fixes from Greg KH:
       "Here are a small number of tty/serial driver fixes to resolve reported
        issues with 3.14-rc and earlier (in the case of the vt bugfix).  Some
        of these have been tested and reported by a number of people as the
        tty bugfix was pretty commonly hit on some platforms.
      
        All have been in linux-next for a while"
      
      * tag 'tty-3.14-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
        vt: Fix secure clear screen
        serial: 8250: Support XR17V35x fraction divisor
        n_tty: Fix stale echo output
        serial: sirf: fix kernel panic caused by unpaired spinlock
        serial: 8250_pci: unbreak last serial ports on NetMos 9865 cards
        n_tty: Fix poll() when TIME_CHAR and MIN_CHAR == 0
        serial: omap: fix rs485 probe on defered pinctrl
        serial: 8250_dw: fix compilation warning when !CONFIG_PM_SLEEP
        serial: omap-serial: Move info message to probe function
        tty: Set correct tty name in 'active' sysfs attribute
        tty: n_gsm: Fix for modems with brk in modem status control
        drivers/tty/hvc: don't use module_init in non-modular hyp. console code
      40a215fb
    • L
      Merge tag 'staging-3.14-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging · e2e481d6
      Linus Torvalds 提交于
      Pull staging driver fixes from Greg KH:
       "Here are a number (lots, I know) of fixes for staging drivers to
        resolve a bunch of reported issues.
      
        The largest patches here is one revert of a patch that is in 3.14-rc1
        to fix reported problems, and a sync of a usb host driver that
        required some ARM patches to go in before it could be accepted (which
        is why it missed -rc1)
      
        All of these have been in linux-next for a while with no reported
        issues"
      
      * tag 'staging-3.14-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (56 commits)
        staging/rtl8821ae: fix build, depends on MAC80211
        iio: max1363: Use devm_regulator_get_optional for optional regulator
        iio:accel:bma180: Use modifier instead of index in channel specification
        iio: adis16400: Set timestamp as the last element in chan_spec
        iio: ak8975: Fix calculation formula for convert micro tesla to gauss unit
        staging:iio:ad799x fix typo in ad799x_events[]
        iio: mxs-lradc: remove useless scale_available files
        iio: mxs-lradc: fix buffer overflow
        iio:magnetometer:mag3110: Fix output of decimal digits in show_int_plus_micros()
        iio:magnetometer:mag3110: Report busy in _read_raw() / write_raw() when buffer is enabled
        wlags49_h2: Fix overflow in wireless_set_essid()
        xlr_net: Fix missing trivial allocation check
        staging: r8188eu: overflow in rtw_p2p_get_go_device_address()
        staging: r8188eu: array overflow in rtw_mp_ioctl_hdl()
        staging: r8188eu: Fix typo in USB_DEVICE list
        usbip/userspace/libsrc/names.c: memory leak
        gpu: ion: dereferencing an ERR_PTR
        staging: comedi: usbduxsigma: fix unaligned dereferences
        staging: comedi: fix too early cleanup in comedi_auto_config()
        staging: android: ion: dummy: fix an error code
        ...
      e2e481d6
    • L
      Merge tag 'driver-core-3.14-rc3' of... · ad07f124
      Linus Torvalds 提交于
      Merge tag 'driver-core-3.14-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core
      
      Pull driver core fix from Greg KH:
       "Here is a single driver core patch for 3.14-rc3 for the component code
        that Russell has found and fixed"
      
      * tag 'driver-core-3.14-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core:
        drivers/base: fix devres handling for master device
      ad07f124