]> arthur.barton.de Git - bup.git/commit
Avoid fadvise (since it doesn't work as expected)
authorRob Browning <rlb@defaultvalue.org>
Sun, 10 May 2015 21:33:16 +0000 (16:33 -0500)
committerRob Browning <rlb@defaultvalue.org>
Sat, 23 May 2015 15:31:04 +0000 (10:31 -0500)
commitdb68c4fd4dc3087eb3f0b6e5846629cbf02d0b27
treead1eef367ae2b185dfd38d47f11c32328a30ad7f
parentdd5a15fbaefe675afe22859e8d2cabd362402b6e
Avoid fadvise (since it doesn't work as expected)

Currently, it appears that at least on Linux posix_fadvise() always
purges the cache given POSIX_FADV_DONTNEED, which is what bup uses, and
does nothing for POSIX_FADV_NOREUSE, which means that before this patch,
a bup save would completely clear the filesystem cache of any file data
traversed during the run.  Aside from being completely unintended, this
meant that active VM images, large databases, etc. would probably be
purged with every save.

Since it also looks like at least NetBSD doesn't do anything for
DONTNEED, and tools like tar, cpio, and duplicity don't use it, let's
just drop it.  That's simpler, and we can always add it back if/when
someone discovers it helps somewhere relevant.

Thanks to Nimen Nacnamme for reporting the issue.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
Acked-by: Greg Troxel <gdt@lexort.com>
lib/bup/_helpers.c
lib/bup/hashsplit.py