From 20c4cfaa81f0bcd4a2c7e5cc2140a82cb8070f54 Mon Sep 17 00:00:00 2001 From: Martijn Coenen Date: Fri, 10 May 2019 10:39:54 +0200 Subject: [PATCH] Fix bug that would prevent us from reserving right amount of space. Bug: 132403230 Test: inspect dmesg output: [ 10.762678] init: [libfs_mgr]Setting reserved block count on /dev/block/dm-2 to 32768 [ 10.782652] tune2fs: Setting reserved blocks gid to 1065\x0a [ 10.782655] tune2fs: Setting reserved blocks count to 32768\x0a Change-Id: Id366d478bdd8a748bb1ba97d08a3b52e3cdd1efb Merged-In: Id366d478bdd8a748bb1ba97d08a3b52e3cdd1efb --- fs_mgr/fs_mgr.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs_mgr/fs_mgr.cpp b/fs_mgr/fs_mgr.cpp index c1aafdac9..3ea479e79 100644 --- a/fs_mgr/fs_mgr.cpp +++ b/fs_mgr/fs_mgr.cpp @@ -390,7 +390,7 @@ static void tune_quota(const std::string& blk_device, const FstabEntry& entry, // Set the number of reserved filesystem blocks if needed. static void tune_reserved_size(const std::string& blk_device, const FstabEntry& entry, const struct ext4_super_block* sb, int* fs_stat) { - if (entry.reserved_size != 0) { + if (entry.reserved_size == 0) { return; }