* bfs_fsync() was the only place which could cause the

fs_vnode_ops::write_pages() to be called with fsReenter = true. Since
  this is no longer the case, the argument has become superfluous. For
  read_pages() it always was. Removed the argument from the functions
  and all functions that propagated it.
* Some whitespace at the end of lines was removed.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26579 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold
2008-07-23 15:47:47 +00:00
parent 4ed05c6869
commit e6bd90c58d
28 changed files with 151 additions and 166 deletions
+4 -5
View File
@@ -119,11 +119,10 @@ struct fs_vnode_ops {
/* VM file access */ /* VM file access */
bool (*can_page)(fs_volume *volume, fs_vnode *vnode, void *cookie); bool (*can_page)(fs_volume *volume, fs_vnode *vnode, void *cookie);
status_t (*read_pages)(fs_volume *volume, fs_vnode *vnode, void *cookie, status_t (*read_pages)(fs_volume *volume, fs_vnode *vnode, void *cookie,
off_t pos, const iovec *vecs, size_t count, size_t *_numBytes, off_t pos, const iovec *vecs, size_t count, size_t *_numBytes);
bool reenter);
status_t (*write_pages)(fs_volume *volume, fs_vnode *vnode, status_t (*write_pages)(fs_volume *volume, fs_vnode *vnode,
void *cookie, off_t pos, const iovec *vecs, size_t count, void *cookie, off_t pos, const iovec *vecs, size_t count,
size_t *_numBytes, bool reenter); size_t *_numBytes);
/* cache file access */ /* cache file access */
status_t (*get_file_map)(fs_volume *volume, fs_vnode *vnode, off_t offset, status_t (*get_file_map)(fs_volume *volume, fs_vnode *vnode, off_t offset,
@@ -299,9 +298,9 @@ extern status_t get_vnode_removed(fs_volume *volume, ino_t vnodeID,
bool *removed); bool *removed);
extern status_t read_pages(int fd, off_t pos, const struct iovec *vecs, extern status_t read_pages(int fd, off_t pos, const struct iovec *vecs,
size_t count, size_t *_numBytes, bool fsReenter); size_t count, size_t *_numBytes);
extern status_t write_pages(int fd, off_t pos, const struct iovec *vecs, extern status_t write_pages(int fd, off_t pos, const struct iovec *vecs,
size_t count, size_t *_numBytes, bool fsReenter); size_t count, size_t *_numBytes);
extern status_t read_file_io_vec_pages(int fd, extern status_t read_file_io_vec_pages(int fd,
const struct file_io_vec *fileVecs, size_t fileVecCount, const struct file_io_vec *fileVecs, size_t fileVecCount,
const struct iovec *vecs, size_t vecCount, const struct iovec *vecs, size_t vecCount,
+4 -4
View File
@@ -137,10 +137,10 @@ struct fssh_fs_vnode_ops {
fssh_fs_cookie cookie); fssh_fs_cookie cookie);
fssh_status_t (*read_pages)(fssh_fs_volume *volume, fssh_fs_vnode *vnode, fssh_status_t (*read_pages)(fssh_fs_volume *volume, fssh_fs_vnode *vnode,
fssh_fs_cookie cookie, fssh_off_t pos, const fssh_iovec *vecs, 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);
fssh_status_t (*write_pages)(fssh_fs_volume *volume, fssh_fs_vnode *vnode, fssh_status_t (*write_pages)(fssh_fs_volume *volume, fssh_fs_vnode *vnode,
fssh_fs_cookie cookie, fssh_off_t pos, const fssh_iovec *vecs, 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);
/* cache file access */ /* cache file access */
fssh_status_t (*get_file_map)(fssh_fs_volume *volume, fssh_fs_vnode *vnode, fssh_status_t (*get_file_map)(fssh_fs_volume *volume, fssh_fs_vnode *vnode,
@@ -339,10 +339,10 @@ extern fssh_status_t fssh_get_vnode_removed(fssh_fs_volume *volume,
extern fssh_status_t fssh_read_pages(int fd, fssh_off_t pos, extern fssh_status_t fssh_read_pages(int fd, fssh_off_t pos,
const struct fssh_iovec *vecs, fssh_size_t count, const struct fssh_iovec *vecs, fssh_size_t count,
fssh_size_t *_numBytes, bool fsReenter); fssh_size_t *_numBytes);
extern fssh_status_t fssh_write_pages(int fd, fssh_off_t pos, extern fssh_status_t fssh_write_pages(int fd, fssh_off_t pos,
const struct fssh_iovec *vecs, fssh_size_t count, const struct fssh_iovec *vecs, fssh_size_t count,
fssh_size_t *_numBytes, bool fsReenter); fssh_size_t *_numBytes);
extern fssh_status_t fssh_read_file_io_vec_pages(int fd, extern fssh_status_t fssh_read_file_io_vec_pages(int fd,
const struct fssh_file_io_vec *fileVecs, const struct fssh_file_io_vec *fileVecs,
fssh_size_t fileVecCount, const struct fssh_iovec *vecs, fssh_size_t fileVecCount, const struct fssh_iovec *vecs,
+2 -2
View File
@@ -94,9 +94,9 @@ void vfs_acquire_vnode(struct vnode *vnode);
status_t vfs_get_cookie_from_fd(int fd, void **_cookie); status_t vfs_get_cookie_from_fd(int fd, void **_cookie);
bool vfs_can_page(struct vnode *vnode, void *cookie); bool vfs_can_page(struct vnode *vnode, void *cookie);
status_t vfs_read_pages(struct vnode *vnode, void *cookie, off_t pos, status_t vfs_read_pages(struct vnode *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);
status_t vfs_write_pages(struct vnode *vnode, void *cookie, off_t pos, status_t vfs_write_pages(struct vnode *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);
status_t vfs_get_vnode_cache(struct vnode *vnode, struct VMCache **_cache, status_t vfs_get_vnode_cache(struct vnode *vnode, struct VMCache **_cache,
bool allocate); bool allocate);
status_t vfs_get_file_map(struct vnode *vnode, off_t offset, size_t size, status_t vfs_get_file_map(struct vnode *vnode, off_t offset, size_t size,
+2 -2
View File
@@ -36,8 +36,8 @@ size_t vm_page_num_free_pages(void);
size_t vm_page_num_available_pages(void); size_t vm_page_num_available_pages(void);
status_t vm_page_write_modified_page_range(struct VMCache *cache, status_t vm_page_write_modified_page_range(struct VMCache *cache,
uint32 firstPage, uint32 endPage, bool fsReenter); uint32 firstPage, uint32 endPage);
status_t vm_page_write_modified_pages(struct VMCache *cache, bool fsReenter); status_t vm_page_write_modified_pages(struct VMCache *cache);
void vm_page_schedule_write_page(struct vm_page *page); void vm_page_schedule_write_page(struct vm_page *page);
void vm_page_schedule_write_page_range(struct VMCache *cache, void vm_page_schedule_write_page_range(struct VMCache *cache,
uint32 firstPage, uint32 endPage); uint32 firstPage, uint32 endPage);
+3 -3
View File
@@ -202,7 +202,7 @@ public:
status_t InsertAreaLocked(vm_area* area); status_t InsertAreaLocked(vm_area* area);
status_t RemoveArea(vm_area* area); status_t RemoveArea(vm_area* area);
status_t WriteModified(bool fsReenter); status_t WriteModified();
status_t SetMinimalCommitment(off_t commitment); status_t SetMinimalCommitment(off_t commitment);
status_t Resize(off_t newSize); status_t Resize(off_t newSize);
@@ -217,9 +217,9 @@ public:
virtual bool HasPage(off_t offset); virtual bool HasPage(off_t offset);
virtual status_t Read(off_t offset, const iovec *vecs, size_t count, virtual status_t Read(off_t offset, const iovec *vecs, size_t count,
size_t *_numBytes, bool fsReenter); size_t *_numBytes);
virtual status_t Write(off_t offset, const iovec *vecs, size_t count, virtual status_t Write(off_t offset, const iovec *vecs, size_t count,
size_t *_numBytes, bool fsReenter); size_t *_numBytes);
virtual status_t Fault(struct vm_address_space *aspace, off_t offset); virtual status_t Fault(struct vm_address_space *aspace, off_t offset);
@@ -332,7 +332,7 @@ bfs_can_page(fs_volume *_volume, fs_vnode *_v, void *_cookie)
static status_t static status_t
bfs_read_pages(fs_volume *_volume, fs_vnode *_node, void *_cookie, bfs_read_pages(fs_volume *_volume, fs_vnode *_node, void *_cookie,
off_t pos, const iovec *vecs, size_t count, size_t *_numBytes, bool reenter) off_t pos, const iovec *vecs, size_t count, size_t *_numBytes)
{ {
Volume *volume = (Volume *)_volume->private_volume; Volume *volume = (Volume *)_volume->private_volume;
Inode *inode = (Inode *)_node->private_node; Inode *inode = (Inode *)_node->private_node;
@@ -340,8 +340,7 @@ bfs_read_pages(fs_volume *_volume, fs_vnode *_node, void *_cookie,
if (inode->FileCache() == NULL) if (inode->FileCache() == NULL)
RETURN_ERROR(B_BAD_VALUE); RETURN_ERROR(B_BAD_VALUE);
if (!reenter) rw_lock_read_lock(&inode->Lock());
rw_lock_read_lock(&inode->Lock());
uint32 vecIndex = 0; uint32 vecIndex = 0;
size_t vecOffset = 0; size_t vecOffset = 0;
@@ -369,8 +368,7 @@ bfs_read_pages(fs_volume *_volume, fs_vnode *_node, void *_cookie,
bytesLeft -= bytes; bytesLeft -= bytes;
} }
if (!reenter) rw_lock_read_unlock(&inode->Lock());
rw_lock_read_unlock(&inode->Lock());
return status; return status;
} }
@@ -378,7 +376,7 @@ bfs_read_pages(fs_volume *_volume, fs_vnode *_node, void *_cookie,
static status_t static status_t
bfs_write_pages(fs_volume *_volume, fs_vnode *_node, void *_cookie, bfs_write_pages(fs_volume *_volume, fs_vnode *_node, void *_cookie,
off_t pos, const iovec *vecs, size_t count, size_t *_numBytes, bool reenter) off_t pos, const iovec *vecs, size_t count, size_t *_numBytes)
{ {
Volume *volume = (Volume *)_volume->private_volume; Volume *volume = (Volume *)_volume->private_volume;
Inode *inode = (Inode *)_node->private_node; Inode *inode = (Inode *)_node->private_node;
@@ -389,8 +387,7 @@ bfs_write_pages(fs_volume *_volume, fs_vnode *_node, void *_cookie,
if (inode->FileCache() == NULL) if (inode->FileCache() == NULL)
RETURN_ERROR(B_BAD_VALUE); RETURN_ERROR(B_BAD_VALUE);
if (!reenter) rw_lock_read_lock(&inode->Lock());
rw_lock_read_lock(&inode->Lock());
uint32 vecIndex = 0; uint32 vecIndex = 0;
size_t vecOffset = 0; size_t vecOffset = 0;
@@ -418,8 +415,7 @@ bfs_write_pages(fs_volume *_volume, fs_vnode *_node, void *_cookie,
bytesLeft -= bytes; bytesLeft -= bytes;
} }
if (!reenter) rw_lock_read_unlock(&inode->Lock());
rw_lock_read_unlock(&inode->Lock());
return status; return status;
} }
@@ -1584,7 +1584,7 @@ cdda_can_page(fs_volume *_volume, fs_vnode *_node, void *cookie)
static status_t static status_t
cdda_read_pages(fs_volume *_volume, fs_vnode *_node, void *cookie, off_t pos, cdda_read_pages(fs_volume *_volume, fs_vnode *_node, void *cookie, off_t pos,
const iovec *vecs, size_t count, size_t *_numBytes, bool reenter) const iovec *vecs, size_t count, size_t *_numBytes)
{ {
return B_NOT_ALLOWED; return B_NOT_ALLOWED;
} }
@@ -1592,7 +1592,7 @@ cdda_read_pages(fs_volume *_volume, fs_vnode *_node, void *cookie, off_t pos,
static status_t static status_t
cdda_write_pages(fs_volume *_volume, fs_vnode *_node, void *cookie, off_t pos, cdda_write_pages(fs_volume *_volume, fs_vnode *_node, void *cookie, off_t pos,
const iovec *vecs, size_t count, size_t *_numBytes, bool reenter) const iovec *vecs, size_t count, size_t *_numBytes)
{ {
return B_NOT_ALLOWED; return B_NOT_ALLOWED;
} }
@@ -199,7 +199,7 @@ ext2_can_page(fs_volume* _volume, fs_vnode* _node, void* _cookie)
static status_t static status_t
ext2_read_pages(fs_volume* _volume, fs_vnode* _node, void* _cookie, ext2_read_pages(fs_volume* _volume, fs_vnode* _node, void* _cookie,
off_t pos, const iovec* vecs, size_t count, size_t* _numBytes, bool reenter) off_t pos, const iovec* vecs, size_t count, size_t* _numBytes)
{ {
Volume* volume = (Volume*)_volume->private_volume; Volume* volume = (Volume*)_volume->private_volume;
Inode* inode = (Inode*)_node->private_node; Inode* inode = (Inode*)_node->private_node;
@@ -207,8 +207,7 @@ ext2_read_pages(fs_volume* _volume, fs_vnode* _node, void* _cookie,
if (inode->FileCache() == NULL) if (inode->FileCache() == NULL)
return B_BAD_VALUE; return B_BAD_VALUE;
if (!reenter) rw_lock_read_lock(inode->Lock());
rw_lock_read_lock(inode->Lock());
uint32 vecIndex = 0; uint32 vecIndex = 0;
size_t vecOffset = 0; size_t vecOffset = 0;
@@ -236,8 +235,7 @@ ext2_read_pages(fs_volume* _volume, fs_vnode* _node, void* _cookie,
bytesLeft -= bytes; bytesLeft -= bytes;
} }
if (!reenter) rw_lock_read_unlock(inode->Lock());
rw_lock_read_unlock(inode->Lock());
return status; return status;
} }
@@ -392,7 +392,7 @@ fs_release_vnode(fs_volume *_vol, fs_vnode *_node, bool reenter)
static status_t static status_t
fs_read_pages(fs_volume *_vol, fs_vnode *_node, void * _cookie, off_t pos, fs_read_pages(fs_volume *_vol, fs_vnode *_node, void * _cookie, off_t pos,
const iovec *vecs, size_t count, size_t *_numBytes, bool reenter) const iovec *vecs, size_t count, size_t *_numBytes)
{ {
nspace *ns = (nspace *)_vol->private_volume; nspace *ns = (nspace *)_vol->private_volume;
vnode *node = (vnode *)_node->private_node; vnode *node = (vnode *)_node->private_node;
+8 -8
View File
@@ -211,7 +211,7 @@ read_into_cache(file_cache_ref *ref, void *cookie, off_t offset,
// read file into reserved pages // read file into reserved pages
status_t status = vfs_read_pages(ref->vnode, cookie, offset, vecs, status_t status = vfs_read_pages(ref->vnode, cookie, offset, vecs,
vecCount, &numBytes, false); vecCount, &numBytes);
if (status < B_OK) { if (status < B_OK) {
// reading failed, free allocated pages // reading failed, free allocated pages
@@ -294,7 +294,7 @@ read_from_file(file_cache_ref *ref, void *cookie, off_t offset,
vm_page_unreserve_pages(lastReservedPages); vm_page_unreserve_pages(lastReservedPages);
status_t status = vfs_read_pages(ref->vnode, cookie, offset + pageOffset, status_t status = vfs_read_pages(ref->vnode, cookie, offset + pageOffset,
&vec, 1, &bufferSize, false); &vec, 1, &bufferSize);
if (status == B_OK) if (status == B_OK)
reserve_pages(ref, reservePages, false); reserve_pages(ref, reservePages, false);
@@ -361,7 +361,7 @@ write_to_cache(file_cache_ref *ref, void *cookie, off_t offset,
size_t bytesRead = B_PAGE_SIZE; size_t bytesRead = B_PAGE_SIZE;
status = vfs_read_pages(ref->vnode, cookie, offset, &readVec, 1, status = vfs_read_pages(ref->vnode, cookie, offset, &readVec, 1,
&bytesRead, false); &bytesRead);
// ToDo: handle errors for real! // ToDo: handle errors for real!
if (status < B_OK) if (status < B_OK)
panic("1. vfs_read_pages() failed: %s!\n", strerror(status)); panic("1. vfs_read_pages() failed: %s!\n", strerror(status));
@@ -385,7 +385,7 @@ write_to_cache(file_cache_ref *ref, void *cookie, off_t offset,
status = vfs_read_pages(ref->vnode, cookie, status = vfs_read_pages(ref->vnode, cookie,
PAGE_ALIGN(offset + pageOffset + bufferSize) - B_PAGE_SIZE, PAGE_ALIGN(offset + pageOffset + bufferSize) - B_PAGE_SIZE,
&readVec, 1, &bytesRead, false); &readVec, 1, &bytesRead);
// ToDo: handle errors for real! // ToDo: handle errors for real!
if (status < B_OK) if (status < B_OK)
panic("vfs_read_pages() failed: %s!\n", strerror(status)); panic("vfs_read_pages() failed: %s!\n", strerror(status));
@@ -420,7 +420,7 @@ write_to_cache(file_cache_ref *ref, void *cookie, off_t offset,
if (writeThrough) { if (writeThrough) {
// write cached pages back to the file if we were asked to do that // write cached pages back to the file if we were asked to do that
status_t status = vfs_write_pages(ref->vnode, cookie, offset, vecs, status_t status = vfs_write_pages(ref->vnode, cookie, offset, vecs,
vecCount, &numBytes, false); vecCount, &numBytes);
if (status < B_OK) { if (status < B_OK) {
// ToDo: remove allocated pages, ...? // ToDo: remove allocated pages, ...?
panic("file_cache: remove allocated pages! write pages failed: %s\n", panic("file_cache: remove allocated pages! write pages failed: %s\n",
@@ -491,7 +491,7 @@ write_to_file(file_cache_ref *ref, void *cookie, off_t offset, int32 pageOffset,
chunkSize = bufferSize; chunkSize = bufferSize;
status = vfs_write_pages(ref->vnode, cookie, offset + pageOffset, status = vfs_write_pages(ref->vnode, cookie, offset + pageOffset,
&vec, 1, &chunkSize, false); &vec, 1, &chunkSize);
if (status < B_OK) if (status < B_OK)
break; break;
@@ -502,7 +502,7 @@ write_to_file(file_cache_ref *ref, void *cookie, off_t offset, int32 pageOffset,
free((void*)buffer); free((void*)buffer);
} else { } else {
status = vfs_write_pages(ref->vnode, cookie, offset + pageOffset, status = vfs_write_pages(ref->vnode, cookie, offset + pageOffset,
&vec, 1, &bufferSize, false); &vec, 1, &bufferSize);
} }
if (status == B_OK) if (status == B_OK)
@@ -958,7 +958,7 @@ file_cache_sync(void *_cacheRef)
if (ref == NULL) if (ref == NULL)
return B_BAD_VALUE; return B_BAD_VALUE;
return ref->cache->WriteModified(false); return ref->cache->WriteModified();
} }
+4 -5
View File
@@ -41,12 +41,12 @@ VMVnodeCache::HasPage(off_t offset)
status_t status_t
VMVnodeCache::Read(off_t offset, const iovec *vecs, size_t count, VMVnodeCache::Read(off_t offset, const iovec *vecs, size_t count,
size_t *_numBytes, bool fsReenter) size_t *_numBytes)
{ {
size_t bytesUntouched = *_numBytes; size_t bytesUntouched = *_numBytes;
status_t status = vfs_read_pages(fVnode, NULL, offset, vecs, count, status_t status = vfs_read_pages(fVnode, NULL, offset, vecs, count,
_numBytes, fsReenter); _numBytes);
bytesUntouched -= *_numBytes; bytesUntouched -= *_numBytes;
@@ -73,10 +73,9 @@ VMVnodeCache::Read(off_t offset, const iovec *vecs, size_t count,
status_t status_t
VMVnodeCache::Write(off_t offset, const iovec *vecs, size_t count, VMVnodeCache::Write(off_t offset, const iovec *vecs, size_t count,
size_t *_numBytes, bool fsReenter) size_t *_numBytes)
{ {
return vfs_write_pages(fVnode, NULL, offset, vecs, count, _numBytes, return vfs_write_pages(fVnode, NULL, offset, vecs, count, _numBytes);
fsReenter);
} }
+2 -2
View File
@@ -20,9 +20,9 @@ public:
virtual bool HasPage(off_t offset); virtual bool HasPage(off_t offset);
virtual status_t Read(off_t offset, const iovec *vecs, size_t count, virtual status_t Read(off_t offset, const iovec *vecs, size_t count,
size_t *_numBytes, bool fsReenter); size_t *_numBytes);
virtual status_t Write(off_t offset, const iovec *vecs, size_t count, virtual status_t Write(off_t offset, const iovec *vecs, size_t count,
size_t *_numBytes, bool fsReenter); size_t *_numBytes);
virtual status_t Fault(struct vm_address_space *aspace, off_t offset); virtual status_t Fault(struct vm_address_space *aspace, off_t offset);
+2 -2
View File
@@ -1593,7 +1593,7 @@ devfs_can_page(fs_volume *_volume, fs_vnode *_vnode, void *cookie)
static status_t static status_t
devfs_read_pages(fs_volume *_volume, fs_vnode *_vnode, void *_cookie, devfs_read_pages(fs_volume *_volume, fs_vnode *_vnode, void *_cookie,
off_t pos, const iovec *vecs, size_t count, size_t *_numBytes, bool reenter) off_t pos, const iovec *vecs, size_t count, size_t *_numBytes)
{ {
struct devfs_vnode *vnode = (devfs_vnode *)_vnode->private_node; struct devfs_vnode *vnode = (devfs_vnode *)_vnode->private_node;
struct devfs_cookie *cookie = (struct devfs_cookie *)_cookie; struct devfs_cookie *cookie = (struct devfs_cookie *)_cookie;
@@ -1651,7 +1651,7 @@ devfs_read_pages(fs_volume *_volume, fs_vnode *_vnode, void *_cookie,
static status_t static status_t
devfs_write_pages(fs_volume* _volume, fs_vnode* _vnode, void* _cookie, devfs_write_pages(fs_volume* _volume, fs_vnode* _vnode, void* _cookie,
off_t pos, const iovec* vecs, size_t count, size_t* _numBytes, bool reenter) off_t pos, const iovec* vecs, size_t count, size_t* _numBytes)
{ {
struct devfs_vnode *vnode = (devfs_vnode *)_vnode->private_node; struct devfs_vnode *vnode = (devfs_vnode *)_vnode->private_node;
struct devfs_cookie *cookie = (struct devfs_cookie *)_cookie; struct devfs_cookie *cookie = (struct devfs_cookie *)_cookie;
+2 -2
View File
@@ -935,7 +935,7 @@ fifo_can_page(fs_volume *_volume, fs_vnode *_v, void *cookie)
static status_t static status_t
fifo_read_pages(fs_volume *_volume, fs_vnode *_v, void *cookie, off_t pos, fifo_read_pages(fs_volume *_volume, fs_vnode *_v, void *cookie, off_t pos,
const iovec *vecs, size_t count, size_t *_numBytes, bool reenter) const iovec *vecs, size_t count, size_t *_numBytes)
{ {
return B_NOT_ALLOWED; return B_NOT_ALLOWED;
} }
@@ -943,7 +943,7 @@ fifo_read_pages(fs_volume *_volume, fs_vnode *_v, void *cookie, off_t pos,
static status_t static status_t
fifo_write_pages(fs_volume *_volume, fs_vnode *_v, void *cookie, fifo_write_pages(fs_volume *_volume, fs_vnode *_v, void *cookie,
off_t pos, const iovec *vecs, size_t count, size_t *_numBytes, bool reenter) off_t pos, const iovec *vecs, size_t count, size_t *_numBytes)
{ {
return B_NOT_ALLOWED; return B_NOT_ALLOWED;
} }
+2 -2
View File
@@ -813,7 +813,7 @@ rootfs_can_page(fs_volume *_volume, fs_vnode *_v, void *cookie)
static status_t static status_t
rootfs_read_pages(fs_volume *_volume, fs_vnode *_v, void *cookie, off_t pos, rootfs_read_pages(fs_volume *_volume, fs_vnode *_v, void *cookie, off_t pos,
const iovec *vecs, size_t count, size_t *_numBytes, bool reenter) const iovec *vecs, size_t count, size_t *_numBytes)
{ {
return B_NOT_ALLOWED; return B_NOT_ALLOWED;
} }
@@ -821,7 +821,7 @@ rootfs_read_pages(fs_volume *_volume, fs_vnode *_v, void *cookie, off_t pos,
static status_t static status_t
rootfs_write_pages(fs_volume *_volume, fs_vnode *_v, void *cookie, off_t pos, rootfs_write_pages(fs_volume *_volume, fs_vnode *_v, void *cookie, off_t pos,
const iovec *vecs, size_t count, size_t *_numBytes, bool reenter) const iovec *vecs, size_t count, size_t *_numBytes)
{ {
return B_NOT_ALLOWED; return B_NOT_ALLOWED;
} }
+13 -15
View File
@@ -1056,7 +1056,7 @@ vnode_low_resource_handler(void */*data*/, uint32 resources, int32 level)
mutex_unlock(&sVnodeMutex); mutex_unlock(&sVnodeMutex);
if (vnode->cache != NULL) if (vnode->cache != NULL)
vnode->cache->WriteModified(false); vnode->cache->WriteModified();
dec_vnode_ref_count(vnode, true, false); dec_vnode_ref_count(vnode, true, false);
// this should free the vnode when it's still unused // this should free the vnode when it's still unused
@@ -2912,7 +2912,7 @@ common_file_io_vec_pages(struct vnode *vnode, void *cookie,
size = numBytes; size = numBytes;
status = FS_CALL(vnode, read_pages, cookie, fileVecs[0].offset, status = FS_CALL(vnode, read_pages, cookie, fileVecs[0].offset,
&vecs[vecIndex], vecCount - vecIndex, &size, false); &vecs[vecIndex], vecCount - vecIndex, &size);
if (status < B_OK) if (status < B_OK)
return status; return status;
@@ -3007,10 +3007,10 @@ common_file_io_vec_pages(struct vnode *vnode, void *cookie,
size_t bytes = size; size_t bytes = size;
if (doWrite) { if (doWrite) {
status = FS_CALL(vnode, write_pages, cookie, fileOffset, status = FS_CALL(vnode, write_pages, cookie, fileOffset,
tempVecs, tempCount, &bytes, false); tempVecs, tempCount, &bytes);
} else { } else {
status = FS_CALL(vnode, read_pages, cookie, fileOffset, status = FS_CALL(vnode, read_pages, cookie, fileOffset,
tempVecs, tempCount, &bytes, false); tempVecs, tempCount, &bytes);
} }
if (status < B_OK) if (status < B_OK)
return status; return status;
@@ -3282,7 +3282,7 @@ get_vnode_removed(fs_volume *volume, ino_t vnodeID, bool* removed)
extern "C" status_t extern "C" status_t
read_pages(int fd, off_t pos, const iovec *vecs, size_t count, read_pages(int fd, off_t pos, const iovec *vecs, size_t count,
size_t *_numBytes, bool fsReenter) size_t *_numBytes)
{ {
struct file_descriptor *descriptor; struct file_descriptor *descriptor;
struct vnode *vnode; struct vnode *vnode;
@@ -3292,7 +3292,7 @@ read_pages(int fd, off_t pos, const iovec *vecs, size_t count,
return B_FILE_ERROR; return B_FILE_ERROR;
status_t status = FS_CALL(vnode, read_pages, descriptor->cookie, pos, vecs, status_t status = FS_CALL(vnode, read_pages, descriptor->cookie, pos, vecs,
count, _numBytes, fsReenter); count, _numBytes);
put_fd(descriptor); put_fd(descriptor);
return status; return status;
@@ -3301,7 +3301,7 @@ read_pages(int fd, off_t pos, const iovec *vecs, size_t count,
extern "C" status_t extern "C" status_t
write_pages(int fd, off_t pos, const iovec *vecs, size_t count, write_pages(int fd, off_t pos, const iovec *vecs, size_t count,
size_t *_numBytes, bool fsReenter) size_t *_numBytes)
{ {
struct file_descriptor *descriptor; struct file_descriptor *descriptor;
struct vnode *vnode; struct vnode *vnode;
@@ -3311,7 +3311,7 @@ write_pages(int fd, off_t pos, const iovec *vecs, size_t count,
return B_FILE_ERROR; return B_FILE_ERROR;
status_t status = FS_CALL(vnode, write_pages, descriptor->cookie, pos, vecs, status_t status = FS_CALL(vnode, write_pages, descriptor->cookie, pos, vecs,
count, _numBytes, fsReenter); count, _numBytes);
put_fd(descriptor); put_fd(descriptor);
return status; return status;
@@ -3888,23 +3888,21 @@ vfs_can_page(struct vnode *vnode, void *cookie)
extern "C" status_t extern "C" status_t
vfs_read_pages(struct vnode *vnode, void *cookie, off_t pos, const iovec *vecs, vfs_read_pages(struct vnode *vnode, void *cookie, off_t pos, const iovec *vecs,
size_t count, size_t *_numBytes, bool fsReenter) size_t count, size_t *_numBytes)
{ {
FUNCTION(("vfs_read_pages: vnode %p, vecs %p, pos %Ld\n", vnode, vecs, pos)); FUNCTION(("vfs_read_pages: vnode %p, vecs %p, pos %Ld\n", vnode, vecs, pos));
return FS_CALL(vnode, read_pages, cookie, pos, vecs, count, _numBytes, return FS_CALL(vnode, read_pages, cookie, pos, vecs, count, _numBytes);
fsReenter);
} }
extern "C" status_t extern "C" status_t
vfs_write_pages(struct vnode *vnode, void *cookie, off_t pos, const iovec *vecs, vfs_write_pages(struct vnode *vnode, void *cookie, off_t pos, const iovec *vecs,
size_t count, size_t *_numBytes, bool fsReenter) size_t count, size_t *_numBytes)
{ {
FUNCTION(("vfs_write_pages: vnode %p, vecs %p, pos %Ld\n", vnode, vecs, pos)); FUNCTION(("vfs_write_pages: vnode %p, vecs %p, pos %Ld\n", vnode, vecs, pos));
return FS_CALL(vnode, write_pages, cookie, pos, vecs, count, _numBytes, return FS_CALL(vnode, write_pages, cookie, pos, vecs, count, _numBytes);
fsReenter);
} }
@@ -6712,7 +6710,7 @@ fs_sync(dev_t device)
put_vnode(previousVnode); put_vnode(previousVnode);
if (vnode->cache != NULL) if (vnode->cache != NULL)
vnode->cache->WriteModified(false); vnode->cache->WriteModified();
// the next vnode might change until we lock the vnode list again, // the next vnode might change until we lock the vnode list again,
// but this vnode won't go away since we keep a reference to it. // but this vnode won't go away since we keep a reference to it.
+4 -4
View File
@@ -186,7 +186,7 @@ VMAnonymousCache::HasPage(off_t offset)
status_t status_t
VMAnonymousCache::Read(off_t offset, const iovec *vecs, size_t count, VMAnonymousCache::Read(off_t offset, const iovec *vecs, size_t count,
size_t *_numBytes, bool fsReenter) size_t *_numBytes)
{ {
off_t cacheOffset = offset >> PAGE_SHIFT; off_t cacheOffset = offset >> PAGE_SHIFT;
@@ -207,7 +207,7 @@ VMAnonymousCache::Read(off_t offset, const iovec *vecs, size_t count,
off_t pos = (startPageIndex - swapFile->first_page) * PAGE_SIZE; off_t pos = (startPageIndex - swapFile->first_page) * PAGE_SIZE;
status_t status = vfs_read_pages(swapFile->vnode, NULL, pos, vecs + i, status_t status = vfs_read_pages(swapFile->vnode, NULL, pos, vecs + i,
j - i, _numBytes, fsReenter); j - i, _numBytes);
if (status != B_OK) if (status != B_OK)
return status; return status;
} }
@@ -218,7 +218,7 @@ VMAnonymousCache::Read(off_t offset, const iovec *vecs, size_t count,
status_t status_t
VMAnonymousCache::Write(off_t offset, const iovec *vecs, size_t count, VMAnonymousCache::Write(off_t offset, const iovec *vecs, size_t count,
size_t *_numBytes, bool fsReenter) size_t *_numBytes)
{ {
offset >>= PAGE_SHIFT; offset >>= PAGE_SHIFT;
uint32 n = count; uint32 n = count;
@@ -243,7 +243,7 @@ VMAnonymousCache::Write(off_t offset, const iovec *vecs, size_t count,
off_t pos = (pageIndex - swapFile->first_page) * PAGE_SIZE; off_t pos = (pageIndex - swapFile->first_page) * PAGE_SIZE;
status_t status = vfs_write_pages(swapFile->vnode, NULL, pos, vecs + i , status_t status = vfs_write_pages(swapFile->vnode, NULL, pos, vecs + i ,
n, _numBytes, fsReenter); n, _numBytes);
if (status != B_OK) if (status != B_OK)
return status; return status;
} }
+2 -2
View File
@@ -26,9 +26,9 @@ public:
virtual bool HasPage(off_t offset); virtual bool HasPage(off_t offset);
virtual status_t Read(off_t offset, const iovec *vecs, size_t count, virtual status_t Read(off_t offset, const iovec *vecs, size_t count,
size_t *_numBytes, bool fsReenter); size_t *_numBytes);
virtual status_t Write(off_t offset, const iovec *vecs, size_t count, virtual status_t Write(off_t offset, const iovec *vecs, size_t count,
size_t *_numBytes, bool fsReenter); size_t *_numBytes);
virtual status_t Fault(struct vm_address_space *aspace, off_t offset); virtual status_t Fault(struct vm_address_space *aspace, off_t offset);
@@ -96,7 +96,7 @@ VMAnonymousNoSwapCache::HasPage(off_t offset)
status_t status_t
VMAnonymousNoSwapCache::Read(off_t offset, const iovec *vecs, size_t count, VMAnonymousNoSwapCache::Read(off_t offset, const iovec *vecs, size_t count,
size_t *_numBytes, bool fsReenter) size_t *_numBytes)
{ {
panic("anonymous_store: read called. Invalid!\n"); panic("anonymous_store: read called. Invalid!\n");
return B_ERROR; return B_ERROR;
@@ -105,7 +105,7 @@ VMAnonymousNoSwapCache::Read(off_t offset, const iovec *vecs, size_t count,
status_t status_t
VMAnonymousNoSwapCache::Write(off_t offset, const iovec *vecs, size_t count, VMAnonymousNoSwapCache::Write(off_t offset, const iovec *vecs, size_t count,
size_t *_numBytes, bool fsReenter) size_t *_numBytes)
{ {
// no place to write, this will cause the page daemon to skip this store // no place to write, this will cause the page daemon to skip this store
return B_ERROR; return B_ERROR;
@@ -23,9 +23,9 @@ public:
virtual bool HasPage(off_t offset); virtual bool HasPage(off_t offset);
virtual status_t Read(off_t offset, const iovec *vecs, size_t count, virtual status_t Read(off_t offset, const iovec *vecs, size_t count,
size_t *_numBytes, bool fsReenter); size_t *_numBytes);
virtual status_t Write(off_t offset, const iovec *vecs, size_t count, virtual status_t Write(off_t offset, const iovec *vecs, size_t count,
size_t *_numBytes, bool fsReenter); size_t *_numBytes);
virtual status_t Fault(struct vm_address_space *aspace, off_t offset); virtual status_t Fault(struct vm_address_space *aspace, off_t offset);
+2 -2
View File
@@ -27,7 +27,7 @@ VMDeviceCache::HasPage(off_t offset)
status_t status_t
VMDeviceCache::Read(off_t offset, const iovec *vecs, size_t count, VMDeviceCache::Read(off_t offset, const iovec *vecs, size_t count,
size_t *_numBytes, bool fsReenter) size_t *_numBytes)
{ {
panic("device_store: read called. Invalid!\n"); panic("device_store: read called. Invalid!\n");
return B_ERROR; return B_ERROR;
@@ -36,7 +36,7 @@ VMDeviceCache::Read(off_t offset, const iovec *vecs, size_t count,
status_t status_t
VMDeviceCache::Write(off_t offset, const iovec *vecs, size_t count, VMDeviceCache::Write(off_t offset, const iovec *vecs, size_t count,
size_t *_numBytes, bool fsReenter) size_t *_numBytes)
{ {
// no place to write, this will cause the page daemon to skip this store // no place to write, this will cause the page daemon to skip this store
return B_OK; return B_OK;
+2 -2
View File
@@ -19,9 +19,9 @@ public:
virtual bool HasPage(off_t offset); virtual bool HasPage(off_t offset);
virtual status_t Read(off_t offset, const iovec *vecs, size_t count, virtual status_t Read(off_t offset, const iovec *vecs, size_t count,
size_t *_numBytes, bool fsReenter); size_t *_numBytes);
virtual status_t Write(off_t offset, const iovec *vecs, size_t count, virtual status_t Write(off_t offset, const iovec *vecs, size_t count,
size_t *_numBytes, bool fsReenter); size_t *_numBytes);
private: private:
addr_t fBaseAddress; addr_t fBaseAddress;
+3 -4
View File
@@ -2249,7 +2249,7 @@ delete_area(vm_address_space *addressSpace, vm_area *area)
vm_unmap_pages(area, area->base, area->size, !area->cache->temporary); vm_unmap_pages(area, area->base, area->size, !area->cache->temporary);
if (!area->cache->temporary) if (!area->cache->temporary)
area->cache->WriteModified(false); area->cache->WriteModified();
arch_vm_unset_memory_type(area); arch_vm_unset_memory_type(area);
remove_area_from_address_space(addressSpace, area); remove_area_from_address_space(addressSpace, area);
@@ -4195,8 +4195,7 @@ fault_find_page(vm_translation_map *map, vm_cache *topCache,
size_t bytesRead = vec.iov_len = B_PAGE_SIZE; size_t bytesRead = vec.iov_len = B_PAGE_SIZE;
// read it in // read it in
status_t status = cache->Read(cacheOffset, &vec, 1, &bytesRead, status_t status = cache->Read(cacheOffset, &vec, 1, &bytesRead);
false);
map->ops->put_physical_page((addr_t)vec.iov_base); map->ops->put_physical_page((addr_t)vec.iov_base);
@@ -5759,7 +5758,7 @@ _user_sync_memory(void *_address, addr_t size, int flags)
if (writeSync) { if (writeSync) {
// synchronous // synchronous
error = vm_page_write_modified_page_range(cache, firstPage, error = vm_page_write_modified_page_range(cache, firstPage,
endPage, false); endPage);
if (error != B_OK) if (error != B_OK)
return error; return error;
} else { } else {
+4 -6
View File
@@ -688,7 +688,7 @@ VMCache::RemoveArea(vm_area* area)
status_t status_t
VMCache::WriteModified(bool fsReenter) VMCache::WriteModified()
{ {
TRACE(("VMCache::WriteModified(cache = %p)\n", this)); TRACE(("VMCache::WriteModified(cache = %p)\n", this));
@@ -696,7 +696,7 @@ VMCache::WriteModified(bool fsReenter)
return B_OK; return B_OK;
Lock(); Lock();
status_t status = vm_page_write_modified_pages(this, fsReenter); status_t status = vm_page_write_modified_pages(this);
Unlock(); Unlock();
return status; return status;
@@ -813,16 +813,14 @@ VMCache::HasPage(off_t offset)
status_t status_t
VMCache::Read(off_t offset, const iovec *vecs, size_t count, size_t *_numBytes, VMCache::Read(off_t offset, const iovec *vecs, size_t count, size_t *_numBytes)
bool fsReenter)
{ {
return B_ERROR; return B_ERROR;
} }
status_t status_t
VMCache::Write(off_t offset, const iovec *vecs, size_t count, VMCache::Write(off_t offset, const iovec *vecs, size_t count, size_t *_numBytes)
size_t *_numBytes, bool fsReenter)
{ {
return B_ERROR; return B_ERROR;
} }
+7 -7
View File
@@ -844,7 +844,7 @@ page_scrubber(void *unused)
static status_t static status_t
write_page(vm_page *page, bool fsReenter) write_page(vm_page *page)
{ {
size_t length = B_PAGE_SIZE; size_t length = B_PAGE_SIZE;
status_t status; status_t status;
@@ -859,7 +859,7 @@ write_page(vm_page *page, bool fsReenter)
vecs->iov_len = B_PAGE_SIZE; vecs->iov_len = B_PAGE_SIZE;
status = page->cache->Write((off_t)page->cache_offset << PAGE_SHIFT, status = page->cache->Write((off_t)page->cache_offset << PAGE_SHIFT,
vecs, 1, &length, fsReenter); vecs, 1, &length);
vm_put_physical_page((addr_t)vecs[0].iov_base); vm_put_physical_page((addr_t)vecs[0].iov_base);
#if 0 #if 0
@@ -1035,7 +1035,7 @@ page_writer(void* /*unused*/)
// TODO: put this as requests into the I/O scheduler // TODO: put this as requests into the I/O scheduler
status_t writeStatus[kNumPages]; status_t writeStatus[kNumPages];
for (uint32 i = 0; i < numPages; i++) { for (uint32 i = 0; i < numPages; i++) {
writeStatus[i] = write_page(u.pages[i], false); writeStatus[i] = write_page(u.pages[i]);
} }
// mark pages depending on whether they could be written or not // mark pages depending on whether they could be written or not
@@ -1280,7 +1280,7 @@ steal_pages(vm_page **pages, size_t count, bool reserve)
*/ */
status_t status_t
vm_page_write_modified_page_range(struct VMCache *cache, uint32 firstPage, vm_page_write_modified_page_range(struct VMCache *cache, uint32 firstPage,
uint32 endPage, bool fsReenter) uint32 endPage)
{ {
// TODO: join adjacent pages into one vec list // TODO: join adjacent pages into one vec list
@@ -1321,7 +1321,7 @@ vm_page_write_modified_page_range(struct VMCache *cache, uint32 firstPage,
vm_clear_map_flags(page, PAGE_MODIFIED); vm_clear_map_flags(page, PAGE_MODIFIED);
cache->Unlock(); cache->Unlock();
status_t status = write_page(page, fsReenter); status_t status = write_page(page);
cache->Lock(); cache->Lock();
InterruptsSpinLocker locker(&sPageLock); InterruptsSpinLocker locker(&sPageLock);
@@ -1361,10 +1361,10 @@ vm_page_write_modified_page_range(struct VMCache *cache, uint32 firstPage,
Note that the cache lock is released in this function. Note that the cache lock is released in this function.
*/ */
status_t status_t
vm_page_write_modified_pages(vm_cache *cache, bool fsReenter) vm_page_write_modified_pages(vm_cache *cache)
{ {
return vm_page_write_modified_page_range(cache, 0, return vm_page_write_modified_page_range(cache, 0,
(cache->virtual_end + B_PAGE_SIZE - 1) >> PAGE_SHIFT, fsReenter); (cache->virtual_end + B_PAGE_SIZE - 1) >> PAGE_SHIFT);
} }
+2 -2
View File
@@ -90,7 +90,7 @@ read_from_file(file_cache_ref *ref, void *cookie, fssh_off_t offset,
fssh_mutex_unlock(&ref->lock); fssh_mutex_unlock(&ref->lock);
fssh_status_t status = vfs_read_pages(ref->node, cookie, fssh_status_t status = vfs_read_pages(ref->node, cookie,
offset + pageOffset, &vec, 1, &bufferSize, false); offset + pageOffset, &vec, 1, &bufferSize);
fssh_mutex_lock(&ref->lock); fssh_mutex_lock(&ref->lock);
@@ -109,7 +109,7 @@ write_to_file(file_cache_ref *ref, void *cookie, fssh_off_t offset,
fssh_mutex_unlock(&ref->lock); fssh_mutex_unlock(&ref->lock);
fssh_status_t status = vfs_write_pages(ref->node, cookie, fssh_status_t status = vfs_write_pages(ref->node, cookie,
offset + pageOffset, &vec, 1, &bufferSize, false); offset + pageOffset, &vec, 1, &bufferSize);
fssh_mutex_lock(&ref->lock); fssh_mutex_lock(&ref->lock);
+9 -11
View File
@@ -1760,7 +1760,7 @@ common_file_io_vec_pages(int fd, const fssh_file_io_vec *fileVecs,
size = numBytes; size = numBytes;
status = fssh_read_pages(fd, fileVecs[0].offset, &vecs[vecIndex], status = fssh_read_pages(fd, fileVecs[0].offset, &vecs[vecIndex],
vecCount - vecIndex, &size, false); vecCount - vecIndex, &size);
if (status < FSSH_B_OK) if (status < FSSH_B_OK)
return status; return status;
@@ -1855,10 +1855,10 @@ common_file_io_vec_pages(int fd, const fssh_file_io_vec *fileVecs,
fssh_size_t bytes = size; fssh_size_t bytes = size;
if (doWrite) { if (doWrite) {
status = fssh_write_pages(fd, fileOffset, tempVecs, status = fssh_write_pages(fd, fileOffset, tempVecs,
tempCount, &bytes, false); tempCount, &bytes);
} else { } else {
status = fssh_read_pages(fd, fileOffset, tempVecs, status = fssh_read_pages(fd, fileOffset, tempVecs,
tempCount, &bytes, false); tempCount, &bytes);
} }
if (status < FSSH_B_OK) if (status < FSSH_B_OK)
return status; return status;
@@ -2108,7 +2108,7 @@ fssh_get_vnode_removed(fssh_fs_volume *volume, fssh_vnode_id vnodeID, bool* remo
//! Works directly on the host's file system //! Works directly on the host's file system
extern "C" fssh_status_t extern "C" fssh_status_t
fssh_read_pages(int fd, fssh_off_t pos, const fssh_iovec *vecs, fssh_read_pages(int fd, fssh_off_t pos, const fssh_iovec *vecs,
fssh_size_t count, fssh_size_t *_numBytes, bool fsReenter) fssh_size_t count, fssh_size_t *_numBytes)
{ {
// check how much the iovecs allow us to read // check how much the iovecs allow us to read
fssh_size_t toRead = 0; fssh_size_t toRead = 0;
@@ -2149,7 +2149,7 @@ fssh_read_pages(int fd, fssh_off_t pos, const fssh_iovec *vecs,
//! Works directly on the host's file system //! Works directly on the host's file system
extern "C" fssh_status_t extern "C" fssh_status_t
fssh_write_pages(int fd, fssh_off_t pos, const fssh_iovec *vecs, fssh_write_pages(int fd, fssh_off_t pos, const fssh_iovec *vecs,
fssh_size_t count, fssh_size_t *_numBytes, bool fsReenter) fssh_size_t count, fssh_size_t *_numBytes)
{ {
// check how much the iovecs allow us to write // check how much the iovecs allow us to write
fssh_size_t toWrite = 0; fssh_size_t toWrite = 0;
@@ -2296,25 +2296,23 @@ vfs_get_vnode(fssh_mount_id mountID, fssh_vnode_id vnodeID, void **_vnode)
fssh_status_t fssh_status_t
vfs_read_pages(void *_vnode, void *cookie, fssh_off_t pos, vfs_read_pages(void *_vnode, void *cookie, fssh_off_t pos,
const fssh_iovec *vecs, fssh_size_t count, fssh_size_t *_numBytes, const fssh_iovec *vecs, fssh_size_t count, fssh_size_t *_numBytes)
bool fsReenter)
{ {
struct vnode *vnode = (struct vnode *)_vnode; struct vnode *vnode = (struct vnode *)_vnode;
return FS_CALL(vnode, read_pages, return FS_CALL(vnode, read_pages,
cookie, pos, vecs, count, _numBytes, fsReenter); cookie, pos, vecs, count, _numBytes);
} }
fssh_status_t fssh_status_t
vfs_write_pages(void *_vnode, void *cookie, fssh_off_t pos, vfs_write_pages(void *_vnode, void *cookie, fssh_off_t pos,
const fssh_iovec *vecs, fssh_size_t count, fssh_size_t *_numBytes, const fssh_iovec *vecs, fssh_size_t count, fssh_size_t *_numBytes)
bool fsReenter)
{ {
struct vnode *vnode = (struct vnode *)_vnode; struct vnode *vnode = (struct vnode *)_vnode;
return FS_CALL(vnode, write_pages, return FS_CALL(vnode, write_pages,
cookie, pos, vecs, count, _numBytes, fsReenter); cookie, pos, vecs, count, _numBytes);
} }
+2 -2
View File
@@ -75,10 +75,10 @@ void vfs_acquire_vnode(void *vnode);
fssh_status_t vfs_get_cookie_from_fd(int fd, void **_cookie); fssh_status_t vfs_get_cookie_from_fd(int fd, void **_cookie);
fssh_status_t vfs_read_pages(void *vnode, void *cookie, fssh_off_t pos, fssh_status_t vfs_read_pages(void *vnode, void *cookie, fssh_off_t pos,
const fssh_iovec *vecs, fssh_size_t count, const fssh_iovec *vecs, fssh_size_t count,
fssh_size_t *_numBytes, bool fsReenter); fssh_size_t *_numBytes);
fssh_status_t vfs_write_pages(void *vnode, void *cookie, fssh_status_t vfs_write_pages(void *vnode, void *cookie,
fssh_off_t pos, const fssh_iovec *vecs, fssh_size_t count, fssh_off_t pos, const fssh_iovec *vecs, fssh_size_t count,
fssh_size_t *_numBytes, bool fsReenter); fssh_size_t *_numBytes);
fssh_status_t vfs_get_file_map(void *_vnode, fssh_off_t offset, fssh_status_t vfs_get_file_map(void *_vnode, fssh_off_t offset,
fssh_size_t size, fssh_file_io_vec *vecs, fssh_size_t size, fssh_file_io_vec *vecs,
fssh_size_t *_count); fssh_size_t *_count);