All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/19 v2] mkfs cleaning
@ 2016-04-21  9:39 Jan Tulak
  2016-04-21  9:39 ` [PATCH 01/19] xfsprogs: use common code for multi-disk detection Jan Tulak
                   ` (21 more replies)
  0 siblings, 22 replies; 51+ messages in thread
From: Jan Tulak @ 2016-04-21  9:39 UTC (permalink / raw)
  To: xfs

Updated version. Most notable changes are dropping of
"xfsprogs: disable truncating of files", reverting 
"don't treat files as though they are block devices"
back to Dave's version, and adding a new patch
"mkfs: conflicting values with disabled crc should fail."


Dave Chinner (15):
  xfsprogs: use common code for multi-disk detection
  mkfs: sanitise ftype parameter values.
  mkfs: Sanitise the superblock feature macros
  mkfs: validate all input values
  mkfs: factor boolean option parsing
  mkfs: validate logarithmic parameters sanely
  mkfs: structify input parameter passing
  mkfs: getbool is redundant
  mkfs: use getnum_checked for all ranged parameters
  mkfs: add respecification detection to generic parsing
  mkfs: table based parsing for converted parameters
  mkfs: merge getnum
  mkfs: encode conflicts into parsing table
  mkfs: add string options to generic parsing
  mkfs: don't treat files as though they are block devices

Jan Tulak (4):
  mkfs: move spinodes crc check
  mkfs: unit conversions are case insensitive
  mkfs: add optional 'reason' for illegal_option
  mkfs: conflicting values with disabled crc should fail

 include/Makefile        |    5 +-
 include/xfs_multidisk.h |   73 ++
 libxfs/init.c           |    6 +
 libxfs/linux.c          |   11 +-
 man/man8/mkfs.xfs.8     |   45 +-
 mkfs/Makefile           |    2 +-
 mkfs/maxtrres.c         |    2 +-
 mkfs/proto.c            |   58 +-
 mkfs/xfs_mkfs.c         | 1983 +++++++++++++++++++++++++++++------------------
 mkfs/xfs_mkfs.h         |   89 ---
 repair/xfs_repair.c     |   44 +-
 11 files changed, 1417 insertions(+), 901 deletions(-)
 create mode 100644 include/xfs_multidisk.h
 delete mode 100644 mkfs/xfs_mkfs.h

