OSDN Git Service

Merge 4.20-rc1-4.4 into android-4.4
authorJaegeuk Kim <jaegeuk@google.com>
Sat, 3 Nov 2018 22:06:22 +0000 (15:06 -0700)
committerJaegeuk Kim <jaegeuk@google.com>
Sat, 3 Nov 2018 22:06:22 +0000 (15:06 -0700)
* origin/upstream-f2fs-stable-linux-4.4.y:
  f2fs: guarantee journalled quota data by checkpoint
  f2fs: cleanup dirty pages if recover failed
  f2fs: fix data corruption issue with hardware encryption
  f2fs: fix to recover inode->i_flags of inode block during POR
  f2fs: spread f2fs_set_inode_flags()
  f2fs: fix to spread clear_cold_data()
  Revert "f2fs: fix to clear PG_checked flag in set_page_dirty()"
  f2fs: account read IOs and use IO counts for is_idle
  f2fs: fix to account IO correctly for cgroup writeback
  f2fs: fix to account IO correctly
  f2fs: remove request_list check in is_idle()
  f2fs: allow to mount, if quota is failed
  f2fs: update REQ_TIME in f2fs_cross_rename()
  f2fs: do not update REQ_TIME in case of error conditions
  f2fs: remove unneeded disable_nat_bits()
  f2fs: remove unused sbi->trigger_ssr_threshold
  f2fs: shrink sbi->sb_lock coverage in set_file_temperature()
  f2fs: fix to recover cold bit of inode block during POR
  f2fs: submit cached bio to avoid endless PageWriteback
  f2fs: checkpoint disabling
  f2fs: clear PageError on the read path
  f2fs: allow out-place-update for direct IO in LFS mode
  f2fs: refactor ->page_mkwrite() flow
  Revert: "f2fs: check last page index in cached bio to decide submission"
  f2fs: support superblock checksum
  f2fs: add to account skip count of background GC
  f2fs: add to account meta IO
  f2fs: keep lazytime on remount
  f2fs: fix missing up_read
  f2fs: return correct errno in f2fs_gc
  f2fs: avoid f2fs_bug_on if f2fs_get_meta_page_nofail got EIO
  f2fs: mark inode dirty explicitly in recover_inode()
  f2fs: fix to recover inode's crtime during POR
  f2fs: fix to recover inode's i_gc_failures during POR
  f2fs: fix to recover inode's i_flags during POR
  f2fs: fix to recover inode's project id during POR
  f2fs: update i_size after DIO completion
  f2fs: report ENOENT correctly in f2fs_rename
  f2fs: fix remount problem of option io_bits
  f2fs: fix to recover inode's uid/gid during POR
  f2fs: avoid infinite loop in f2fs_alloc_nid
  f2fs: add new idle interval timing for discard and gc paths
  f2fs: split IO error injection according to RW
  f2fs: add SPDX license identifiers
  f2fs: surround fault_injection related option parsing using CONFIG_F2FS_FAULT_INJECTION
  f2fs: avoid sleeping under spin_lock
  f2fs: plug readahead IO in readdir()
  f2fs: fix to do sanity check with current segment number
  f2fs: fix memory leak of percpu counter in fill_super()
  f2fs: fix memory leak of write_io in fill_super()
  f2fs: cache NULL when both default_acl and acl are NULL
  f2fs: fix to flush all dirty inodes recovered in readonly fs
  f2fs: report error if quota off error during umount
  f2fs: submit bio after shutdown
  f2fs: avoid wrong decrypted data from disk
  Revert "f2fs: use printk_ratelimited for f2fs_msg"
  f2fs: fix unnecessary periodic wakeup of discard thread when dev is busy
  f2fs: fix to avoid NULL pointer dereference on se->discard_map
  f2fs: add additional sanity check in f2fs_acl_from_disk()

 Conflicts:
fs/f2fs/data.c

Change-Id: I95097a969bbd23c2009106b07be8a1eeec675b1c
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
1  2 
fs/f2fs/data.c
fs/f2fs/f2fs.h
fs/f2fs/inline.c
fs/f2fs/namei.c

diff --cc fs/f2fs/data.c
@@@ -2328,18 -2398,12 +2399,22 @@@ static int f2fs_write_begin(struct fil
        block_t blkaddr = NULL_ADDR;
        int err = 0;
  
 +      if (trace_android_fs_datawrite_start_enabled()) {
 +              char *path, pathbuf[MAX_TRACE_PATHBUF_LEN];
 +
 +              path = android_fstrace_get_pathname(pathbuf,
 +                                                  MAX_TRACE_PATHBUF_LEN,
 +                                                  inode);
 +              trace_android_fs_datawrite_start(inode, pos, len,
 +                                               current->pid, path,
 +                                               current->comm);
 +      }
        trace_f2fs_write_begin(inode, pos, len, flags);
  
+       err = f2fs_is_checkpoint_ready(sbi);
+       if (err)
+               goto fail;
        if ((f2fs_is_atomic_file(inode) &&
                        !f2fs_available_free_memory(sbi, INMEM_PAGES)) ||
                        is_inode_flag_set(inode, FI_ATOMIC_REVOKE_REQUEST)) {
@@@ -2500,31 -2562,11 +2574,34 @@@ static ssize_t f2fs_direct_IO(struct ki
        if (err)
                return err < 0 ? err : 0;
  
-       if (f2fs_force_buffered_io(inode, rw))
+       if (f2fs_force_buffered_io(inode, iocb, iter))
                return 0;
  
 +      if (trace_android_fs_dataread_start_enabled() &&
 +          (iov_iter_rw(iter) == READ)) {
 +              char *path, pathbuf[MAX_TRACE_PATHBUF_LEN];
 +
 +              path = android_fstrace_get_pathname(pathbuf,
 +                                                  MAX_TRACE_PATHBUF_LEN,
 +                                                  inode);
 +              trace_android_fs_dataread_start(inode, offset,
 +                                              count, current->pid, path,
 +                                              current->comm);
 +      }
 +      if (trace_android_fs_datawrite_start_enabled() &&
 +          (iov_iter_rw(iter) == WRITE)) {
 +              char *path, pathbuf[MAX_TRACE_PATHBUF_LEN];
 +
 +              path = android_fstrace_get_pathname(pathbuf,
 +                                                  MAX_TRACE_PATHBUF_LEN,
 +                                                  inode);
 +              trace_android_fs_datawrite_start(inode, offset, count,
 +                                               current->pid, path,
 +                                               current->comm);
 +      }
++
+       do_opu = allow_outplace_dio(inode, iocb, iter);
        trace_f2fs_direct_IO_enter(inode, offset, count, rw);
  
        if (rw == WRITE && whint_mode == WHINT_MODE_OFF)
diff --cc fs/f2fs/f2fs.h
Simple merge
Simple merge
diff --cc fs/f2fs/namei.c
Simple merge