On Fri, Jun 15, 2012 at 4:36 PM, <kosaki.motohiro@xxxxxxxxx> wrote: > From: KOSAKI Motohiro <kosaki.motohiro@xxxxxxxxxxxxxx> > > Eric Wong reported his test suite was fail when /tmp is tmpfs. > > https://lkml.org/lkml/2012/2/24/479 > > Current,input check of POSIX_FADV_WILLNEED has two problems. > > 1) require a_ops->readpage. > But in fact, force_page_cache_readahead() only require > a target filesystem has either ->readpage or ->readpages. > 2) return -EINVAL when filesystem don't have ->readpage. > But, posix says, it should be retrieved a hint. Thus fadvise() > should return 0 if filesystem has no optimization way. > Especially, userland application don't know a filesystem type > of TMPDIR directory as Eric pointed out. Then, userland can't > avoid this error. We shouldn't encourage to ignore syscall > return value. > > Thus, this patch change a return value to 0 when filesytem don't > support readahead. > > Cc: linux-mm@xxxxxxxxx > Cc: Hugh Dickins <hughd@xxxxxxxxxx> > Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> > Cc: Hillf Danton <dhillf@xxxxxxxxx> > Signed-off-by: Eric Wong <normalperson@xxxxxxxx> > Tested-by: Eric Wong <normalperson@xxxxxxxx> > Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@xxxxxxxxxxxxxx> > --- no objection? -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href