On Mon, Nov 29, 2010 at 07:18:17AM +0100, Guillem Jover wrote:
> > What's going on here?  sync_file_range() is a Linux specific system
> > call that has been around for a while.  It allows program to control
> > when writeback happens in a very low-level fashion.  The first set of
> > sync_file_range() system calls causes the system to start writing back
> > each file once it has finished being extracted.  It doesn't actually
> > wait for the write to finish; it just starts the writeback.
> 
> Hmm, ok so what about posix_fadvise(fd, 0, 0, POSIX_FADV_DONTNEED)
> instead, skimming over the kernel source seems to indicate it might
> end up doing more or less the same thing but in a portable way?

On the other hand, there is no guarantee that other kernels do the same,
nor that Linux will keep doing it in the future. Using sync_file_range
and possibly the corresponding BSD syscall seems a better solution.
(and apparently the assumption with fadvise doesn't work with xfs)

Mike


-- 
To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20101130090755.ga8...@glandium.org

Reply via email to