OSDN Git Service

resize2fs: reserve fs metadata blocks first in blocks_to_move()
authorTheodore Ts'o <tytso@mit.edu>
Sat, 29 Dec 2012 00:54:19 +0000 (19:54 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Sat, 29 Dec 2012 05:52:20 +0000 (00:52 -0500)
commit2ebaeb35dba540f5de578c848a5d1787d0ef2720
tree8a3d8e4ccae4ebce5682adc36cad1f579780c3a2
parent49cdefd3312c5ac81ec5d233d62441281ad26e55
resize2fs: reserve fs metadata blocks first in blocks_to_move()

This is the first commit to add support for off-line resizing using
flex_bg without the assist of using the resize_inode to reserve gdt
blocks.  This functionality has been broken up into separate commits
which are hopefully obviously correct to make them easier to review
for correctness.

In this first step, we break up the for loop at the end of
blocks_to_move() so that we first mark all of the metadata blocks
which don't need to be moved in the reserve_blocks bitmap, and then
try to allocate the metadata blocks are new or which need to moved
second.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
resize/resize2fs.c