maxsize do exist and is better than size. need another approach to
solve the issue.
This reverts commit c4107ed723354336427afb30bc3e25cd5303baf5.
Change-Id: I76eb00a9771907b071d974db33c15accd404e9ec
(cherry picked from commit becbee122c194b2c7d4acd084c60ee07c897c2b8)