On 10/23/2014 09:24 AM, Ivan Shapovalov wrote:
On Tuesday 21 October 2014 at 17:50:23, Edward Shishkin wrote:
On 08/17/2014 11:52 PM, Ivan Shapovalov wrote:
Signed-off-by: Ivan Shapovalov<intelfx100@xxxxxxxxx>
---
fs/reiser4/block_alloc.h | 5 +++--
fs/reiser4/plugin/space/bitmap.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/fs/reiser4/block_alloc.h b/fs/reiser4/block_alloc.h
index bfc6be9..08b3941 100644
--- a/fs/reiser4/block_alloc.h
+++ b/fs/reiser4/block_alloc.h
@@ -51,9 +51,10 @@ struct reiser4_blocknr_hint {
/* block allocator assumes that blocks, which will be mapped to disk,
are in this specified block_stage */
block_stage_t block_stage;
- /* If direction = 1 allocate blocks in backward direction from the end
- * of disk to the beginning of disk. */
+ /* Allocate blocks only in backward direction starting from blk. */
unsigned int backward:1;
+ /* Allocate blocks only in forward direction starting from blk. */
+ unsigned int forward:1;
I suggest to call this bitfield "monotonic_forward"
Isn't it an opposite of "backward"? Should we rename both?
No, it isn't. And this is the reason of the rename.
monotonic_forward is to skip the second pass in alloc_blocks_forward()
BTW, in plugin/space/bitmap.c:1141 (around that line)
in function alloc_blocks_forward()
shouldn't the second scan be done with bitmap_alloc_backward(), as per the
comment?
I think that those comment means a jump in backward direction
(to the start) and one more pass with bitmap_alloc_forward().
Such a "compound, non-monotonic" forward...
Edward.
--
To unsubscribe from this list: send the line "unsubscribe reiserfs-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html