On Sun 04-12-11 19:42:12, Cristian Rodríguez wrote:
Hi:
Hi,
calling posix_fadvise with advice POSIX_FADV_WILLNEED on a tmpfs filesystem returns EINVAL..
I assume you are talking about 12.1 kernel, right?
I know that it will have no effect since stuff written there is already in the page cache, but shouldn't it return 0 acting like a no-op instead ?
Yes that will work. Or we can do a "readahead" (pre faulting the memory).
whom to blame here the kernel, libc , posix ?
This is a side effect of 276aad6 merged in 3.1-rc1. I have noticed this while backporting tmpfs/shmem rework and was wondering what will break by the change. To be honest, fadvise is just an advice and so the error value shouldn't be a big deal and the application should just cope with that. On the other hand this is an userspace visible change so we should probably do something about that. Where do you see this as a problem? I can cook up a patch but will need some justification which I have a hard time to come up with ;) -- Michal Hocko SUSE Labs SUSE LINUX s.r.o. Lihovarska 1060/12 190 00 Praha 9 Czech Republic -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-kernel+owner@opensuse.org