Commit 86837340 authored by Zhang Jingwang's avatar Zhang Jingwang Committed by Dries Kimpe
Browse files

Revert "Fix for page cache issue from Gary"

Previously, we found that when the memory is full of cached pages
(even they are all clean) the performance will drop significantly.
So we clear all cached pages when the file is closed.

However now we found that the problem is in Linux kernel and it has
been fixed in CentOS 6.2. So the previous patch is unnecessary if
we avoid to use SLES 11.

This reverts commit a62a6eea75041e7418f89e8d3dc6798ab67b254a.
parent af5c4044
......@@ -957,27 +957,9 @@ static int zoidfs_posix_remove(const zoidfs_handle_t *parent_handle,
* zoidfs_commit
* This function flushes the buffers associated with the file handle.
*/
static int zoidfs_posix_commit(const zoidfs_handle_t * handle, zoidfs_op_hint_t * UNUSED(op_hint))
/* static int zoidfs_posix_commit(const zoidfs_handle_t * UNUSED(handle), zoidfs_op_hint_t * UNUSED(op_hint)) */
static int zoidfs_posix_commit(const zoidfs_handle_t * UNUSED(handle), zoidfs_op_hint_t * UNUSED(op_hint))
{
/* file descriptor interface is not buffered... */
/* clear page cache */
int file;
int returncode = ZFS_OK;
int ret;
int err;
Descriptor desc;
/* obtain file handle */
ret = getfd_handle (handle, &desc, &err);
if (!ret)
return errno2zfs (err);
file = desc.fd;
posix_fadvise(file,0,0,4);
releasefd_handle (&desc);
return ZFS_OK;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment