Skip to content
  1. Aug 05, 2016
    • Jens Axboe's avatar
      f2fs: drop bio->bi_rw manual assignment · 1aee6b9a
      Jens Axboe authored
      Merge 4fc29c1a
      
       included this extra line, but it's not needed (or
      useful) since we'll bio_set_op_attrs() right after to properly set
      the op and flags for the bio.
      
      Signed-off-by: default avatarJens Axboe <axboe@fb.com>
      1aee6b9a
    • Paolo Valente's avatar
      block: add missing group association in bio-cloning functions · 20bd723e
      Paolo Valente authored
      When a bio is cloned, the newly created bio must be associated with
      the same blkcg as the original bio (if BLK_CGROUP is enabled). If
      this operation is not performed, then the new bio is not associated
      with any group, and the group of the current task is returned when
      the group of the bio is requested.
      
      Depending on the cloning frequency, this may cause a large
      percentage of the bios belonging to a given group to be treated
      as if belonging to other groups (in most cases as if belonging to
      the root group). The expected group isolation may thereby be broken.
      
      This commit adds the missing association in bio-cloning functions.
      
      Fixes: da2f0f74
      
       ("Btrfs: add support for blkio controllers")
      Cc: stable@vger.kernel.org # v4.3+
      
      Signed-off-by: default avatarPaolo Valente <paolo.valente@linaro.org>
      Reviewed-by: default avatarNikolay Borisov <kernel@kyup.com>
      Reviewed-by: default avatarJeff Moyer <jmoyer@redhat.com>
      Acked-by: default avatarTejun Heo <tj@kernel.org>
      Signed-off-by: default avatarJens Axboe <axboe@fb.com>
      20bd723e
    • Hou Tao's avatar
      blkcg: kill unused field nr_undestroyed_grps · bfd279a8
      Hou Tao authored
      
      
      'nr_undestroyed_grps' in struct throtl_data was used to count
      the number of throtl_grp related with throtl_data, but now
      throtl_grp is tracked by blkcg_gq, so it is useless anymore.
      
      Signed-off-by: default avatarHou Tao <houtao1@huawei.com>
      Signed-off-by: default avatarJens Axboe <axboe@fb.com>
      bfd279a8
    • Jan Kara's avatar
      writeback: Write dirty times for WB_SYNC_ALL writeback · dc5ff2b1
      Jan Kara authored
      
      
      Currently we take care to handle I_DIRTY_TIME in vfs_fsync() and
      queue_io() so that inodes which have only dirty timestamps are properly
      written on fsync(2) and sync(2). However there are other call sites -
      most notably going through write_inode_now() - which expect inode to be
      clean after WB_SYNC_ALL writeback. This is not currently true as we do
      not clear I_DIRTY_TIME in __writeback_single_inode() even for
      WB_SYNC_ALL writeback in all the cases. This then resulted in the
      following oops because bdev_write_inode() did not clean the inode and
      writeback code later stumbled over a dirty inode with detached wb.
      
        general protection fault: 0000 [#1] SMP DEBUG_PAGEALLOC KASAN
        Modules linked in:
        CPU: 3 PID: 32 Comm: kworker/u10:1 Not tainted 4.6.0-rc3+ #349
        Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011
        Workqueue: writeback wb_workfn (flush-11:0)
        task: ffff88006ccf1840 ti: ffff88006cda8000 task.ti: ffff88006cda8000
        RIP: 0010:[<ffffffff818884d2>]  [<ffffffff818884d2>]
        locked_inode_to_wb_and_lock_list+0xa2/0x750
        RSP: 0018:ffff88006cdaf7d0  EFLAGS: 00010246
        RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffff88006ccf2050
        RDX: 0000000000000000 RSI: 000000114c8a8484 RDI: 0000000000000286
        RBP: ffff88006cdaf820 R08: ffff88006ccf1840 R09: 0000000000000000
        R10: 000229915090805f R11: 0000000000000001 R12: ffff88006a72f5e0
        R13: dffffc0000000000 R14: ffffed000d4e5eed R15: ffffffff8830cf40
        FS:  0000000000000000(0000) GS:ffff88006d500000(0000) knlGS:0000000000000000
        CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
        CR2: 0000000003301bf8 CR3: 000000006368f000 CR4: 00000000000006e0
        DR0: 0000000000001ec9 DR1: 0000000000000000 DR2: 0000000000000000
        DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000600
        Stack:
         ffff88006a72f680 ffff88006a72f768 ffff8800671230d8 03ff88006cdaf948
         ffff88006a72f668 ffff88006a72f5e0 ffff8800671230d8 ffff88006cdaf948
         ffff880065b90cc8 ffff880067123100 ffff88006cdaf970 ffffffff8188e12e
        Call Trace:
         [<     inline     >] inode_to_wb_and_lock_list fs/fs-writeback.c:309
         [<ffffffff8188e12e>] writeback_sb_inodes+0x4de/0x1250 fs/fs-writeback.c:1554
         [<ffffffff8188efa4>] __writeback_inodes_wb+0x104/0x1e0 fs/fs-writeback.c:1600
         [<ffffffff8188f9ae>] wb_writeback+0x7ce/0xc90 fs/fs-writeback.c:1709
         [<     inline     >] wb_do_writeback fs/fs-writeback.c:1844
         [<ffffffff81891079>] wb_workfn+0x2f9/0x1000 fs/fs-writeback.c:1884
         [<ffffffff813bcd1e>] process_one_work+0x78e/0x15c0 kernel/workqueue.c:2094
         [<ffffffff813bdc2b>] worker_thread+0xdb/0xfc0 kernel/workqueue.c:2228
         [<ffffffff813cdeef>] kthread+0x23f/0x2d0 drivers/block/aoe/aoecmd.c:1303
         [<ffffffff867bc5d2>] ret_from_fork+0x22/0x50 arch/x86/entry/entry_64.S:392
        Code: 05 94 4a a8 06 85 c0 0f 85 03 03 00 00 e8 07 15 d0 ff 41 80 3e
        00 0f 85 64 06 00 00 49 8b 9c 24 88 01 00 00 48 89 d8 48 c1 e8 03 <42>
        80 3c 28 00 0f 85 17 06 00 00 48 8b 03 48 83 c0 50 48 39 c3
        RIP  [<     inline     >] wb_get include/linux/backing-dev-defs.h:212
        RIP  [<ffffffff818884d2>] locked_inode_to_wb_and_lock_list+0xa2/0x750
        fs/fs-writeback.c:281
         RSP <ffff88006cdaf7d0>
        ---[ end trace 986a4d314dcb2694 ]---
      
      Fix the problem by making sure __writeback_single_inode() writes inode
      only with dirty times in WB_SYNC_ALL mode.
      
      Reported-by: default avatarDmitry Vyukov <dvyukov@google.com>
      Tested-by: default avatarLaurent Dufour <ldufour@linux.vnet.ibm.com>
      Signed-off-by: default avatarJan Kara <jack@suse.cz>
      Signed-off-by: default avatarJens Axboe <axboe@fb.com>
      dc5ff2b1
    • Jiri Kosina's avatar
      floppy: fix open(O_ACCMODE) for ioctl-only open · ff06db1e
      Jiri Kosina authored
      Commit 09954bad
      
       ("floppy: refactor open() flags handling"), as a
      side-effect, causes open(/dev/fdX, O_ACCMODE) to fail. It turns out that
      this is being used setfdprm userspace for ioctl-only open().
      
      Reintroduce back the original behavior wrt !(FMODE_READ|FMODE_WRITE)
      modes, while still keeping the original O_NDELAY bug fixed.
      
      Cc: stable@vger.kernel.org # v4.5+
      Reported-by: default avatarWim Osterholt <wim@djo.tudelft.nl>
      Tested-by: default avatarWim Osterholt <wim@djo.tudelft.nl>
      Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
      Signed-off-by: default avatarJens Axboe <axboe@fb.com>
      ff06db1e
  2. Aug 04, 2016
  3. Aug 03, 2016
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · f0936155
      Linus Torvalds authored
      Pull networking fixes from David Miller:
      
       1) Fix several cases of missing of_node_put() calls in various
          networking drivers.  From Peter Chen.
      
       2) Don't try to remove unconfigured VLANs in qed driver, from Yuval
          Mintz.
      
       3) Unbalanced locking in TIPC error handling, from Wei Yongjun.
      
       4) Fix lockups in CPDMA driver, from Grygorii Strashko.
      
       5) More MACSEC refcount et al fixes, from Sabrina Dubroca.
      
       6) Fix MAC address setting in r8169 during runtime suspend, from
          Chun-Hao Lin.
      
       7) Various printf format specifier fixes, from Heinrich Schuchardt.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (59 commits)
        qed: Fail driver load in 100g MSI mode.
        ethernet: ti: davinci_emac: add missing of_node_put after calling of_parse_phandle
        ethernet: stmicro: stmmac: add missing of_node_put after calling of_parse_phandle
        ethernet: stmicro: stmmac: dwmac-socfpga: add missing of_node_put after calling of_parse_phandle
        ethernet: renesas: sh_eth: add missing of_node_put after calling of_parse_phandle
        ethernet: renesas: ravb_main: add missing of_node_put after calling of_parse_phandle
        ethernet: marvell: pxa168_eth: add missing of_node_put after calling of_parse_phandle
        ethernet: marvell: mvpp2: add missing of_node_put after calling of_parse_phandle
        ethernet: marvell: mvneta: add missing of_node_put after calling of_parse_phandle
        ethernet: hisilicon: hns: hns_dsaf_main: add missing of_node_put after calling of_parse_phandle
        ethernet: hisilicon: hns: hns_dsaf_mac: add missing of_node_put after calling of_parse_phandle
        ethernet: cavium: octeon: add missing of_node_put after calling of_parse_phandle
        ethernet: aurora: nb8800: add missing of_node_put after calling of_parse_phandle
        ethernet: arc: emac_main: add missing of_node_put after calling of_parse_phandle
        ethernet: apm: xgene: add missing of_node_put after calling of_parse_phandle
        ethernet: altera: add missing of_node_put
        8139too: fix system hang when there is a tx timeout event.
        qed: Fix error return code in qed_resc_alloc()
        net: qlcnic: avoid superfluous assignement
        dsa: b53: remove redundant if
        ...
      f0936155
    • Linus Torvalds's avatar
      Merge branch 'akpm' (patches from Andrew) · d52bd54d
      Linus Torvalds authored
      Merge yet more updates from Andrew Morton:
      
       - the rest of ocfs2
      
       - various hotfixes, mainly MM
      
       - quite a bit of misc stuff - drivers, fork, exec, signals, etc.
      
       - printk updates
      
       - firmware
      
       - checkpatch
      
       - nilfs2
      
       - more kexec stuff than usual
      
       - rapidio updates
      
       - w1 things
      
      * emailed patches from Andrew Morton <akpm@linux-foundation.org>: (111 commits)
        ipc: delete "nr_ipc_ns"
        kcov: allow more fine-grained coverage instrumentation
        init/Kconfig: add clarification for out-of-tree modules
        config: add android config fragments
        init/Kconfig: ban CONFIG_LOCALVERSION_AUTO with allmodconfig
        relay: add global mode support for buffer-only channels
        init: allow blacklisting of module_init functions
        w1:omap_hdq: fix regression
        w1: add helper macro module_w1_family
        w1: remove need for ida and use PLATFORM_DEVID_AUTO
        rapidio/switches: add driver for IDT gen3 switches
        powerpc/fsl_rio: apply changes for RIO spec rev 3
        rapidio: modify for rev.3 specification changes
        rapidio: change inbound window size type to u64
        rapidio/idt_gen2: fix locking warning
        rapidio: fix error handling in mbox request/release functions
        rapidio/tsi721_dma: advance queue processing from transfer submit call
        rapidio/tsi721: add messaging mbox selector parameter
        rapidio/tsi721: add PCIe MRRS override parameter
        rapidio/tsi721_dma: add channel mask and queue size parameters
        ...
      d52bd54d
    • Linus Torvalds's avatar
      Merge tag 'for-linus-v4.8' of git://github.com/martinbrandenburg/linux · 8cbdd85b
      Linus Torvalds authored
      Pull orangefs update from Martin Brandenburg:
       "Kernel side caching and executable bugfix
      
        This allows OrangeFS to utilize the dcache and adds an in kernel
        attribute cache.  We previously used the user side client for this
        purpose.
      
        We see a modest performance increase on small file operations.  For
        example, without the cache, compiling coreutils takes about 17
        minutes.  With the patch and a 50 millisecond timeout for
        dcache_timeout_msecs and getattr_timeout_msecs (the default),
        compiling coreutils takes about 6 minutes 20 seconds.  On the same
        hardware, compiling coreutils on an xfs filesystem takes 90 seconds.
        We see similar improvements with mdtest and a test involving writing,
        reading, and deleting a large number of small files.
      
        Interested parties can review more data at the following URL.
      
          https://docs.google.com/spreadsheets/d/1v4aUeppKexIbRMz_Yn9k4eaM3uy2KCaPoe_93YKWOtA/pubhtml
      
        The eventual goal of this is to allow getdents to turn into a
        readdirplus to the OrangeFS server.  The cache will be filled then,
        which should provide a performance benefit to the common case of
        readdir followed by getattr on each entry (i.e.  ls -l).
      
        This also fixes a bug.  When orangefs_inode_permission was added, it
        did not collect i_size from the OrangeFS server, since this presses an
        unnecessary load on the OrangeFS server.  However, it left a case
        where i_size is never initialized.  Then running an executable could
        fail.
      
        With this patch, size is always collected to be inserted into the
        cache.  Thus the bug disappears.  If this patch is not accepted during
        this merge window, we will send a one-line band-aid for this bug
        instead"
      
      * tag 'for-linus-v4.8' of git://github.com/martinbrandenburg/linux:
        Orangefs: update orangefs.txt
        orangefs: Account for jiffies wraparound.
        orangefs: Change default dcache and getattr timeout to 50 msec.
        orangefs: Allow dcache and getattr cache time to be configured.
        orangefs: Cache getattr results.
        orangefs: Use d_time to avoid excessive lookups
      8cbdd85b