Forgot to commit the fs_shell with r22434, thanks for the note, Stefano!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22435 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -179,9 +179,9 @@ static fssh_status_t vm_cache_resize(file_cache_ref *cacheRef, fssh_off_t newSiz
|
|||||||
static fssh_status_t vm_cache_write_modified(file_cache_ref *ref, bool fsReenter);
|
static fssh_status_t vm_cache_write_modified(file_cache_ref *ref, bool fsReenter);
|
||||||
|
|
||||||
static fssh_status_t vfs_read_pages(int fd, fssh_off_t pos, const fssh_iovec *vecs,
|
static fssh_status_t vfs_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, bool mayBlock, bool fsReenter);
|
||||||
static fssh_status_t vfs_write_pages(int fd, fssh_off_t pos, const fssh_iovec *vecs,
|
static fssh_status_t vfs_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, bool mayBlock, bool fsReenter);
|
||||||
|
|
||||||
static fssh_status_t pages_io(file_cache_ref *ref, fssh_off_t offset, const fssh_iovec *vecs,
|
static fssh_status_t pages_io(file_cache_ref *ref, fssh_off_t offset, const fssh_iovec *vecs,
|
||||||
fssh_size_t count, fssh_size_t *_numBytes, bool doWrite);
|
fssh_size_t count, fssh_size_t *_numBytes, bool doWrite);
|
||||||
@@ -741,7 +741,7 @@ vm_cache_write_modified(file_cache_ref *cache, bool fsReenter)
|
|||||||
|
|
||||||
fssh_status_t
|
fssh_status_t
|
||||||
vfs_read_pages(int fd, fssh_off_t pos, const fssh_iovec *vecs, fssh_size_t count,
|
vfs_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 *_numBytes, bool mayBlock, bool fsReenter)
|
||||||
{
|
{
|
||||||
// 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;
|
||||||
@@ -781,7 +781,7 @@ vfs_read_pages(int fd, fssh_off_t pos, const fssh_iovec *vecs, fssh_size_t count
|
|||||||
|
|
||||||
fssh_status_t
|
fssh_status_t
|
||||||
vfs_write_pages(int fd, fssh_off_t pos, const fssh_iovec *vecs, fssh_size_t count,
|
vfs_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 *_numBytes, bool mayBlock, bool fsReenter)
|
||||||
{
|
{
|
||||||
// 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;
|
||||||
@@ -1122,7 +1122,7 @@ pages_io(file_cache_ref *ref, fssh_off_t offset, const fssh_iovec *vecs, fssh_si
|
|||||||
size = numBytes;
|
size = numBytes;
|
||||||
|
|
||||||
status = vfs_read_pages(ref->deviceFD, fileVecs[0].offset, vecs,
|
status = vfs_read_pages(ref->deviceFD, fileVecs[0].offset, vecs,
|
||||||
count, &size, false);
|
count, &size, true, false);
|
||||||
if (status < FSSH_B_OK)
|
if (status < FSSH_B_OK)
|
||||||
return status;
|
return status;
|
||||||
|
|
||||||
@@ -1219,10 +1219,10 @@ pages_io(file_cache_ref *ref, fssh_off_t offset, const fssh_iovec *vecs, fssh_si
|
|||||||
fssh_size_t bytes = size;
|
fssh_size_t bytes = size;
|
||||||
if (doWrite) {
|
if (doWrite) {
|
||||||
status = vfs_write_pages(ref->deviceFD, fileOffset,
|
status = vfs_write_pages(ref->deviceFD, fileOffset,
|
||||||
tempVecs, tempCount, &bytes, false);
|
tempVecs, tempCount, &bytes, true, false);
|
||||||
} else {
|
} else {
|
||||||
status = vfs_read_pages(ref->deviceFD, fileOffset,
|
status = vfs_read_pages(ref->deviceFD, fileOffset,
|
||||||
tempVecs, tempCount, &bytes, false);
|
tempVecs, tempCount, &bytes, true, false);
|
||||||
}
|
}
|
||||||
if (status < FSSH_B_OK)
|
if (status < FSSH_B_OK)
|
||||||
return status;
|
return status;
|
||||||
|
|||||||
@@ -772,16 +772,18 @@ rootfs_can_page(fssh_fs_volume _fs, fssh_fs_vnode _v, fssh_fs_cookie cookie)
|
|||||||
|
|
||||||
|
|
||||||
static fssh_status_t
|
static fssh_status_t
|
||||||
rootfs_read_pages(fssh_fs_volume _fs, fssh_fs_vnode _v, fssh_fs_cookie cookie, fssh_off_t pos,
|
rootfs_read_pages(fssh_fs_volume _fs, fssh_fs_vnode _v, fssh_fs_cookie cookie,
|
||||||
const fssh_iovec *vecs, fssh_size_t count, fssh_size_t *_numBytes, bool reenter)
|
fssh_off_t pos, const fssh_iovec *vecs, fssh_size_t count,
|
||||||
|
fssh_size_t *_numBytes, bool mayBlock, bool reenter)
|
||||||
{
|
{
|
||||||
return FSSH_B_NOT_ALLOWED;
|
return FSSH_B_NOT_ALLOWED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static fssh_status_t
|
static fssh_status_t
|
||||||
rootfs_write_pages(fssh_fs_volume _fs, fssh_fs_vnode _v, fssh_fs_cookie cookie, fssh_off_t pos,
|
rootfs_write_pages(fssh_fs_volume _fs, fssh_fs_vnode _v, fssh_fs_cookie cookie,
|
||||||
const fssh_iovec *vecs, fssh_size_t count, fssh_size_t *_numBytes, bool reenter)
|
fssh_off_t pos, const fssh_iovec *vecs, fssh_size_t count,
|
||||||
|
fssh_size_t *_numBytes, bool mayBlock, bool reenter)
|
||||||
{
|
{
|
||||||
return FSSH_B_NOT_ALLOWED;
|
return FSSH_B_NOT_ALLOWED;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user