Re: [PATCH 04/12] mkfs: merge tables for opts parsing into one table

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Apr 26, 2017 at 10:01 AM, Luis R. Rodriguez <mcgrof@xxxxxxxxxx> wrote:
> On Tue, Apr 25, 2017 at 09:00:40PM -0500, Eric Sandeen wrote:
>> On 4/25/17 8:38 PM, Luis R. Rodriguez wrote:
>> If you're not a fan of #defines to size global arrays that's ok, but
>> let's be consistent and change them all at once, and not change one
>> of the 3 as a side-effect of collapsing the separate opts structures
>> into one.
>
> Hm, changing all 3 of these of these: opts, suboopts, conflicts to flexible
> array may be possible without making the patch impossible to review, but its not
> clear to me, I'd be surprised though.
>
> Anyway in case its useful to Jan or others here's an example of what it using
> flexible arrays could look like for an opt/subopt framework:
>
> http://drvbp1.linux-foundation.org/~mcgrof/demos/demo-flexible-array-subopts.c

Thanks.

>
>> For now, let's follow the pattern of the existing code, and submit a
>> comprehensive functional patch to address this separate change.
>>
>> Small, reviewable, distinct, functional changes.
>
> This patch moves the opts to the 'old' way of doing things with no good reason
> other than its the old style. I find more reasons to move away from it, to enable
> later making subopts and conflicts also use flexible array (if this is agreed
> suitable).

Changing it this later (and all the other size definitions too) sounds
like a better idea to me: this static initialization doesn't add any
work that would be useless after it is turned to flexible, so it is
only about "make it flexible now, or later?" And given the number of
changes I have now, I'm up for making this change later on.

Cheers,
Jan

-- 
Jan Tulak
jtulak@xxxxxxxxxx / jan@xxxxxxxx
--
To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux