diff options
author | Eric Sandeen <sandeen@redhat.com> | 2013-03-04 16:40:01 -0600 |
---|---|---|
committer | David Sterba <dsterba@suse.cz> | 2013-03-10 16:04:01 +0100 |
commit | 06efd54588aa1d155e73f6f6372f44832154a279 (patch) | |
tree | 1ae1aa314c2cb8a5e47b28020d589a9c68a8afde /volumes.c | |
parent | b1d5f20c3a744c2994c32dd616ba2605c4e4f395 (diff) |
btrfs-progs: check return of posix_fadvise
It seems highly unlikely that posix_fadvise could fail,
and even if it does, it was only advisory. Still, if
it does, we could issue a notice to the user.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Diffstat (limited to 'volumes.c')
-rw-r--r-- | volumes.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -193,7 +193,8 @@ int btrfs_open_devices(struct btrfs_fs_devices *fs_devices, int flags) goto fail; } - posix_fadvise(fd, 0, 0, POSIX_FADV_DONTNEED); + if (posix_fadvise(fd, 0, 0, POSIX_FADV_DONTNEED)) + fprintf(stderr, "Warning, could not drop caches\n"); if (device->devid == fs_devices->latest_devid) fs_devices->latest_bdev = fd; |