f2fs: updates on 4.15-rc1
authorJaegeuk Kim <jaegeuk@google.com>
Sat, 23 Sep 2017 09:02:18 +0000 (17:02 +0800)
committerJaegeuk Kim <jaegeuk@google.com>
Wed, 20 Dec 2017 21:55:17 +0000 (13:55 -0800)
commit7fb3f3b2a29ed52b70be57b1b3bed120ef1ffbd8
tree491ffdf70846e2a542932c74cf2d582d180a8f1e
parentcc43e740474ae7c5ea9ab286eb4c4323411dbc07
f2fs: updates on 4.15-rc1

Pull f2fs updates from Jaegeuk Kim:
"In this round, we introduce sysfile-based quota support which is
required for Android by default. In addition, we allow that users are
able to reserve some blocks in runtime to mitigate performance drops
in low free space.

Enhancements:
 - assign proper data segments according to write_hints given by user
 - issue cache_flush on dirty devices only among multiple devices
 - exploit cp_error flag and add more faults to enhance fault
   injection test
 - conduct more readaheads during f2fs_readdir
 - add a range for discard commands

Bug fixes:
 - fix zero stat->st_blocks when inline_data is set
 - drop crypto key and free stale memory pointer while evict_inode is
   failing
 - fix some corner cases in free space and segment management
 - fix wrong last_disk_size

This series includes lots of clean-ups and code enhancement in terms
of xattr operations, discard/flush command control. In addition, it
adds versatile debugfs entries to monitor f2fs status"

Cherry-picked from origin/upstream-f2fs-stable-linux-4.14.y:

