1. 19 Apr, 2017 4 commits
    • Jan Kara's avatar
      jfs: Set flags on quota files directly · 12fd086d
      Jan Kara authored
      Currently immutable and noatime flags on quota files are set by quota
      code which requires us to copy inode->i_flags to our on disk version
      of quota flags in GETFLAGS ioctl and copy_to_dinode(). Move to
      setting / clearing these on-disk flags directly to save that copying.
      Signed-off-by: default avatarJan Kara <jack@suse.cz>
      12fd086d
    • Jan Kara's avatar
      ext2: Set flags on quota files directly · 161f3b74
      Jan Kara authored
      Currently immutable and noatime flags on quota files are set by quota
      code which requires us to copy inode->i_flags to our on disk version of
      quota flags in GETFLAGS ioctl and __ext2_write_inode().  Move to setting
      / clearing these on-disk flags directly to save that copying.
      Signed-off-by: default avatarJan Kara <jack@suse.cz>
      161f3b74
    • Jan Kara's avatar
      reiserfs: Set flags on quota files directly · 33eb928a
      Jan Kara authored
      Currently immutable and noatime flags on quota files are set by quota
      code which requires us to copy inode->i_flags to our on disk version of
      quota flags in GETFLAGS ioctl and when writing stat item. Move to
      setting / clearing these on-disk flags directly to save that copying.
      Signed-off-by: default avatarJan Kara <jack@suse.cz>
      33eb928a
    • Jan Kara's avatar
      ext4: Set flags on quota files directly · 957153fc
      Jan Kara authored
      Currently immutable and noatime flags on quota files are set by quota
      code which requires us to copy inode->i_flags to our on disk version of
      quota flags in GETFLAGS ioctl and ext4_do_update_inode(). Move to
      setting / clearing these on-disk flags directly to save that copying.
      Signed-off-by: default avatarJan Kara <jack@suse.cz>
      957153fc
  2. 05 Apr, 2017 3 commits
    • Jan Kara's avatar
      reiserfs: Protect dquot_writeback_dquots() by s_umount semaphore · 1e0e653f
      Jan Kara authored
      dquot_writeback_dquots() expects s_umount semaphore to be held to
      protect it from other concurrent quota operations. reiserfs_sync_fs()
      can call dquot_writeback_dquots() without holding s_umount semaphore
      when called from flush_old_commits().
      
      Fix the problem by grabbing s_umount in flush_old_commits(). However we
      have to be careful and use only trylock since reiserfs_cancel_old_sync()
      can be waiting for flush_old_commits() to complete while holding
      s_umount semaphore. Possible postponing of sync work is not a big deal
      though as that is only an opportunistic flush.
      
      Fixes: 9d1ccbe7Reported-by: default avatarJan Beulich <jbeulich@suse.com>
      Signed-off-by: default avatarJan Kara <jack@suse.cz>
      1e0e653f
    • Jan Kara's avatar
      reiserfs: Make cancel_old_flush() reliable · 71b0576b
      Jan Kara authored
      Currently canceling of delayed work that flushes old data using
      cancel_old_flush() does not prevent work from being requeued. Thus
      in theory new work can be queued after cancel_old_flush() from
      reiserfs_freeze() has run. This will become larger problem once
      flush_old_commits() can requeue the work itself.
      
      Fix the problem by recording in sbi->work_queue that flushing work is
      canceled and should not be requeued.
      Signed-off-by: default avatarJan Kara <jack@suse.cz>
      71b0576b
    • Jan Kara's avatar
      ext2: Call dquot_writeback_dquots() with s_umount held · 65547661
      Jan Kara authored
      ext2_sync_fs() could be called without s_umount semaphore held when
      called through ext2_write_super() from __ext2_write_inode(). This
      function then calls dquot_writeback_dquots() which relies on s_umount to
      be held for protection against other quota operations.
      
      In fact __ext2_write_inode() does not need all the functionality
      ext2_write_super() provides. It is enough to just write the superblock.
      So use ext2_sync_super() instead.
      
      Fixes: 9d1ccbe7Reported-by: default avatarJan Beulich <jbeulich@suse.com>
      Signed-off-by: default avatarJan Kara <jack@suse.cz>
      65547661
  3. 23 Mar, 2017 1 commit
    • Arnd Bergmann's avatar
      reiserfs: avoid a -Wmaybe-uninitialized warning · ab494964
      Arnd Bergmann authored
      The latest gcc-7.0.1 snapshot warns about an unintialized variable use:
      
      In file included from fs/reiserfs/lbalance.c:8:0:
      fs/reiserfs/lbalance.c: In function 'leaf_item_bottle.isra.3':
      fs/reiserfs/reiserfs.h:1279:13: error: '*((void *)&n_ih+8).v' may be used uninitialized in this function [-Werror=maybe-uninitialized]
        v2->v = (v2->v & cpu_to_le64(15ULL << 60)) | cpu_to_le64(offset);
                 ~~^~~
      fs/reiserfs/reiserfs.h:1279:13: error: '*((void *)&n_ih+8).v' may be used uninitialized in this function [-Werror=maybe-uninitialized]
        v2->v = (v2->v & cpu_to_le64(15ULL << 60)) | cpu_to_le64(offset);
      
      This happens because the offset/type pair that is stored in
      ih.key.u.k_offset_v2 is actually uninitialized when we call
      set_le_ih_k_offset() and set_le_ih_k_type(). After we have called both,
      all data is correct, but the first of the two reads uninitialized data
      for the type field and writes it back before it gets overwritten.
      
      This works around the warning by initializing the k_offset_v2 through
      the slightly larger memcpy().
      
      [JK: Remove now unused define and make it obvious we initialize the key]
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarJan Kara <jack@suse.cz>
      ab494964
  4. 21 Mar, 2017 11 commits
  5. 20 Mar, 2017 11 commits
    • Arnd Bergmann's avatar
      remoteproc: qcom: fix QCOM_SMD dependencies · c3104aae
      Arnd Bergmann authored
      qcom_smd_register_edge() is provided by either QCOM_SMD or RPMSG_QCOM_SMD,
      and if both of them are disabled, it does nothing.
      
      The check for the PIL drivers however only checks for QCOM_SMD, so it breaks
      with QCOM_SMD=n && RPMSG_QCOM_SMD=m:
      
      drivers/remoteproc/built-in.o: In function `smd_subdev_remove':
      qcom_wcnss_iris.c:(.text+0x231c): undefined reference to `qcom_smd_unregister_edge'
      drivers/remoteproc/built-in.o: In function `smd_subdev_probe':
      qcom_wcnss_iris.c:(.text+0x2344): undefined reference to `qcom_smd_register_edge'
      drivers/remoteproc/built-in.o: In function `smd_subdev_probe':
      qcom_q6v5_pil.c:(.text+0x3538): undefined reference to `qcom_smd_register_edge'
      qcom_q6v5_pil.c:(.text+0x3538): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `qcom_smd_register_edge'
      
      This clarifies the Kconfig dependency.
      
      Fixes: 4b48921a ("remoteproc: qcom: Use common SMD edge handler")
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarBjorn Andersson <bjorn.andersson@linaro.org>
      c3104aae
    • Chao Yu's avatar
      f2fs: combine nat_bits and free_nid_bitmap cache · 7041d5d2
      Chao Yu authored
      Both nat_bits cache and free_nid_bitmap cache provide same functionality
      as a intermediate cache between free nid cache and disk, but with
      different granularity of indicating free nid range, and different
      persistence policy. nat_bits cache provides better persistence ability,
      and free_nid_bitmap provides better granularity.
      
      In this patch we combine advantage of both caches, so finally policy of
      the intermediate cache would be:
      - init: load free nid status from nat_bits into free_nid_bitmap
      - lookup: scan free_nid_bitmap before load NAT blocks
      - update: update free_nid_bitmap in real-time
      - persistence: udpate and persist nat_bits in checkpoint
      
      This patch also resolves performance regression reported by lkp-robot.
      
      commit:
        4ac91242 ("f2fs: introduce free nid bitmap")
        d00030cf9cd0bb96fdccc41e33d3c91dcbb672ba ("f2fs: use __set{__clear}_bit_le")
        1382c0f3f9d3f936c8bc42ed1591cf7a593ef9f7 ("f2fs: combine nat_bits and free_nid_bitmap cache")
      
      4ac91242 d00030cf9cd0bb96fdccc41e33 1382c0f3f9d3f936c8bc42ed15
      ---------------- -------------------------- --------------------------
               %stddev     %change         %stddev     %change         %stddev
                   \          |                \          |                \
           77863 ±  0%      +2.1%      79485 ±  1%     +50.8%     117404 ±  0%  aim7.jobs-per-min
          231.63 ±  0%      -2.0%     227.01 ±  1%     -33.6%     153.80 ±  0%  aim7.time.elapsed_time
          231.63 ±  0%      -2.0%     227.01 ±  1%     -33.6%     153.80 ±  0%  aim7.time.elapsed_time.max
          896604 ±  0%      -0.8%     889221 ±  3%     -20.2%     715260 ±  1%  aim7.time.involuntary_context_switches
            2394 ±  1%      +4.6%       2503 ±  1%      +3.7%       2481 ±  2%  aim7.time.maximum_resident_set_size
            6240 ±  0%      -1.5%       6145 ±  1%     -14.1%       5360 ±  1%  aim7.time.system_time
         1111357 ±  3%      +1.9%    1132509 ±  2%      -6.2%    1041932 ±  2%  aim7.time.voluntary_context_switches
      ...
      Signed-off-by: default avatarChao Yu <yuchao0@huawei.com>
      Tested-by: default avatarXiaolong Ye <xiaolong.ye@intel.com>
      Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
      7041d5d2
    • Chao Yu's avatar
      f2fs: skip scanning free nid bitmap of full NAT blocks · 586d1492
      Chao Yu authored
      This patch adds to account free nids for each NAT blocks, and while
      scanning all free nid bitmap, do check count and skip lookuping in
      full NAT block.
      Signed-off-by: default avatarChao Yu <yuchao0@huawei.com>
      Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
      586d1492
    • Jaegeuk Kim's avatar
      f2fs: use __set{__clear}_bit_le · 23380b85
      Jaegeuk Kim authored
      This patch uses __set{__clear}_bit_le for highter speed.
      Reviewed-by: default avatarChao Yu <yuchao0@huawei.com>
      Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
      23380b85
    • Jaegeuk Kim's avatar
      f2fs: declare static functions · 9f7e4a2c
      Jaegeuk Kim authored
      This is to avoid build warning reported by kbuild test robot.
      Signed-off-by: default avatarFengguang Wu <fengguang.wu@intel.com>
      Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
      9f7e4a2c
    • Jaegeuk Kim's avatar
      f2fs: don't overwrite node block by SSR · 720037f9
      Jaegeuk Kim authored
      This patch fixes that SSR can overwrite previous warm node block consisting of
      a node chain since the last checkpoint.
      
      Fixes: 5b6c6be2 ("f2fs: use SSR for warm node as well")
      Reviewed-by: default avatarChao Yu <yuchao0@huawei.com>
      Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
      720037f9
    • Linus Torvalds's avatar
      Linux 4.11-rc3 · 97da3854
      Linus Torvalds authored
      97da3854
    • Linus Torvalds's avatar
      mm/swap: don't BUG_ON() due to uninitialized swap slot cache · 452b94b8
      Linus Torvalds authored
      This BUG_ON() triggered for me once at shutdown, and I don't see a
      reason for the check.  The code correctly checks whether the swap slot
      cache is usable or not, so an uninitialized swap slot cache is not
      actually problematic afaik.
      
      I've temporarily just switched the BUG_ON() to a WARN_ON_ONCE(), since
      I'm not sure why that seemingly pointless check was there.  I suspect
      the real fix is to just remove it entirely, but for now we'll warn about
      it but not bring the machine down.
      
      Cc: "Huang, Ying" <ying.huang@intel.com>
      Cc: Tim Chen <tim.c.chen@linux.intel.com>
      Cc: Michal Hocko <mhocko@suse.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      452b94b8
    • Linus Torvalds's avatar
      Merge tag 'powerpc-4.11-5' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux · a07a6e41
      Linus Torvalds authored
      Pull more powerpc fixes from Michael Ellerman:
       "A couple of minor powerpc fixes for 4.11:
      
         - wire up statx() syscall
      
         - don't print a warning on memory hotplug when HPT resizing isn't
           available
      
        Thanks to: David Gibson, Chandan Rajendra"
      
      * tag 'powerpc-4.11-5' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
        powerpc/pseries: Don't give a warning when HPT resizing isn't available
        powerpc: Wire up statx() syscall
      a07a6e41
    • Linus Torvalds's avatar
      Merge branch 'parisc-4.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux · 4571bc5a
      Linus Torvalds authored
      Pull parisc fixes from Helge Deller:
      
       - Mikulas Patocka added support for R_PARISC_SECREL32 relocations in
         modules with CONFIG_MODVERSIONS.
      
       - Dave Anglin optimized the cache flushing for vmap ranges.
      
       - Arvind Yadav provided a fix for a potential NULL pointer dereference
         in the parisc perf code (and some code cleanups).
      
       - I wired up the new statx system call, fixed some compiler warnings
         with the access_ok() macro and fixed shutdown code to really halt a
         system at shutdown instead of crashing & rebooting.
      
      * 'parisc-4.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
        parisc: Fix system shutdown halt
        parisc: perf: Fix potential NULL pointer dereference
        parisc: Avoid compiler warnings with access_ok()
        parisc: Wire up statx system call
        parisc: Optimize flush_kernel_vmap_range and invalidate_kernel_vmap_range
        parisc: support R_PARISC_SECREL32 relocation in modules
      4571bc5a
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending · 8aa34172
      Linus Torvalds authored
      Pull SCSI target fixes from Nicholas Bellinger:
       "The bulk of the changes are in qla2xxx target driver code to address
        various issues found during Cavium/QLogic's internal testing (stable
        CC's included), along with a few other stability and smaller
        miscellaneous improvements.
      
        There are also a couple of different patch sets from Mike Christie,
        which have been a result of his work to use target-core ALUA logic
        together with tcm-user backend driver.
      
        Finally, a patch to address some long standing issues with
        pass-through SCSI export of TYPE_TAPE + TYPE_MEDIUM_CHANGER devices,
        which will make folks using physical (or virtual) magnetic tape happy"
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending: (28 commits)
        qla2xxx: Update driver version to 9.00.00.00-k
        qla2xxx: Fix delayed response to command for loop mode/direct connect.
        qla2xxx: Change scsi host lookup method.
        qla2xxx: Add DebugFS node to display Port Database
        qla2xxx: Use IOCB interface to submit non-critical MBX.
        qla2xxx: Add async new target notification
        qla2xxx: Export DIF stats via debugfs
        qla2xxx: Improve T10-DIF/PI handling in driver.
        qla2xxx: Allow relogin to proceed if remote login did not finish
        qla2xxx: Fix sess_lock & hardware_lock lock order problem.
        qla2xxx: Fix inadequate lock protection for ABTS.
        qla2xxx: Fix request queue corruption.
        qla2xxx: Fix memory leak for abts processing
        qla2xxx: Allow vref count to timeout on vport delete.
        tcmu: Convert cmd_time_out into backend device attribute
        tcmu: make cmd timeout configurable
        tcmu: add helper to check if dev was configured
        target: fix race during implicit transition work flushes
        target: allow userspace to set state to transitioning
        target: fix ALUA transition timeout handling
        ...
      8aa34172
  6. 19 Mar, 2017 10 commits