1. 21 5月, 2018 1 次提交
  2. 28 3月, 2018 1 次提交
  3. 19 3月, 2018 1 次提交
    • R
      f2fs: Set GF_NOFS in read_cache_page_gfp while doing f2fs_quota_read · 02117b8a
      Ritesh Harjani 提交于
      Quota code itself is serializing the operations by taking mutex_lock.
      It seems a below deadlock can happen if GF_NOFS is not used in
      f2fs_quota_read
      
      __switch_to+0x88
      __schedule+0x5b0
      schedule+0x78
      schedule_preempt_disabled+0x20
      __mutex_lock_slowpath+0xdc   		//mutex owner is itself
      mutex_lock+0x2c
      dquot_commit+0x30			//mutex_lock(&dqopt->dqio_mutex);
      dqput+0xe0
      __dquot_drop+0x80
      dquot_drop+0x48
      f2fs_evict_inode+0x218
      evict+0xa8
      dispose_list+0x3c
      prune_icache_sb+0x58
      super_cache_scan+0xf4
      do_shrink_slab+0x208
      shrink_slab.part.40+0xac
      shrink_zone+0x1b0
      do_try_to_free_pages+0x25c
      try_to_free_pages+0x164
      __alloc_pages_nodemask+0x534
      do_read_cache_page+0x6c
      read_cache_page+0x14
      f2fs_quota_read+0xa4
      read_blk+0x54
      find_tree_dqentry+0xe4
      find_tree_dqentry+0xb8
      find_tree_dqentry+0xb8
      find_tree_dqentry+0xb8
      qtree_read_dquot+0x68
      v2_read_dquot+0x24
      dquot_acquire+0x5c			// mutex_lock(&dqopt->dqio_mutex);
      dqget+0x238
      __dquot_initialize+0xd4
      dquot_initialize+0x10
      dquot_file_open+0x34
      f2fs_file_open+0x6c
      do_dentry_open+0x1e4
      vfs_open+0x6c
      path_openat+0xa20
      do_filp_open+0x4c
      do_sys_open+0x178
      Signed-off-by: NRitesh Harjani <riteshh@codeaurora.org>
      Reviewed-by: NChao Yu <yuchao0@huawei.com>
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      02117b8a
  4. 17 3月, 2018 6 次提交
  5. 13 3月, 2018 10 次提交
  6. 23 1月, 2018 1 次提交
  7. 17 1月, 2018 5 次提交
  8. 04 1月, 2018 1 次提交
  9. 03 1月, 2018 4 次提交
  10. 28 11月, 2017 1 次提交
    • L
      Rename superblock flags (MS_xyz -> SB_xyz) · 1751e8a6
      Linus Torvalds 提交于
      This is a pure automated search-and-replace of the internal kernel
      superblock flags.
      
      The s_flags are now called SB_*, with the names and the values for the
      moment mirroring the MS_* flags that they're equivalent to.
      
      Note how the MS_xyz flags are the ones passed to the mount system call,
      while the SB_xyz flags are what we then use in sb->s_flags.
      
      The script to do this was:
      
          # places to look in; re security/*: it generally should *not* be
          # touched (that stuff parses mount(2) arguments directly), but
          # there are two places where we really deal with superblock flags.
          FILES="drivers/mtd drivers/staging/lustre fs ipc mm \
                  include/linux/fs.h include/uapi/linux/bfs_fs.h \
                  security/apparmor/apparmorfs.c security/apparmor/include/lib.h"
          # the list of MS_... constants
          SYMS="RDONLY NOSUID NODEV NOEXEC SYNCHRONOUS REMOUNT MANDLOCK \
                DIRSYNC NOATIME NODIRATIME BIND MOVE REC VERBOSE SILENT \
                POSIXACL UNBINDABLE PRIVATE SLAVE SHARED RELATIME KERNMOUNT \
                I_VERSION STRICTATIME LAZYTIME SUBMOUNT NOREMOTELOCK NOSEC BORN \
                ACTIVE NOUSER"
      
          SED_PROG=
          for i in $SYMS; do SED_PROG="$SED_PROG -e s/MS_$i/SB_$i/g"; done
      
          # we want files that contain at least one of MS_...,
          # with fs/namespace.c and fs/pnode.c excluded.
          L=$(for i in $SYMS; do git grep -w -l MS_$i $FILES; done| sort|uniq|grep -v '^fs/namespace.c'|grep -v '^fs/pnode.c')
      
          for f in $L; do sed -i $f $SED_PROG; done
      Requested-by: NAl Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      1751e8a6
  11. 06 11月, 2017 7 次提交
    • J
      f2fs: don't bother with inode->i_version · d1954ab4
      Jeff Layton 提交于
      f2fs does not set the SB_I_VERSION flag, so the i_version will never
      be incremented on write. It was recently changed to increment the
      i_version on a quota write, which isn't necessary here.
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Reviewed-by: NChao Yu <yuchao0@huawei.com>
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      d1954ab4
    • J
      f2fs: support quota sys files · ea676733
      Jaegeuk Kim 提交于
      This patch supports hidden quota files in the system, which will be used for
      Android. It requires up-to-date f2fs-tools later than v1.9.0.
      Reviewed-by: NChao Yu <yuchao0@huawei.com>
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      ea676733
    • C
      f2fs: support bio allocation error injection · d62fe971
      Chao Yu 提交于
      This patch adds to support bio allocation error injection to simulate
      out-of-memory test scenario.
      Signed-off-by: NChao Yu <yuchao0@huawei.com>
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      d62fe971
    • C
      f2fs: support get_page error injection · 01eccef7
      Chao Yu 提交于
      This patch adds to support get_page error injection to simulate
      out-of-memory test scenario.
      Signed-off-by: NChao Yu <yuchao0@huawei.com>
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      01eccef7
    • Y
      f2fs: support soft block reservation · 80d42145
      Yunlong Song 提交于
      It supports to extend reserved_blocks sysfs interface to be soft
      threshold, which allows user configure it exceeding current available
      user space. This patch also introduces a new sysfs interface called
      current_reserved_blocks, which shows the current blocks that have
      already been reserved.
      Signed-off-by: NYunlong Song <yunlong.song@huawei.com>
      Signed-off-by: NChao Yu <yuchao0@huawei.com>
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      80d42145
    • C
      f2fs: support flexible inline xattr size · 6afc662e
      Chao Yu 提交于
      Now, in product, more and more features based on file encryption were
      introduced, their demand of xattr space is increasing, however, inline
      xattr has fixed-size of 200 bytes, once inline xattr space is full, new
      increased xattr data would occupy additional xattr block which may bring
      us more space usage and performance regression during persisting.
      
      In order to resolve above issue, it's better to expand inline xattr size
      flexibly according to user's requirement.
      
      So this patch introduces new filesystem feature 'flexible inline xattr',
      and new mount option 'inline_xattr_size=%u', once mkfs enables the
      feature, we can use the option to make f2fs supporting flexible inline
      xattr size.
      
      To support this feature, we add extra attribute i_inline_xattr_size in
      inode layout, indicating that how many space inline xattr borrows from
      block address mapping space in inode layout, by this, we can easily
      locate and store flexible-sized inline xattr data in inode.
      
      Inode disk layout:
        +----------------------+
        | .i_mode              |
        | ...                  |
        | .i_ext               |
        +----------------------+
        | .i_extra_isize       |
        | .i_inline_xattr_size |-----------+
        | ...                  |           |
        +----------------------+           |
        | .i_addr              |           |
        |  - block address or  |           |
        |  - inline data       |           |
        +----------------------+<---+      v
        |    inline xattr      |    +---inline xattr range
        +----------------------+<---+
        | .i_nid               |
        +----------------------+
        |   node_footer        |
        | (nid, ino, offset)   |
        +----------------------+
      
      Note that, we have to cnosider backward compatibility which reserved
      inline_data space, 200 bytes, all the time, reported by Sheng Yong.
      
      Previous inline data or directory always reserved 200 bytes in inode layout,
      even if inline_xattr is disabled. In order to keep inline_dentry's structure
      for backward compatibility, we get the space back only from inline_data.
      Signed-off-by: NChao Yu <yuchao0@huawei.com>
      Reported-by: NSheng Yong <shengyong1@huawei.com>
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      6afc662e
    • J
      f2fs: stop all the operations by cp_error flag · 1f227a3e
      Jaegeuk Kim 提交于
      This patch replaces to use cp_error flag instead of RDONLY for quota off.
      Reviewed-by: NChao Yu <yuchao0@huawei.com>
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      1f227a3e
  12. 26 10月, 2017 2 次提交