DO NOT REPLY [Bug 7876] please implement o_direct

samba-bugs at samba.org samba-bugs at samba.org
Tue Jan 25 14:10:22 MST 2011


https://bugzilla.samba.org/show_bug.cgi?id=7876





------- Comment #4 from samba-bugs at thequod.de  2011-01-25 15:10 CST -------
Thanks for your feedback!

I had just found the patch by Tobi myself, and it is using mincore (now) to
check if a file has been cached before rsync touched it (and then skip removing
it from the cache).

Post: http://insights.oetiker.ch/linux/fadvise.html
Patch for 3.0.7: http://tobi.oetiker.ch/patches/rsync-3.0.7-fadvise.patch

I agree that something like "nice" and "ionice" would be the best approach, and
I find it rather unusual to not have something like that available already.
I have found the following wrapper, which is using O_DIRECT however:
http://arighi.blogspot.com/2007/04/how-to-bypass-buffer-cache-in-linux.html

For what it's worth, here's a link to the POSIX_FADV_DONTNEED implementation in
the current kernel:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-2.6.37.y.git;a=blob;f=mm/fadvise.c;hb=refs/heads/master#l118


-- 
Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.


More information about the rsync mailing list