Hi Julien, On Wed, 29 Dec 2010, Julien Cristau wrote: > On Mon, Dec 20, 2010 at 02:32:17 +0000, Guillem Jover wrote: > > > * On Linux use sync_file_range() to initiate asynchronous writeback > > of just unpacked files. Suggested by Ted Ts'o <[email protected]>. > > Thanks to Jonathan Nieder <[email protected]>. Closes: #605009 > > * On non-Linux use posix_fadvise(POSIX_FADV_DONTNEED) to notify the > > kernel > > dpkg does not need the unpacked files any longer, and that it can start > > writeback to be able to evict them from the cache at a later point. > > You're ignoring the return value of sync_file_range (and posix_fadvise). > While that may be ok for SYNC_FILE_RANGE_WRITE, I don't think it is for > SYNC_FILE_RANGE_WAIT_BEFORE.
It is ok since fsync() is still called afterwards. Both are only useful to avoid the speed-penalty that fsync() was giving us, but fsync() is still executed (and is usualy a no-op since the work has already been done thanks to the sync_file_range calls). Cheers, -- Raphaël Hertzog ◈ Debian Developer Follow my Debian News ▶ http://RaphaelHertzog.com (English) ▶ http://RaphaelHertzog.fr (Français) -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected] Archive: http://lists.debian.org/[email protected]

