mm: cleancache core ops functions and config
This third patch of eight in this cleancache series provides
the core code for cleancache that interfaces between the hooks in
VFS and individual filesystems and a cleancache backend. It also
includes build and config patches.
Two new files are added: mm/cleancache.c and include/linux/cleancache.h.
Note that CONFIG_CLEANCACHE can default to on; in systems that do
not provide a cleancache backend, all hooks devolve to a simple
check of a global enable flag, so performance impact should
be negligible but can be reduced to zero impact if config'ed off.
However for this first commit, it defaults to off.
Details and a FAQ can be found in Documentation/vm/cleancache.txt
Credits: Cleancache_ops design derived from Jeremy Fitzhardinge
design for tmem
[v8:
[email protected]: fix exportfs call affecting btrfs]
[v8:
[email protected]: use static inline function, not macro]
[v7:
[email protected]: cleanup sysfs and remove cleancache prefix]
[v6:
[email protected]: robustly handle buggy fs encode_fh actor definition]
[v5:
[email protected]: clean up global usage and static var names]
[v5:
[email protected]: simplify init hook and any future fs init changes]
[v5:
[email protected]: cleaner non-global interface for ops registration]
[v4:
[email protected]: interface must support exportfs FS's]
[v4:
[email protected]: interface must support 64-bit FS on 32-bit kernel]
[v3:
[email protected]: use one ops struct to avoid pointer hops]
[v3:
[email protected]: document and ensure PageLocked reqts are met]
[v3:
[email protected]: fix success/fail codes, change funcs to void]
[v2:
[email protected]: use sane types]
Signed-off-by: Dan Magenheimer <[email protected]>
Reviewed-by: Jeremy Fitzhardinge <[email protected]>
Reviewed-by: Konrad Rzeszutek Wilk <[email protected]>
Acked-by: Al Viro <[email protected]>
Acked-by: Andrew Morton <[email protected]>
Acked-by: Nitin Gupta <[email protected]>
Acked-by: Minchan Kim <[email protected]>
Acked-by: Andreas Dilger <[email protected]>
Acked-by: Jan Beulich <[email protected]>
Cc: Matthew Wilcox <[email protected]>
Cc: Nick Piggin <[email protected]>
Cc: Mel Gorman <[email protected]>
Cc: Rik Van Riel <[email protected]>
Cc: Chris Mason <[email protected]>
Cc: Ted Ts'o <[email protected]>
Cc: Mark Fasheh <[email protected]>
Cc: Joel Becker <[email protected]>