]> git.sur5r.net Git - u-boot/commit
ext4: Scan all directory blocks for space when inserting a new entry
authorStefan Brüns <stefan.bruens@rwth-aachen.de>
Tue, 6 Sep 2016 02:36:44 +0000 (04:36 +0200)
committerTom Rini <trini@konsulko.com>
Fri, 23 Sep 2016 13:02:36 +0000 (09:02 -0400)
commita321abd54fa025114df2002b33ea17adc6b998b7
tree4c688840fd324dcf46b55410a90521057aeaa1d7
parentb96c3c7292214fb81b1b355bf5a6d53cf9996d1e
ext4: Scan all directory blocks for space when inserting a new entry

Previously, only the last directory block was scanned for available space.
Instead, scan all blocks back to front, and if no sufficient space is
found, eventually append a new block.
Blocks are only appended if the directory does not use extents or the new
block would require insertion of indirect blocks, as the old code does.

Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
Reviewed-by: Lukasz Majewski <l.majewski@samsung.com>
fs/ext4/ext4_common.c