* fs_{write|read}_pages() now has an additional argument "mayBlock".
* the page writer don't allow to block, while all other writers do. This fixes bug #1509. The reason the page writer needs this is because it marks several pages from different caches as busy. * Fixed a warning about ASSERT being defined already in BFS, since util/DoublyLinkedList.h now includes debug.h. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22434 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -92,10 +92,10 @@ typedef struct file_system_module_info {
|
||||
bool (*can_page)(fs_volume fs, fs_vnode vnode, fs_cookie cookie);
|
||||
status_t (*read_pages)(fs_volume fs, fs_vnode vnode, fs_cookie cookie,
|
||||
off_t pos, const iovec *vecs, size_t count, size_t *_numBytes,
|
||||
bool reenter);
|
||||
bool mayBlock, bool reenter);
|
||||
status_t (*write_pages)(fs_volume fs, fs_vnode vnode, fs_cookie cookie,
|
||||
off_t pos, const iovec *vecs, size_t count, size_t *_numBytes,
|
||||
bool reenter);
|
||||
bool mayBlock, bool reenter);
|
||||
|
||||
/* cache file access */
|
||||
status_t (*get_file_map)(fs_volume fs, fs_vnode vnode, off_t offset,
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
/* File System Interface Layer Definition
|
||||
*
|
||||
* Copyright 2004-2006, Haiku Inc. All Rights Reserved.
|
||||
/*
|
||||
* Copyright 2004-2007, Haiku Inc. All Rights Reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
#ifndef _FSSH_FS_INTERFACE_H
|
||||
#define _FSSH_FS_INTERFACE_H
|
||||
|
||||
/*! File System Interface Layer Definition */
|
||||
|
||||
|
||||
#include "fssh_disk_device_defs.h"
|
||||
#include "fssh_module.h"
|
||||
@@ -95,10 +96,12 @@ typedef struct fssh_file_system_module_info {
|
||||
fssh_fs_cookie cookie);
|
||||
fssh_status_t (*read_pages)(fssh_fs_volume fs, fssh_fs_vnode vnode,
|
||||
fssh_fs_cookie cookie, fssh_off_t pos, const fssh_iovec *vecs,
|
||||
fssh_size_t count, fssh_size_t *_numBytes, bool reenter);
|
||||
fssh_size_t count, fssh_size_t *_numBytes, bool mayBlock,
|
||||
bool reenter);
|
||||
fssh_status_t (*write_pages)(fssh_fs_volume fs, fssh_fs_vnode vnode,
|
||||
fssh_fs_cookie cookie, fssh_off_t pos, const fssh_iovec *vecs,
|
||||
fssh_size_t count, fssh_size_t *_numBytes, bool reenter);
|
||||
fssh_size_t count, fssh_size_t *_numBytes, bool mayBlock,
|
||||
bool reenter);
|
||||
|
||||
/* cache file access */
|
||||
fssh_status_t (*get_file_map)(fssh_fs_volume fs, fssh_fs_vnode vnode,
|
||||
|
||||
@@ -91,10 +91,13 @@ void vfs_acquire_vnode(void *vnode);
|
||||
status_t vfs_get_cookie_from_fd(int fd, void **_cookie);
|
||||
bool vfs_can_page(void *vnode, void *cookie);
|
||||
status_t vfs_read_pages(void *vnode, void *cookie, off_t pos,
|
||||
const iovec *vecs, size_t count, size_t *_numBytes, bool fsReenter);
|
||||
const iovec *vecs, size_t count, size_t *_numBytes, bool mayBlock,
|
||||
bool fsReenter);
|
||||
status_t vfs_write_pages(void *vnode, void *cookie, off_t pos,
|
||||
const iovec *vecs, size_t count, size_t *_numBytes, bool fsReenter);
|
||||
status_t vfs_get_vnode_cache(void *vnode, struct vm_cache **_cache, bool allocate);
|
||||
const iovec *vecs, size_t count, size_t *_numBytes, bool mayBlock,
|
||||
bool fsReenter);
|
||||
status_t vfs_get_vnode_cache(void *vnode, struct vm_cache **_cache,
|
||||
bool allocate);
|
||||
status_t vfs_get_file_map( void *_vnode, off_t offset, size_t size,
|
||||
struct file_io_vec *vecs, size_t *_count);
|
||||
status_t vfs_get_fs_node_from_path(dev_t mountID, const char *path,
|
||||
|
||||
@@ -223,9 +223,11 @@ typedef struct vm_store_ops {
|
||||
status_t (*commit)(struct vm_store *backing_store, off_t size);
|
||||
bool (*has_page)(struct vm_store *backing_store, off_t offset);
|
||||
status_t (*read)(struct vm_store *backing_store, off_t offset,
|
||||
const iovec *vecs, size_t count, size_t *_numBytes, bool fsReenter);
|
||||
const iovec *vecs, size_t count, size_t *_numBytes, bool mayBlock,
|
||||
bool fsReenter);
|
||||
status_t (*write)(struct vm_store *backing_store, off_t offset,
|
||||
const iovec *vecs, size_t count, size_t *_numBytes, bool fsReenter);
|
||||
const iovec *vecs, size_t count, size_t *_numBytes, bool mayBlock,
|
||||
bool fsReenter);
|
||||
status_t (*fault)(struct vm_store *backing_store,
|
||||
struct vm_address_space *aspace, off_t offset);
|
||||
void (*acquire_ref)(struct vm_store *backing_store);
|
||||
|
||||
Reference in New Issue
Block a user