Whamcloud - gitweb
misc: fix infinite loop when finding the start of the hugefile start range
authorDarrick J. Wong <darrick.wong@oracle.com>
Wed, 3 Dec 2014 03:00:04 +0000 (22:00 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Wed, 3 Dec 2014 03:14:34 +0000 (22:14 -0500)
commit63b4cbb8bc8602d5dfe80413005142a7b59c25ef
tree9f8316dccc04599017153fb77977fbcc8ce4c89b
parent5da8912008bbcfcaef3c8109831fdb4af40cd4fd
misc: fix infinite loop when finding the start of the hugefile start range

When looking for the start of the hugefile range, the 'next' variable
is incorrectly decremented.  If we happened to find a single free
block, the effect of this decrement is that blk == next, which means
that we never modify the loop control variable, so get_start_block
never returns.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
misc/mk_hugefiles.c
tests/m_hugefile_slack/expect [new file with mode: 0644]
tests/m_hugefile_slack/name [new file with mode: 0644]
tests/m_hugefile_slack/script [new file with mode: 0644]