Fadvise

Merge #2988  & #2964 into together. And add test case.
 @liewegas , bypass make check & plz review. Thanks!
I think this will need to be done as a new call, set_op_flags2(), since int<->enum conversion needs an explicit cast in c++, and the actual int type used for an enum isn't standardized.