The Tux3 free block map is a dynamically allocated tree, and this
introduces a recursion: what happens when we try to allocate a block
but the leaf of the tree that maps the block does not exist yet, has to
be allocated, and we want to allocate it on that same free map leaf
that does not yet exist? Answer: infinite recursion ending with stack
overflow, unless the recursion is limited in some way. I considered
two obvious approaches:* Do not record allocations of free tree leaves or nodes in the free
tree itself, but log them using a logical log entry as already
planned for the atomic commit mechanism.* Use bitmaps for now, not extents. Preallocate the whole free map
without using an allocator, deciding where to place the blocks by
an ad hoc method. Once fully preallocated, enter the btree block
addresses into the free map "by hand" as ddsnap does.Then I thought: since I am going to allocate with bitmaps at first
anyway, why not put the bitmaps in a file instead of a special purpose
btree. Then the bitmap blocks can be accessed through the file cache
(aka page cache in kernel, or logical block cache as I have sometimes
called it).The really cool thing about this strategy is, it unexpectedly solves
the above recursion. Changes to the bitmap are made in the cache,
which is a simple logically indexed array. This naturally defers the
actual allocations until the cache is flushed to disk.Woohoo, this is nice. Now what about when we go to extent based free
space mapping? Ok, that is easy. There will be a separate free map
btree with extents at the leaves. That btree could be mapped into a
file just like an htree directory index, but that would not avoid the
recursion. This is where the logical logging method described above
can be used.(It is not yet clear to me whether it is best to map the free extent
btree into a file or have it separate, at the same level in the Tux3
structure as the inode table.)An extent based free map is efficient o...
------=_Part_145547_30813599.1228311376033
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inlineHello All,
This is a request for comments for the fields of data structures.
Precise comment about what the field is meant for will make reading the code
that much easier :)Good day,
Dmitri------=_Part_145547_30813599.1228311376033
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inlineHello All,<br><br>This is a request for comments for the fields of data structures.<br><br>Precise comment about what the field is meant for will make reading the code that much easier :)<br><br>Good day,<br>Dmitri<br>
------=_Part_145547_30813599.1228311376033--
Service with a smile!
http://hg.tux3.org/tux3?cs=8eb99e3d9904
It is not much, but it is a start. Please let us know about anything
that is particularly obscure so we can focus this ongoing effort.Regards,
Daniel
_______________________________________________
Tux3 mailing list
Tux3@tux3.org
http://mailman.tux3.org/cgi-bin/mailman/listinfo/tux3
Sorry, we broke the list interface when we moved servers yesterday.
It should work now.Daniel
_______________________________________________
Tux3 mailing list
Tux3@tux3.org
http://mailman.tux3.org/cgi-bin/mailman/listinfo/tux3
| jjohansen | [AppArmor 39/45] AppArmor: Profile loading and manipulation, pathname matching |
| Vladislav Bolkhovitin | Re: Integration of SCST in the mainstream Linux kernel |
| Heiko Carstens | Re: -mm merge plans for 2.6.23 -- sys_fallocate |
| Andrew Morton | 2.6.23-rc6-mm1 |
git: | |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
| Evgeniy Polyakov | Re: [BUG] New Kernel Bugs |
| Jarek Poplawski | [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| David Miller | [GIT]: Networking |
