Got rid of vnode_id and mount_id, replaced with ino_t and dev_t.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21485 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2004-2005, Axel Dörfler, [email protected].
|
||||
* Copyright 2004-2007, Axel Dörfler, [email protected].
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
#ifndef _KERNEL_FILE_CACHE_H
|
||||
@@ -26,9 +26,9 @@
|
||||
struct cache_module_info {
|
||||
module_info info;
|
||||
|
||||
void (*node_opened)(void *vnode, int32 fdType, mount_id mountID, vnode_id parentID,
|
||||
vnode_id vnodeID, const char *name, off_t size);
|
||||
void (*node_closed)(void *vnode, int32 fdType, mount_id mountID, vnode_id vnodeID,
|
||||
void (*node_opened)(void *vnode, int32 fdType, dev_t mountID, ino_t parentID,
|
||||
ino_t vnodeID, const char *name, off_t size);
|
||||
void (*node_closed)(void *vnode, int32 fdType, dev_t mountID, ino_t vnodeID,
|
||||
int32 accessType);
|
||||
void (*node_launched)(size_t argCount, char * const *args);
|
||||
};
|
||||
@@ -38,12 +38,12 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
extern void cache_node_opened(void *vnode, int32 fdType, vm_cache_ref *cache,
|
||||
mount_id mountID, vnode_id parentID, vnode_id vnodeID, const char *name);
|
||||
dev_t mountID, ino_t parentID, ino_t vnodeID, const char *name);
|
||||
extern void cache_node_closed(void *vnode, int32 fdType, vm_cache_ref *cache,
|
||||
mount_id mountID, vnode_id vnodeID);
|
||||
dev_t mountID, ino_t vnodeID);
|
||||
extern void cache_node_launched(size_t argCount, char * const *args);
|
||||
extern void cache_prefetch_vnode(void *vnode, off_t offset, size_t size);
|
||||
extern void cache_prefetch(mount_id mountID, vnode_id vnodeID, off_t offset, size_t size);
|
||||
extern void cache_prefetch(dev_t mountID, ino_t vnodeID, off_t offset, size_t size);
|
||||
extern status_t file_cache_init_post_boot_device(void);
|
||||
extern status_t file_cache_init(void);
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2003-2006, Axel Dörfler, [email protected]. All rights reserved.
|
||||
* Copyright 2003-2007, Axel Dörfler, [email protected]. All rights reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
#ifndef _KERNEL_NODE_MONITOR_H
|
||||
@@ -18,9 +18,9 @@ extern "C" {
|
||||
// private kernel API
|
||||
extern status_t remove_node_monitors(struct io_context *context);
|
||||
extern status_t node_monitor_init(void);
|
||||
extern status_t notify_unmount(mount_id device);
|
||||
extern status_t notify_mount(mount_id device, mount_id parentDevice,
|
||||
vnode_id parentDirectory);
|
||||
extern status_t notify_unmount(dev_t device);
|
||||
extern status_t notify_mount(dev_t device, dev_t parentDevice,
|
||||
ino_t parentDirectory);
|
||||
|
||||
// user-space exported calls
|
||||
extern status_t _user_stop_notifying(port_id port, uint32 token);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2006, Axel Dörfler, [email protected]. All rights reserved.
|
||||
* Copyright 2002-2007, Axel Dörfler, [email protected]. All rights reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*
|
||||
* Copyright 2001-2002, Travis Geiselbrecht. All rights reserved.
|
||||
@@ -21,10 +21,9 @@
|
||||
#include <sys/select.h>
|
||||
|
||||
|
||||
/* R5 figures, but we don't use a table for monitors anyway */
|
||||
#define DEFAULT_FD_TABLE_SIZE 128
|
||||
#define DEFAULT_FD_TABLE_SIZE 256
|
||||
#define MAX_FD_TABLE_SIZE 8192
|
||||
#define DEFAULT_NODE_MONITORS 4096
|
||||
#define DEFAULT_NODE_MONITORS 4096
|
||||
#define MAX_NODE_MONITORS 65536
|
||||
|
||||
struct kernel_args;
|
||||
@@ -78,12 +77,12 @@ int vfs_setrlimit(int resource, const struct rlimit * rlp);
|
||||
/* calls needed by the VM for paging and by the file cache */
|
||||
int vfs_get_vnode_from_fd(int fd, bool kernel, void **vnode);
|
||||
status_t vfs_get_vnode_from_path(const char *path, bool kernel, void **vnode);
|
||||
status_t vfs_get_vnode(mount_id mountID, vnode_id vnodeID, void **_vnode);
|
||||
status_t vfs_entry_ref_to_vnode(mount_id mountID, vnode_id directoryID,
|
||||
status_t vfs_get_vnode(dev_t mountID, ino_t vnodeID, void **_vnode);
|
||||
status_t vfs_entry_ref_to_vnode(dev_t mountID, ino_t directoryID,
|
||||
const char *name, void **_vnode);
|
||||
void vfs_vnode_to_node_ref(void *_vnode, mount_id *_mountID, vnode_id *_vnodeID);
|
||||
void vfs_vnode_to_node_ref(void *_vnode, dev_t *_mountID, ino_t *_vnodeID);
|
||||
|
||||
status_t vfs_lookup_vnode(mount_id mountID, vnode_id vnodeID, void **_vnode);
|
||||
status_t vfs_lookup_vnode(dev_t mountID, ino_t vnodeID, void **_vnode);
|
||||
void vfs_put_vnode(void *vnode);
|
||||
void vfs_acquire_vnode(void *vnode);
|
||||
status_t vfs_get_cookie_from_fd(int fd, void **_cookie);
|
||||
@@ -95,13 +94,13 @@ status_t vfs_write_pages(void *vnode, void *cookie, off_t pos,
|
||||
status_t vfs_get_vnode_cache(void *vnode, struct vm_cache_ref **_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(mount_id mountID, const char *path,
|
||||
status_t vfs_get_fs_node_from_path(dev_t mountID, const char *path,
|
||||
bool kernel, void **_node);
|
||||
status_t vfs_stat_vnode(void *_vnode, struct stat *stat);
|
||||
status_t vfs_get_vnode_name(void *vnode, char *name, size_t nameSize);
|
||||
status_t vfs_get_cwd(mount_id *_mountID, vnode_id *_vnodeID);
|
||||
status_t vfs_get_cwd(dev_t *_mountID, ino_t *_vnodeID);
|
||||
void vfs_unlock_vnode_if_locked(struct file_descriptor *descriptor);
|
||||
status_t vfs_disconnect_vnode(mount_id mountID, vnode_id vnodeID);
|
||||
status_t vfs_disconnect_vnode(dev_t mountID, ino_t vnodeID);
|
||||
void vfs_free_unused_vnodes(int32 level);
|
||||
|
||||
/* special module convenience call */
|
||||
@@ -113,8 +112,8 @@ status_t vfs_normalize_path(const char *path, char *buffer, size_t bufferSize,
|
||||
bool kernel);
|
||||
|
||||
/* service call for the node monitor */
|
||||
status_t resolve_mount_point_to_volume_root(mount_id mountID, vnode_id nodeID,
|
||||
mount_id *resolvedMountID, vnode_id *resolvedNodeID);
|
||||
status_t resolve_mount_point_to_volume_root(dev_t mountID, ino_t nodeID,
|
||||
dev_t *resolvedMountID, ino_t *resolvedNodeID);
|
||||
|
||||
/* calls the syscall dispatcher should use for user file I/O */
|
||||
dev_t _user_mount(const char *path, const char *device, const char *fs_name,
|
||||
|
||||
@@ -326,7 +326,7 @@ public:
|
||||
MountVolumeRequest() : Request(MOUNT_VOLUME_REQUEST) {}
|
||||
status_t GetAddressInfos(AddressInfo* infos, int32* count);
|
||||
|
||||
mount_id nsid;
|
||||
dev_t nsid;
|
||||
Address cwd; // current working dir of the mount() caller
|
||||
Address device;
|
||||
uint32 flags;
|
||||
@@ -338,7 +338,7 @@ class MountVolumeReply : public ReplyRequest {
|
||||
public:
|
||||
MountVolumeReply() : ReplyRequest(MOUNT_VOLUME_REPLY) {}
|
||||
|
||||
vnode_id rootID;
|
||||
ino_t rootID;
|
||||
fs_volume volume;
|
||||
};
|
||||
|
||||
@@ -430,7 +430,7 @@ class LookupReply : public ReplyRequest {
|
||||
public:
|
||||
LookupReply() : ReplyRequest(LOOKUP_REPLY) {}
|
||||
|
||||
vnode_id vnid;
|
||||
ino_t vnid;
|
||||
int type;
|
||||
};
|
||||
|
||||
@@ -456,7 +456,7 @@ class ReadVNodeRequest : public VolumeRequest {
|
||||
public:
|
||||
ReadVNodeRequest() : VolumeRequest(READ_VNODE_REQUEST) {}
|
||||
|
||||
vnode_id vnid;
|
||||
ino_t vnid;
|
||||
bool reenter;
|
||||
};
|
||||
|
||||
@@ -731,7 +731,7 @@ class CreateReply : public ReplyRequest {
|
||||
public:
|
||||
CreateReply() : ReplyRequest(CREATE_REPLY) {}
|
||||
|
||||
vnode_id vnid;
|
||||
ino_t vnid;
|
||||
fs_cookie fileCookie;
|
||||
};
|
||||
|
||||
@@ -831,7 +831,7 @@ class CreateDirReply : public ReplyRequest {
|
||||
public:
|
||||
CreateDirReply() : ReplyRequest(CREATE_DIR_REPLY) {}
|
||||
|
||||
vnode_id newDir;
|
||||
ino_t newDir;
|
||||
};
|
||||
|
||||
// RemoveDirRequest
|
||||
@@ -1374,10 +1374,10 @@ public:
|
||||
int32 operation;
|
||||
uint32 details; // for B_STAT_CHANGED:statFields
|
||||
// and B_ATTRIBUTE_CHANGED:cause
|
||||
mount_id device;
|
||||
vnode_id oldDirectory;
|
||||
vnode_id directory;
|
||||
vnode_id node;
|
||||
dev_t device;
|
||||
ino_t oldDirectory;
|
||||
ino_t directory;
|
||||
ino_t node;
|
||||
Address oldName;
|
||||
Address name;
|
||||
};
|
||||
@@ -1414,9 +1414,9 @@ public:
|
||||
port_id port;
|
||||
int32 token;
|
||||
int32 operation; // B_ENTRY_{CREATED,REMOVED}
|
||||
mount_id device;
|
||||
vnode_id directory;
|
||||
vnode_id node;
|
||||
dev_t device;
|
||||
ino_t directory;
|
||||
ino_t node;
|
||||
Address name;
|
||||
};
|
||||
|
||||
@@ -1435,8 +1435,8 @@ class GetVNodeRequest : public Request {
|
||||
public:
|
||||
GetVNodeRequest() : Request(GET_VNODE_REQUEST) {}
|
||||
|
||||
mount_id nsid;
|
||||
vnode_id vnid;
|
||||
dev_t nsid;
|
||||
ino_t vnid;
|
||||
};
|
||||
|
||||
// GetVNodeReply
|
||||
@@ -1452,8 +1452,8 @@ class PutVNodeRequest : public Request {
|
||||
public:
|
||||
PutVNodeRequest() : Request(PUT_VNODE_REQUEST) {}
|
||||
|
||||
mount_id nsid;
|
||||
vnode_id vnid;
|
||||
dev_t nsid;
|
||||
ino_t vnid;
|
||||
};
|
||||
|
||||
// PutVNodeReply
|
||||
@@ -1467,8 +1467,8 @@ class NewVNodeRequest : public Request {
|
||||
public:
|
||||
NewVNodeRequest() : Request(NEW_VNODE_REQUEST) {}
|
||||
|
||||
mount_id nsid;
|
||||
vnode_id vnid;
|
||||
dev_t nsid;
|
||||
ino_t vnid;
|
||||
fs_vnode node;
|
||||
};
|
||||
|
||||
@@ -1483,8 +1483,8 @@ class PublishVNodeRequest : public Request {
|
||||
public:
|
||||
PublishVNodeRequest() : Request(PUBLISH_VNODE_REQUEST) {}
|
||||
|
||||
mount_id nsid;
|
||||
vnode_id vnid;
|
||||
dev_t nsid;
|
||||
ino_t vnid;
|
||||
fs_vnode node;
|
||||
};
|
||||
|
||||
@@ -1499,8 +1499,8 @@ class RemoveVNodeRequest : public Request {
|
||||
public:
|
||||
RemoveVNodeRequest() : Request(REMOVE_VNODE_REQUEST) {}
|
||||
|
||||
mount_id nsid;
|
||||
vnode_id vnid;
|
||||
dev_t nsid;
|
||||
ino_t vnid;
|
||||
};
|
||||
|
||||
// RemoveVNodeReply
|
||||
@@ -1514,8 +1514,8 @@ class UnremoveVNodeRequest : public Request {
|
||||
public:
|
||||
UnremoveVNodeRequest() : Request(UNREMOVE_VNODE_REQUEST) {}
|
||||
|
||||
mount_id nsid;
|
||||
vnode_id vnid;
|
||||
dev_t nsid;
|
||||
ino_t vnid;
|
||||
};
|
||||
|
||||
// UnremoveVNodeReply
|
||||
@@ -1529,8 +1529,8 @@ class GetVNodeRemovedRequest : public Request {
|
||||
public:
|
||||
GetVNodeRemovedRequest() : Request(GET_VNODE_REMOVED_REQUEST) {}
|
||||
|
||||
mount_id nsid;
|
||||
vnode_id vnid;
|
||||
dev_t nsid;
|
||||
ino_t vnid;
|
||||
};
|
||||
|
||||
// GetVNodeRemovedReply
|
||||
|
||||
Reference in New Issue
Block a user