-- 
2.5.0

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 51+ messages in thread
* [PATCH 00/19] mkfs cleaning
@ 2016-03-24 11:15 jtulak
  2016-03-24 11:15 ` [PATCH 11/19] mkfs: table based parsing for converted parameters jtulak
  0 siblings, 1 reply; 51+ messages in thread
From: jtulak @ 2016-03-24 11:15 UTC (permalink / raw)
  To: xfs

From: Jan Tulak <jtulak@redhat.com>

Hi guys,
a new iteration of this patchset after a long time.

(Jump down to the quote of the original post from Dave who started this set.)

I tried to solve all the issues you mentioned the last time (thanks for them!)
and I went also through more intense testing. As far as I'm aware, the only
few occassions where xfstests currently fails with this patchset is because
I fixed some wrong/not ideal behaviour in the original code. It should be
clean also from Coverity's point of view.

Some tests which now fails and will need a change are xfs/078, 206, 216
and 217. See "[PATCH 15/19] mkfs: don't treat files as though they are block
devices" for more details

Each specific patch has a changelog of the things chaged in it since the last
version.

I hope that this patchset is getting into a reasonable form. While it doesn't
clean everything, it greately cleans some parts of mkfs and fixes some issues.


And to remind what this patchset is about, here is the original Dave's email.

> Hi folks,
>␣
> This is still a work in progress, but is compelte enough to get
> feedback on the general structure. The problem being solved here is
> that mkfs does a terrible job of input validation from the command
> line, has huge amounts of repeated code in the sub options
> processing loops and has many, many unnecessary variable for
> tracking simply things like whether a parameter was specified.
>␣
> This patchset introduces a parameter table structure that is used to
> define the parameters and their constraints. Things like minimum and
> maximum valid values, default values, conflicting options, etc are
> all contained within the table, so all the "policy" is found in a
> single place.
>␣
> This greatly reduces the complexity of the option parsing loop. It
> doesn't remove all the complexity (yet) because many of the options
> have special cases or more complex conflicts than I've yet added
> support for. The idea is, however, that all of the sub-option
> parameter setup will eventually end up being implemented as a
> generic loop as the parameter structure will hold all the
> information about in the input parameters.
>␣
> To get there, the parameter table still needs more work - it needs
> to hold the value/string for the parameter, and we need to reference
> those in the code.
>␣
> The flow on effect of this is that we can remove the many, many
> individual variables and start passing the option structures to
> functions rather than avoiding using functions because passing so
> many variables is messy and nasty. IOWs, it lays the groundwork for
> factoring xfs_mkfs.c into something more than a bunch of spagetti...
>␣
> Anyway, have a look and see what you think about progress so far.
>␣
> FWIW, the first patch is following up on the multi-disk discussion
> Christoph and I had, and the last patch in the series covers all the
> issues that arose with "-d file" and treating files like block
> devices....
>␣
> Cheers,
>␣
> Dave.


Dave Chinner (15):
  xfsprogs: use common code for multi-disk detection
  mkfs: sanitise ftype parameter values.
  mkfs: Sanitise the superblock feature macros
  mkfs: validate all input values
  mkfs: factor boolean option parsing
  mkfs: validate logarithmic parameters sanely
  mkfs: structify input parameter passing
  mkfs: getbool is redundant
  mkfs: use getnum_checked for all ranged parameters
  mkfs: add respecification detection to generic parsing
  mkfs: table based parsing for converted parameters
  mkfs: merge getnum
  mkfs: encode conflicts into parsing table
  mkfs: add string options to generic parsing
  mkfs: don't treat files as though they are block devices

Jan Tulak (4):
  mkfs: move spinodes crc check
  xfsprogs: disable truncating of files
  mkfs: unit conversions are case insensitive
  mkfs: add optional 'reason' for illegal_option


 include/Makefile        |    5 +-
 include/xfs_multidisk.h |   73 ++
 libxfs/init.c           |   14 +-
 libxfs/linux.c          |   12 +-
 man/man8/mkfs.xfs.8     |   37 +-
 mkfs/Makefile           |    2 +-
 mkfs/maxtrres.c         |    2 +-
 mkfs/proto.c            |   58 +-
 mkfs/xfs_mkfs.c         | 2003 +++++++++++++++++++++++++++++------------------
 mkfs/xfs_mkfs.h         |   89 ---
 repair/xfs_repair.c     |   44 +-
 11 files changed, 1437 insertions(+), 902 deletions(-)
 create mode 100644 include/xfs_multidisk.h
 delete mode 100644 mkfs/xfs_mkfs.h

-- 
2.6.0

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 51+ messages in thread

end of thread, other threads:[~2016-06-06  7:43 UTC | newest]

Thread overview: 51+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-21  9:39 [PATCH 00/19 v2] mkfs cleaning Jan Tulak
2016-04-21  9:39 ` [PATCH 01/19] xfsprogs: use common code for multi-disk detection Jan Tulak
2016-04-21  9:39 ` [PATCH 02/19] mkfs: sanitise ftype parameter values Jan Tulak
2016-04-21  9:39 ` [PATCH 03/19] mkfs: Sanitise the superblock feature macros Jan Tulak
2016-05-02 23:06   ` Eric Sandeen
2016-05-04  0:48     ` Eric Sandeen
2016-04-21  9:39 ` [PATCH 04/19] mkfs: validate all input values Jan Tulak
2016-04-21  9:39 ` [PATCH 05/19] mkfs: factor boolean option parsing Jan Tulak
2016-04-21  9:39 ` [PATCH 06/19] mkfs: validate logarithmic parameters sanely Jan Tulak
2016-04-21  9:39 ` [PATCH 07/19] mkfs: structify input parameter passing Jan Tulak
2016-04-21  9:39 ` [PATCH 08/19] mkfs: getbool is redundant Jan Tulak
2016-05-02 23:08   ` Eric Sandeen
2016-04-21  9:39 ` [PATCH 09/19] mkfs: use getnum_checked for all ranged parameters Jan Tulak
2016-04-21  9:39 ` [PATCH 10/19] mkfs: add respecification detection to generic parsing Jan Tulak
2016-04-21  9:39 ` [PATCH 11/19] mkfs: table based parsing for converted parameters Jan Tulak
2016-05-02 23:09   ` Eric Sandeen
2016-04-21  9:39 ` [PATCH 12/19] mkfs: merge getnum Jan Tulak
2016-04-21  9:39 ` [PATCH 13/19] mkfs: encode conflicts into parsing table Jan Tulak
2016-05-02 23:11   ` Eric Sandeen
2016-05-03 23:39   ` Eric Sandeen
2016-05-04  0:47     ` Eric Sandeen
2016-04-21  9:39 ` [PATCH 14/19] mkfs: add string options to generic parsing Jan Tulak
2016-05-02 23:11   ` Eric Sandeen
2016-04-21  9:39 ` [PATCH 15/19] mkfs: don't treat files as though they are block devices Jan Tulak
2016-04-21 12:43   ` Jan Tulak
2016-04-21 20:13     ` Eric Sandeen
2016-04-22  7:46       ` Jan Tulak
2016-04-22  7:49   ` [PATCH 15/19 v2] " Jan Tulak
2016-04-29 14:47     ` [PATCH 15/19 v3] " Jan Tulak
2016-04-29 19:11       ` Eric Sandeen
2016-05-03  9:59         ` Jan Tulak
2016-05-02 23:13   ` [PATCH 15/19] " Eric Sandeen
2016-04-21  9:39 ` [PATCH 16/19] mkfs: move spinodes crc check Jan Tulak
2016-04-21  9:39 ` [PATCH 17/19] mkfs: unit conversions are case insensitive Jan Tulak
2016-04-21  9:39 ` [PATCH 18/19] mkfs: add optional 'reason' for illegal_option Jan Tulak
2016-04-21  9:39 ` [PATCH 19/19] mkfs: conflicting values with disabled crc should fail Jan Tulak
2016-04-28  8:29 ` [RFC PATCH] xfstests: Add mkfs input validation tests Jan Tulak
2016-04-28  8:29   ` Jan Tulak
2016-04-29  1:59   ` Dave Chinner
2016-04-29  1:59     ` Dave Chinner
2016-04-29 14:42     ` Jan Tulak
2016-05-02 23:05 ` [PATCH 00/19 v2] mkfs cleaning Eric Sandeen
2016-05-10  6:10 ` Dave Chinner
2016-06-01 13:19   ` Jan Tulak
2016-06-03  0:53     ` Dave Chinner
2016-06-03  9:20       ` Jan Tulak
2016-06-03 12:09         ` Jan Tulak
2016-06-04  0:32           ` Dave Chinner
2016-06-06  7:42             ` Jan Tulak
  -- strict thread matches above, loose matches on Subject: below --
2016-03-24 11:15 [PATCH 00/19] " jtulak
2016-03-24 11:15 ` [PATCH 11/19] mkfs: table based parsing for converted parameters jtulak
2016-04-07 19:08   ` Eric Sandeen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.