7b538c1c32e1 f2fs: deny accessing encryption policy if encryption is off
c43ffa1881bc f2fs: inject fault in inc_valid_node_count
fa73e8745557 f2fs: expose quota information in debugfs
eb538327e573 f2fs: separate nat entry mem alloc from nat_tree_lock
a7c6829c1c38 f2fs: validate before set/clear free nat bitmap
eb84a567f686 f2fs: avoid opened loop codes in __add_ino_entry
793cdb935708 f2fs: apply write hints to select the type of segments for buffered write
75a69567eefc f2fs: introduce scan_curseg_cache for cleanup
6180b68c28c0 f2fs: optimize the way of traversing free_nid_bitmap
221656e4b864 f2fs: keep scanning until enough free nids are acquired
0b0a1e72b5d5 f2fs: trace checkpoint reason in fsync()
af75a621ef34 f2fs: keep isize once block is reserved cross EOF
3b96799dba53 f2fs: avoid race in between GC and block exchange
c33a70d7192d f2fs: save a multiplication for last_nid calculation
4c8fdcd5d79e f2fs: fix summary info corruption
ff95a94dd04c f2fs: remove dead code in update_meta_page
c7f08b508dc6 f2fs: remove unneeded semicolon
91d560341eab f2fs: don't bother with inode->i_version
270e78cfc169 f2fs: check curseg space before foreground GC
d3ad907d7caa f2fs: use rw_semaphore to protect SIT cache
d9e1a6b6966b f2fs: support quota sys files
3aec74eb20fe f2fs: add quota_ino feature infra
cf9435582aae f2fs: optimize __update_nat_bits
e56a876fd562 f2fs: modify for accurate fggc node io stat
a39d96b9a10c Revert "f2fs: handle dirty segments inside refresh_sit_entry"
0ccccb3839f5 f2fs: add a function to move nid
cd3b86fce8dd f2fs: export SSR allocation threshold
ca50229b7ef5 f2fs: give correct trimmed blocks in fstrim
73b8db889f80 f2fs: support bio allocation error injection
b8a938e4f875 f2fs: support get_page error injection
f2b91f22a9a2 f2fs: add missing sysfs description
6cef55704e9e f2fs: support soft block reservation
cef5e7165c08 f2fs: handle error case when adding xattr entry
a7848c0dee2c f2fs: support flexible inline xattr size
c63143060c45 f2fs: show current cp state
032d140917f9 f2fs: add missing quota_initialize
f241f66c3aee f2fs: show # of dirty segments via sysfs
1687d9f07bc3 f2fs: stop all the operations by cp_error flag
f793a2c291f9 f2fs: remove several redundant assignments
fb000836b122 f2fs: avoid using timespec
a4b9ed205158 f2fs: fix to correct no_fggc_candidate
bc69d5602412 Revert "f2fs: return wrong error number on f2fs_quota_write"
f49f4124b02e f2fs: remove obsolete pointer for truncate_xattr_node
c6bfa17c9fc4 f2fs: retry ENOMEM for quota_read|write
5e14327f2573 f2fs: limit # of inmemory pages
a064458a6d7d f2fs: update ctx->pos correctly when hitting hole in directory
372b93f94f7e f2fs: relocate readahead codes in readdir()
457e9c032c4a f2fs: allow readdir() to be interrupted
2d1af27c57f9 f2fs: trace f2fs_readdir
7bbdc74b724a f2fs: trace f2fs_lookup
76e8f60644aa f2fs: skip searching non-exist range in truncate_hole
2f18884d3c65 f2fs: avoid stale fi->gdirty_list pointer
0dbf4fd41748 f2fs/crypto: drop crypto key at evict_inode only
8c5827634ad6 f2fs: fix to avoid race when accessing last_disk_size
c2e2eec698e2 f2fs: Fix bool initialization/comparison
ab0a7977c988 f2fs: give up CP_TRIMMED_FLAG if it drops discards
001cc0b0c526 f2fs: trace f2fs_remove_discard
c72699d2320d f2fs: reduce cmd_lock coverage in __issue_discard_cmd
0eeceeb20671 f2fs: split discard policy
775d0e58bb72 f2fs: wrap discard policy
77b5bf3aaf14 f2fs: support issuing/waiting discard in range
6b50d3ec7d11 f2fs: fix to flush multiple device in checkpoint
5483b178450e f2fs: enhance multiple device flush
06800576e497 f2fs: fix to show ino management cache size correctly
a815ce9938f4 f2fs: drop FI_UPDATE_WRITE tag after f2fs_issue_flush
3257c6570745 f2fs: obsolete ALLOC_NID_LIST list
d54bf9da4f50 f2fs: convert inline data for direct I/O & FI_NO_PREALLOC
32c57300f669 f2fs: allow readpages with NULL file pointer
dba2b4548cf9 f2fs: show flush list status in sysfs
fae7dc47bdda f2fs: introduce read_xattr_block
148edd027e9c f2fs: introduce read_inline_xattr
b735df5e29d1 Revert "f2fs: reuse nids more aggressively"
13e34cbab66f Revert "f2fs: node segment is prior to data segment selected victim"
a76d81af17ce f2fs: fix to clear FI_NO_PREALLOC

Bug: 70801385
Change-Id: I3b8e0c21f4f8d52b669776fce41df77a4363d473
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
23 files changed:
Documentation/ABI/testing/sysfs-fs-f2fs
fs/f2fs/acl.c
fs/f2fs/checkpoint.c
fs/f2fs/data.c
fs/f2fs/debug.c
fs/f2fs/dir.c
fs/f2fs/f2fs.h
fs/f2fs/file.c
fs/f2fs/gc.c
fs/f2fs/inline.c
fs/f2fs/inode.c
fs/f2fs/namei.c
fs/f2fs/node.c
fs/f2fs/node.h
fs/f2fs/recovery.c
fs/f2fs/segment.c
fs/f2fs/segment.h
fs/f2fs/shrinker.c
fs/f2fs/super.c
fs/f2fs/sysfs.c
fs/f2fs/xattr.c
include/linux/f2fs_fs.h
include/trace/events/f2fs.h