Enable the IO hook for both attribute and write overlay. Attribute overlay isn't
concerned by it as it does not do file data, it simply passes the hook through. In the write_overlay case we check for write operations and for modified nodes. In both cases we return B_NOT_SUPPORTED which will cause a fallback to synchronous IO. The main problem with the fallback is not that it is synchronous but that the physical buffers of the request will be mapped and filled page wise, which makes it slow for various reasons. In any case with this setup all reads to write_overlay that can go through unmodified now do. This should speed up CD boot as there is no physical to virtual translation overhead and no limit to page wise reads. In the best case it should now read 256 blocks at the time instead of always falling back to 2. My tests show no side effects on creating, writing or partially modifying nodes so far. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32897 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
ee0be828e4
commit
271b9ad49a
@ -1187,14 +1187,12 @@ overlay_write_pages(fs_volume *volume, fs_vnode *vnode, void *cookie, off_t pos,
|
||||
}
|
||||
|
||||
|
||||
#if 0
|
||||
static status_t
|
||||
overlay_io(fs_volume *volume, fs_vnode *vnode, void *cookie,
|
||||
io_request *request)
|
||||
{
|
||||
OVERLAY_CALL(io, cookie, request)
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
static status_t
|
||||
@ -1641,9 +1639,7 @@ static fs_vnode_ops sOverlayVnodeOps = {
|
||||
&overlay_read_pages,
|
||||
&overlay_write_pages,
|
||||
|
||||
// TODO: the io scheduler uses it when available but we may simply
|
||||
// return B_UNSUPPORTED and I'm not sure it then falls back correctly
|
||||
NULL, //&overlay_io,
|
||||
&overlay_io,
|
||||
&overlay_cancel_io,
|
||||
|
||||
&overlay_get_file_map,
|
||||
|
@ -17,6 +17,7 @@
|
||||
#include <fs_cache.h>
|
||||
#include <fs_info.h>
|
||||
#include <fs_interface.h>
|
||||
#include <io_requests.h>
|
||||
|
||||
#include <debug.h>
|
||||
#include <KernelExport.h>
|
||||
@ -1294,14 +1295,26 @@ overlay_write_pages(fs_volume *volume, fs_vnode *vnode, void *cookie, off_t pos,
|
||||
}
|
||||
|
||||
|
||||
#if 0
|
||||
static status_t
|
||||
overlay_io(fs_volume *volume, fs_vnode *vnode, void *cookie,
|
||||
io_request *request)
|
||||
{
|
||||
OVERLAY_CALL(io, cookie, request)
|
||||
if (io_request_is_write(request))
|
||||
return B_UNSUPPORTED;
|
||||
|
||||
OverlayInode *node = (OverlayInode *)vnode->private_node;
|
||||
if (node->IsModified())
|
||||
return B_UNSUPPORTED;
|
||||
|
||||
TRACE("relaying op: io\n");
|
||||
fs_vnode *superVnode = node->SuperVnode();
|
||||
if (superVnode->ops->io != NULL) {
|
||||
return superVnode->ops->io(volume->super_volume, superVnode, cookie,
|
||||
request);
|
||||
}
|
||||
|
||||
return B_UNSUPPORTED;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
static status_t
|
||||
@ -1714,9 +1727,7 @@ static fs_vnode_ops sOverlayVnodeOps = {
|
||||
&overlay_read_pages,
|
||||
&overlay_write_pages,
|
||||
|
||||
// TODO: the io scheduler uses it when available but we may simply
|
||||
// return B_UNSUPPORTED and I'm not sure it then falls back correctly
|
||||
NULL, //&overlay_io,
|
||||
&overlay_io,
|
||||
&overlay_cancel_io,
|
||||
|
||||
&overlay_get_file_map,
|
||||
|
Loading…
Reference in New Issue
Block a user