[haiku-bugs] Re: [Haiku] #3723: Improving disk performance by changing VirtualMemory path

  • From: "bonefish" <trac@xxxxxxxxxxxx>
  • Date: Sun, 12 Jun 2011 22:38:33 -0000

#3723: Improving disk performance by changing VirtualMemory path
-----------------------------------------+---------------------------
   Reporter:  haiqu                      |      Owner:  axeld
       Type:  enhancement                |     Status:  new
   Priority:  normal                     |  Milestone:  R1
  Component:  Preferences/VirtualMemory  |    Version:  R1/pre-alpha1
 Resolution:                             |   Keywords:
 Blocked By:                             |   Blocking:
Has a Patch:  0                          |   Platform:  All
-----------------------------------------+---------------------------

Comment (by bonefish):

 The `<fs_info.h>` C API is also available in the kernel. It allows you to
 get the volume and root node ID for any mounted volume. Given such a pair
 (aka node ref) you can employ the private VFS API
 (`header/private/kernel/vfs.h`) to get a path (`vfs_entry_ref_to_path()`),
 get the file's stat data (`vfs_stat_node_ref()`), or open it
 (`vfs_entry_ref_to_vnode()` plus `vfs_open_vnode()`).

 The disk device manager API might be interesting, if the volume for the
 swap file is not even mounted yet and you need to find and/or mount it
 first.

-- 
Ticket URL: <http://dev.haiku-os.org/ticket/3723#comment:5>
Haiku <http://dev.haiku-os.org>
Haiku - the operating system.

Other related posts: