From b312979252c5b566d2f59febcda67f309637e18c Mon Sep 17 00:00:00 2001 From: Prasad Joshi Date: Sat, 25 Jun 2011 13:30:29 +0100 Subject: Tear down and flush the mmap region The inode eviction should unmap the pages associated with the inode. These pages should also be flushed to disk to avoid the data loss. Therefore, use truncate_setsize() in evict_inode() to release the pagecache. The API truncate_setsize() was added in 2.6.35 kernel. To ensure compatibility with the old kernel, the patch defines its own truncate_setsize function. Signed-off-by: Prasad Joshi Closes #255 --- zfs_config.h.in | 3 +++ 1 file changed, 3 insertions(+) (limited to 'zfs_config.h.in') diff --git a/zfs_config.h.in b/zfs_config.h.in index d9a4851c5..0d3028f3b 100644 --- a/zfs_config.h.in +++ b/zfs_config.h.in @@ -153,6 +153,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H +/* truncate_setsize() is available */ +#undef HAVE_TRUNCATE_SETSIZE + /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H -- cgit v1.2.3