
|
[openbeosstorage]
||
[Date Prev]
[04-2003 Date Index]
[Date Next]
||
[Thread Prev]
[04-2003 Thread Index]
[Thread Next]
[openbeosstorage] Re: DiskDevice API v2.1
- From: "shatty" <shatty@xxxxxxxxxxxxx>
- To: openbeosstorage@xxxxxxxxxxxxx
- Date: Fri, 04 Apr 2003 22:56:46 -0800
Somebody wrote:
> But anyway, it *is* a problem, and we will not be=20
> able to solve it completely (and efficiently when=20
> complete), due to the heavy usage of entry=3D3D5Frefs=20
> in BeOS.
An offset in the in-memory data structure representing
a volume/partition/whatever can efficiently and simply
solve this problem assuming that you are simply going=20
to move everything linearly.
You don't even have to remember which entry_refs were
from before the move. You can treat them all the same
by subtracting the offset every time you create an
entry_ref.
Space hit: one field (int64?)
Time hit: an addition per entry_ref access
a subtraction per entry_ref creation
Doing an addition each time is probably cheaper than
figuring out if you have to update an entry_ref and
doing the "right thing" on the fly. It's also less
complicated than keeping track of all current=20
entry_refs and updating them during the move.
I assume entry_refs store the absolute position from
the start of the disk and not the relative position
from the start of the volume or this wouldn't be an
issue, right?
Andrew
|

|