All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Steven Lang <tirea@google.com>
Cc: fio@vger.kernel.org
Subject: Re: [PATCH] Fix parsing of ioengine strings
Date: Wed, 16 Nov 2011 14:31:05 +0100	[thread overview]
Message-ID: <4EC3BB19.9010800@kernel.dk> (raw)
In-Reply-To: <CAAUT-yOwd16b1fCT+EZWyiKQFi7R6eHC0cSi3b8z6FNz6=Wptw@mail.gmail.com>

On 2011-11-15 02:41, Steven Lang wrote:
> This cleans up parsing of FIO_OPT_STR_STORE options which have defined
> values (IE ioengine).  I made a few assumptions here...
> 
> 1. If FIO_OPT_STR_STORE was used, that means a copy of the string is
> desired, so it is always copied if the offset is non-zero.
> 2. If the values were the only allowed values, then FIO_OPT_STR would
> have been used; therefore it is not an error to give a value not in
> the list.
> 3. If an option callback is defined, then any values are ignored and
> the callback is called to parse the string.  (Don't think this
> currently applies, anywhere, but there is precendent in other options
> skipping normal parsing if a callback is used.)
> 4. If no offsets are defined, and no callback is given, the behavior
> is undefined - though this patch handles it cleanly and still calls
> value callbacks; though I believe fio will still complain about a bad
> options structure.
> 
> This fixes two cases (Restores it to previous behavior without
> breaking new functionality).
> 1. External ioengines (The patch to a .so is never in the list of
> possible values, so was never matching)
> 2. IO engines compiled in but not in the list in options.c
> 
> This patch should be applied to the 1.5x stable branch as well, though
> it doesn't apply cleanly due to one line difference from my last
> options patch.

Applied (to both branches), thanks.

-- 
Jens Axboe


      reply	other threads:[~2011-11-16 13:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-15  1:41 [PATCH] Fix parsing of ioengine strings Steven Lang
2011-11-16 13:31 ` Jens Axboe [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4EC3BB19.9010800@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=fio@vger.kernel.org \
    --cc=tirea@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.