Orabug:
14092678
Without this flag page_cache_sync_readahead() might take some seconds to
complete.
Since dm-nfs used for ovm and as vdisk, random access is expect, so force
set this flag when open the backend file.
Signed-off-by: Joe Jin <joe.jin@oracle.com>
Cc: Adnan Misherfi <adnan.misherfi@oracle.com>
Cc: Kurt C Hackel <kurt.hackel@oracle.com>
Cc: Andrew Thomas <andrew.thomas@oracle.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
filp = filp_open(nc->path, flags, 0);
if (IS_ERR(filp))
return PTR_ERR(filp);
+
+ /* Force random reference */
+ filp->f_mode |= FMODE_RANDOM;
nc->filp = filp;
r = _check_file(ti);