Fadvise

Merge #2988  & #2964 into together. And add test case.
 @liewegas , bypass make check & plz review. Thanks!
__attribute__ ((deprecated))