Added handy function volume_for_vnode() which returns the fs_volume for
a given given fs_vnode. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26669 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -313,6 +313,7 @@ extern status_t remove_vnode(fs_volume *volume, ino_t vnodeID);
|
|||||||
extern status_t unremove_vnode(fs_volume *volume, ino_t vnodeID);
|
extern status_t unremove_vnode(fs_volume *volume, ino_t vnodeID);
|
||||||
extern status_t get_vnode_removed(fs_volume *volume, ino_t vnodeID,
|
extern status_t get_vnode_removed(fs_volume *volume, ino_t vnodeID,
|
||||||
bool *removed);
|
bool *removed);
|
||||||
|
extern fs_volume* volume_for_vnode(fs_vnode *vnode);
|
||||||
|
|
||||||
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);
|
size_t count, size_t *_numBytes);
|
||||||
|
|||||||
@@ -3280,6 +3280,17 @@ get_vnode_removed(fs_volume *volume, ino_t vnodeID, bool* removed)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
extern "C" fs_volume*
|
||||||
|
volume_for_vnode(fs_vnode *_vnode)
|
||||||
|
{
|
||||||
|
if (_vnode == NULL)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
struct vnode* vnode = static_cast<struct vnode*>(_vnode);
|
||||||
|
return vnode->mount->volume;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
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)
|
size_t *_numBytes)
|
||||||
|
|||||||
Reference in New Issue
Block a user