Pull f2fs updates from Jaegeuk Kim:
"In this round, we've followed up to support some generic features such
as cgroup, block reservation, linking fscrypt_ops, delivering
write_hints, and some ioctls. And, we could fix some corner cases in
terms of power-cut recovery and subtle deadlocks.
Enhancements:
- bitmap operations to handle NAT blocks
- readahead to improve readdir speed
- switch to use fscrypt_*
- apply write hints for direct IO
- add reserve_root=%u,resuid=%u,resgid=%u to reserve blocks for root/uid/gid
- modify b_avail and b_free to consider root reserved blocks
- support cgroup writeback
- support FIEMAP_FLAG_XATTR for fibmap
- add F2FS_IOC_PRECACHE_EXTENTS to pre-cache extents
- add F2FS_IOC_{GET/SET}_PIN_FILE to pin LBAs for data blocks
- support inode creation time
Bug fixs:
- sysfile-based quota operations
- memory footprint accounting
- allow to write data on partial preallocation case
- fix deadlock case on fallocate
- fix to handle fill_super errors
- fix missing inode updates of fsync'ed file
- recover renamed file which was fsycn'ed before
- drop inmemory pages in corner error case
- keep last_disk_size correctly
- recover missing i_inline flags during roll-forward
Various clean-up patches were added as well"
Cherry-pick from origin/upstream-f2fs-stable-linux-4.9.y:
71f8f0499e f2fs: support inode creation time
58dc6f6fce f2fs: rebuild sit page from sit info in mem
6393cef3f1 f2fs: stop issuing discard if fs is readonly
742bc90e88 f2fs: clean up duplicated assignment in init_discard_policy
cfabb6edfb f2fs: use GFP_F2FS_ZERO for cleanup
111e8456a6 f2fs: allow to recover node blocks given updated checkpoint
36e041a57c f2fs: recover some i_inline flags
3127a7b67c f2fs: correct removexattr behavior for null valued extended attribute
86f78c1e55 f2fs: drop page cache after fs shutdown
1a3b004759 f2fs: stop gc/discard thread after fs shutdown
62a91a5a48 f2fs: hanlde error case in f2fs_ioc_shutdown
66356ee5f9 f2fs: split need_inplace_update
5912fbae9d f2fs: fix to update last_disk_size correctly
3aa46e2c21 f2fs: kill F2FS_INLINE_XATTR_ADDRS for cleanup
acdaca27aa f2fs: clean up error path of fill_super
cf8821115c f2fs: avoid hungtask when GC encrypted block if io_bits is set
4be98c9805 f2fs: allow quota to use reserved blocks
2a6489c87e f2fs: fix to drop all inmem pages correctly
fd21442239 f2fs: speed up defragment on sparse file
6bce96329c f2fs: support F2FS_IOC_PRECACHE_EXTENTS
9ce3d6bb68 f2fs: add an ioctl to disable GC for specific file
9ef5e65684 f2fs: prevent newly created inode from being dirtied incorrectly
08ddb1917e f2fs: support FIEMAP_FLAG_XATTR
aa9c1c1046 f2fs: fix to cover f2fs_inline_data_fiemap with inode_lock
92b8f9c726 f2fs: check node page again in write end io
4992a3ca15 f2fs: fix to caclulate required free section correctly
d1a6b4f6c9 f2fs: handle newly created page when revoking inmem pages
462d762b20 f2fs: add resgid and resuid to reserve root blocks
cbd5e5af8c f2fs: implement cgroup writeback support
5a5847421d f2fs: remove unused pend_list_tag
37d4ca7cd1 f2fs: avoid high cpu usage in discard thread
02cfdab834 f2fs: make local functions static
5fee540985 f2fs: add reserved blocks for root user
265974636a f2fs: check segment type in __f2fs_replace_block
4f76d6acc6 f2fs: update inode info to inode page for new file
52b4528174 f2fs: show precise # of blocks that user/root can use
ae0e1fa5a8 f2fs: clean up unneeded declaration
8fc7446629 f2fs: continue to do direct IO if we only preallocate partial blocks
162464df89 f2fs: enable quota at remount from r to w
e270976ff8 f2fs: skip stop_checkpoint for user data writes
d04736926f f2fs: fix missing error number for xattr operation
211cb7bb24 f2fs: recover directory operations by fsync
2648e735ff f2fs: return error during fill_super
e2a0518d8c f2fs: fix an error case of missing update inode page
bf1750bafe f2fs: fix potential hangtask in f2fs_trace_pid
c804fcf3df f2fs: no need return value in restore summary process
fdd41a8793 f2fs: use unlikely for release case
a74690b03e f2fs: don't return value in truncate_data_blocks_range
987892cc67 f2fs: clean up f2fs_map_blocks
d7714cb231 f2fs: clean up hash codes
e3d2a1e946 f2fs: fix error handling in fill_super
b02e72d294 f2fs: spread f2fs_k{m,z}alloc
ead5259de3 f2fs: inject fault to kvmalloc
e585ca29dd f2fs: inject fault to kzalloc
8234ed56e7 f2fs: remove a redundant conditional expression
1a9d6a9c00 f2fs: apply write hints to select the type of segment for direct write
955e7f58f6 f2fs: switch to fscrypt_prepare_setattr()
268c7f607c f2fs: switch to fscrypt_prepare_lookup()
8dfa646f97 f2fs: switch to fscrypt_prepare_rename()
d5382ccb02 f2fs: switch to fscrypt_prepare_link()
3ccc177c9b f2fs: switch to fscrypt_file_open()
8b5674efdc f2fs: remove repeated f2fs_bug_on
ba4556cdf1 f2fs: remove an excess variable
46accc9251 f2fs: fix lock dependency in between dio_rwsem & i_mmap_sem
8933908c4f f2fs: remove unused parameter
76b6e8ed20 f2fs: still write data if preallocate only partial blocks
1ed753392f f2fs: introduce sysfs readdir_ra to readahead inode block in readdir
4e68a15eee f2fs: fix concurrent problem for updating free bitmap
9be6e75962 f2fs: remove unneeded memory footprint accounting
923df752db f2fs: no need to read nat block if nat_block_bitmap is set
09234be262 f2fs: reserve nid resource for quota sysfile
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>