On Fri, 24.09.10 12:54, [email protected] ([email protected]) wrote: > @@ -96,8 +96,8 @@ static int unpack_file(FILE *pack) { > * intended to mean that the whole file shall be > * read */ > > - if (readahead(fd, 0, st.st_size) < 0) { > - log_warning("readahead() failed: %m"); > + if (posix_fadvise(fd, 0, st.st_size, POSIX_FADV_WILLNEED) < > 0) { > + log_warning("posix_fadvise() failed: %m"); > goto finish; > } > }
Thanks! Applied. I think conceptionally it is more appropriate to use posix_fadvise() here which is why I merged this patch for now. However, there are three questions this opens: 1) is fadvise() actually influenced by ioprio_set() the same way as readahead() or read() are? 2) are the read requests canceled by a close() on the same fd? 3) what happens when we queue more read requests this way than the block device q can handle? will fadvise() become blocking (which would be great)? or are requests droppped then, and which ones would those be, the queued ones or the ones we try to enqueue? I have now asked for clarficiations from some fs hackers, let's see what they'll say. Lennart -- Lennart Poettering - Red Hat, Inc. _______________________________________________ systemd-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/systemd-devel
