search for: posix_fadv_willneed

Displaying 13 results from an estimated 13 matches for "posix_fadv_willneed".

2012 Oct 23
0
[2.2-UNSTABLE] compilation error: 'POSIX_FADV_WILLNEED' undeclared
...liasing=2 \ -I/usr/local/include -MT fs-posix.lo -MD -MP -MF .deps/fs-posix.Tpo \ -c fs-posix.c -fPIC -DPIC -o .libs/fs-posix.o | fs-posix.c: In function 'fs_posix_prefetch': | fs-posix.c:298: warning: implicit declaration of function 'posix_fadvise' | fs-posix.c:298: error: 'POSIX_FADV_WILLNEED' undeclared (first use in this function) | fs-posix.c:298: error: (Each undeclared identifier is reported only once | fs-posix.c:298: error: for each function it appears in.) | gmake[3]: *** [fs-posix.lo] Error 1 | gmake[3]: Leaving directory `/usr/local/etc/dovecot/SOURCE/dovecot-2.2/src/lib-f...
2016 Apr 14
3
builder: posix_fadvise fixes.
The way we used posix_fadvise was wrong, and yet right! Rich.
2016 Apr 14
0
[PATCH 1/2] utils, builder: Add wrappers for posix_fadvise.
...OSIX_FADV_DONTNEED)); +#endif +} + +/** + * Hint that we will access the data in the near future. + * + * It's OK to call this on a non-file since we ignore failure as it is + * only a hint. + */ +void +guestfs_int_fadvise_willneed (int fd) +{ +#if defined(HAVE_POSIX_FADVISE) && defined(POSIX_FADV_WILLNEED) + /* It's not clear from the man page, but the 'advice' parameter is + * NOT a bitmask. You can only pass one parameter with each call. + */ + ignore_value (posix_fadvise (fd, 0, 0, POSIX_FADV_WILLNEED)); +#endif +} -- 2.7.4
2011 Mar 31
0
Message file prefetching to memory
...doing (FETCH, wait, FETCH, wait, ...) it can do (FETCH, FETCH, .., wait). For the same reason it's also going to be very useful once I add support for key-value databases / other high latency cloud filesystems. It also works with Maildir, single-dbox and cydir backends by calling posix_fadvise(POSIX_FADV_WILLNEED) for the files. This syscall is apparently only implemented by Linux. It should tell the kernel to start reading the files from disk to page cache. By calling this for multiple files, it should help the kernel optimize disk I/O. For example if 10 files are prefetched, the kernel might figure out th...
2011 May 23
0
Can CIFS files in read only mode be cached by client?
Hello! I am writing a Linux server, and I want to pre-fetch a number of CIFS files and cache locally. The files are on a CIFS share mounted as read only. I was planning on opening the file, calling posix_fadvise(........,POSIX_FADV_WILLNEED) on the file descriptor, and then closing the file. Will this work? Is there a better way of doing this? Thanks!! Aaron
2010 Apr 12
1
samba-3.5.2 - "getent group" not returning any info
...inbind.so.2", O_RDONLY) = 5 read(5, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\200\33\0"..., 832) = 832 fstat(5, {st_mode=S_IFREG|0755, st_size=35642, ...}) = 0 mmap(NULL, 2145744, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 5, 0) = 0x7f748e928000 fadvise64(5, 0, 2145744, POSIX_FADV_WILLNEED) = 0 mprotect(0x7f748e92d000, 2097152, PROT_NONE) = 0 mmap(0x7f748eb2d000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED| MAP_DENYWRITE, 5, 0x5000) = 0x7f748eb2d000 mmap(0x7f748eb2f000, 19920, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED| MAP_ANONYMOUS, -1, 0) = 0x7f748eb2f000 close(5)...
2020 Apr 20
4
performance problems with notmuch new
Franz Fellner <alpine.art.de at gmail.com> writes: > I also suffer from bad performance of notmuch new. I used notmuch > some years ago and notmuch new always felt instantanious. Had to stop > using it because internet was too slow to sync my mails :/ Now (with > better internet and a completely new setup using mbsync) indexing one > mail takes at least 10 seconds,
2020 Apr 09
0
[PATCH nbdkit v2 1/3] file: Move file operators to a new common/fileops mini-library.
...* SEEK_HOLE */ + +#if HAVE_POSIX_FADVISE +/* Caching. */ +int +fileops_cache (void *handle, uint32_t count, uint64_t offset, uint32_t flags) +{ + struct fileops *fops = handle; + int r; + + /* Cache is advisory, we don't care if this fails */ + r = posix_fadvise (fops->fd, offset, count, POSIX_FADV_WILLNEED); + if (r) { + errno = r; + nbdkit_error ("posix_fadvise: %m"); + return -1; + } + return 0; +} +#endif /* HAVE_POSIX_FADVISE */ diff --git a/plugins/file/file.c b/plugins/file/file.c index 8c2ea077..3dd6c944 100644 --- a/plugins/file/file.c +++ b/plugins/file/file.c @@ -34,51...
2020 Apr 09
1
[PATCH nbdkit PRELIMINARY] file: Move file operators to a new fileops mini-library
There's a lot of code in nbdkit-file-plugin which it would be nice to reuse elsewhere. One possible approach (as outlined here) is simply to move the file callbacks (like file.pread, file.pwrite, file.zero etc) to a new mini-library. They can then be consumed by other plugins fairly easily by doing: static void * foo_open (int readonly) { struct fileops *fops; int fd, flags; /*
2019 May 10
11
[nbdkit PATCH 0/9] RFC: implement NBD_CMD_CACHE
I'm still working my way through the filters before this series will be complete, but this is enough of a start to at least get some feedback on the idea of implementing another NBD protocol extension. Eric Blake (9): server: Internal hooks for implementing NBD_CMD_CACHE plugins: Add .cache callback file, split: Implement .cache with posix_fadvise nbd: Implement NBD_CMD_CACHE
2019 May 16
27
[nbdkit PATCH v2 00/24] implement NBD_CMD_CACHE
Since v1: - rework .can_cache to be tri-state, with default of no advertisement (ripple effect through other patches) - add a lot more patches in order to round out filter support And in the meantime, Rich pushed NBD_CMD_CACHE support into libnbd, so in theory we now have a way to test cache commands through the entire stack. Eric Blake (24): server: Internal hooks for implementing
2020 Apr 09
6
[PATCH nbdkit v2 0/3] Implement fileops.
Needs some work still, see in particular the commit message for patch 3. Rich.
2013 Apr 18
0
Processed: adding new jessie tag to sid-tagged bugs
...t; tags 614543 + jessie Bug #614543 [src:python2.5] python2.5: FTBFS: network errors Added tag(s) jessie. > tags 556331 + jessie Bug #556331 [src:rubrica] FTBFS with binutils-gold Added tag(s) jessie. > tags 697015 + jessie Bug #697015 [src:imagevis3d] imagevis3d: FTBFS[kfreebsd]: error: 'POSIX_FADV_WILLNEED' was not declared in this scope Added tag(s) jessie. > tags 665027 + jessie Bug #665027 {Done: Francesco Paolo Lovergine <frankie at debian.org>} [src:saga] saga: FTBFS: build-dependency not installable: liblas-dev Added tag(s) jessie. > tags 701397 + jessie Bug #701397 [src:guile-2...