1. 03 11月, 2020 1 次提交
    • C
      f2fs: fix to seek incorrect data offset in inline data file · 7a6e59d7
      Chao Yu 提交于
      As kitestramuort reported:
      
      F2FS-fs (nvme0n1p4): access invalid blkaddr:1598541474
      [   25.725898] ------------[ cut here ]------------
      [   25.725903] WARNING: CPU: 6 PID: 2018 at f2fs_is_valid_blkaddr+0x23a/0x250
      [   25.725923] Call Trace:
      [   25.725927]  ? f2fs_llseek+0x204/0x620
      [   25.725929]  ? ovl_copy_up_data+0x14f/0x200
      [   25.725931]  ? ovl_copy_up_inode+0x174/0x1e0
      [   25.725933]  ? ovl_copy_up_one+0xa22/0xdf0
      [   25.725936]  ? ovl_copy_up_flags+0xa6/0xf0
      [   25.725938]  ? ovl_aio_cleanup_handler+0xd0/0xd0
      [   25.725939]  ? ovl_maybe_copy_up+0x86/0xa0
      [   25.725941]  ? ovl_open+0x22/0x80
      [   25.725943]  ? do_dentry_open+0x136/0x350
      [   25.725945]  ? path_openat+0xb7e/0xf40
      [   25.725947]  ? __check_sticky+0x40/0x40
      [   25.725948]  ? do_filp_open+0x70/0x100
      [   25.725950]  ? __check_sticky+0x40/0x40
      [   25.725951]  ? __check_sticky+0x40/0x40
      [   25.725953]  ? __x64_sys_openat+0x1db/0x2c0
      [   25.725955]  ? do_syscall_64+0x2d/0x40
      [   25.725957]  ? entry_SYSCALL_64_after_hwframe+0x44/0xa9
      
      llseek() reports invalid block address access, the root cause is if
      file has inline data, f2fs_seek_block() will access inline data regard
      as block address index in inode block, which should be wrong, fix it.
      Reported-by: Nkitestramuort <kitestramuort@autistici.org>
      Signed-off-by: NChao Yu <yuchao0@huawei.com>
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      7a6e59d7
  2. 15 10月, 2020 1 次提交
  3. 14 10月, 2020 1 次提交
  4. 30 9月, 2020 1 次提交
  5. 15 9月, 2020 1 次提交
  6. 12 9月, 2020 4 次提交
  7. 11 9月, 2020 2 次提交
    • C
      f2fs: fix compile warning · 17d7648d
      Chao Yu 提交于
      This patch fixes below compile warning reported by LKP
      (kernel test robot)
      
      cppcheck warnings: (new ones prefixed by >>)
      
      >> fs/f2fs/file.c:761:9: warning: Identical condition 'err', second condition is always false [identicalConditionAfterEarlyExit]
          return err;
                 ^
         fs/f2fs/file.c:753:6: note: first condition
          if (err)
              ^
         fs/f2fs/file.c:761:9: note: second condition
          return err;
      Reported-by: Nkernel test robot <lkp@intel.com>
      Signed-off-by: NChao Yu <yuchao0@huawei.com>
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      17d7648d
    • C
      f2fs: introduce inmem curseg · d0b9e42a
      Chao Yu 提交于
      Previous implementation of aligned pinfile allocation will:
      - allocate new segment on cold data log no matter whether last used
      segment is partially used or not, it makes IOs more random;
      - force concurrent cold data/GCed IO going into warm data area, it
      can make a bad effect on hot/cold data separation;
      
      In this patch, we introduce a new type of log named 'inmem curseg',
      the differents from normal curseg is:
      - it reuses existed segment type (CURSEG_XXX_NODE/DATA);
      - it only exists in memory, its segno, blkofs, summary will not b
       persisted into checkpoint area;
      
      With this new feature, we can enhance scalability of log, special
      allocators can be created for purposes:
      - pure lfs allocator for aligned pinfile allocation or file
      defragmentation
      - pure ssr allocator for later feature
      
      So that, let's update aligned pinfile allocation to use this new
      inmem curseg fwk.
      Signed-off-by: NChao Yu <yuchao0@huawei.com>
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      d0b9e42a
  8. 04 8月, 2020 1 次提交
  9. 22 7月, 2020 1 次提交
    • D
      f2fs: add F2FS_IOC_SEC_TRIM_FILE ioctl · 9af84648
      Daeho Jeong 提交于
      Added a new ioctl to send discard commands or/and zero out
      to selected data area of a regular file for security reason.
      
      The way of handling range.len of F2FS_IOC_SEC_TRIM_FILE:
      1. Added -1 value support for range.len to secure trim the whole blocks
         starting from range.start regardless of i_size.
      2. If the end of the range passes over the end of file, it means until
         the end of file (i_size).
      3. ignored the case of that range.len is zero to prevent the function
         from making end_addr zero and triggering different behaviour of
         the function.
      Signed-off-by: NDaeho Jeong <daehojeong@google.com>
      Reviewed-by: NChao Yu <yuchao0@huawei.com>
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      9af84648
  10. 21 7月, 2020 1 次提交
  11. 08 7月, 2020 3 次提交
  12. 19 6月, 2020 1 次提交
  13. 09 6月, 2020 1 次提交
  14. 29 5月, 2020 1 次提交
  15. 27 5月, 2020 1 次提交
  16. 12 5月, 2020 5 次提交
  17. 08 5月, 2020 1 次提交
  18. 18 4月, 2020 1 次提交
  19. 04 4月, 2020 3 次提交
  20. 20 3月, 2020 5 次提交
  21. 11 3月, 2020 4 次提交