[blivet:master] Use _resizefsUnit in resizeArgs() method.
dlehman at redhat.com
Fri Dec 19 15:17:13 UTC 2014
On 12/18/2014 07:35 PM, Brian C. Lane wrote:
> On Thu, Dec 18, 2014 at 10:03:34AM -0500, mulhern wrote:
>> The reason it is used elsewhere, i.e., when calculating minimum size
>> is because of the constraint on the resizeArgs() method to use the
>> units defined by _resizefsUnit. This patch makes that explicit.
>> Also, get rid of realistic FS.resizeArgs() implementation and make clear
>> that it needs to be overridden for subclasses that have resize functionality.
>> Add a resizefsUnit to ReiserFS and use it appropriately. ReiserFS._resizable
>> is False, so this makes no difference in operation.
>> This patch doesn't change behavior, it mostly replaces a literal with an
>> already defined constant in appropriate places.
> The units are tied to what the format specifier is passing ("%dM") so it
> has to match. I think it clearer and easier to maintain if that
> conversion is done next to the format specifier, not in a constant
> located elsewhere.
I agree. That's exactly why I left these when I added resizefsUnit.
More information about the anaconda-patches