All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Howells <dhowells@redhat.com>
To: John Snow <jsnow@redhat.com>
Cc: dhowells@redhat.com, linux-cachefs@redhat.com,
	linux-nfs@vger.kernel.org, neilb@suse.de,
	linux-fsdevel@vger.kernel.org, jlayton@poochiereds.net
Subject: Re: [Linux-cachefs] [PATCH 2/2] Suspend/resume culling based on recently released file/block counts
Date: Wed, 03 Feb 2016 14:01:12 +0000	[thread overview]
Message-ID: <20004.1454508072@warthog.procyon.org.uk> (raw)
In-Reply-To: <56AFEA5E.2080401@redhat.com>

John Snow <jsnow@redhat.com> wrote:

> > +			if (!*sp || !isspace(*sp) || b_thresh == 0)
> > +				cfgerror("Invalid resume threshold (blocks)");
> 
> Seems to me like we're mixing parsing errors with invalid configuration
> error messages, but I'm just bike-shedding aboard the SS Howells.

How about this further modification?

-			if (!*sp || !isspace(*sp) || b_thresh == 0)
+			if (!*sp || !isspace(*sp))
+				cfgerror("Error parsing resume threshold (blocks)");
+			if (b_thresh == 0)
 				cfgerror("Invalid resume threshold (blocks)");
 			for (; isspace(*sp); sp++) {;}
 
@@ -470,7 +472,9 @@ int main(int argc, char *argv[])
 				f_thresh = ULLONG_MAX;
 			} else {
 				f_thresh = strtoul(sp, &sp, 10);
-				if (*sp || f_thresh == 0)
+				if (*sp)
+					cfgerror("Error parsing resume threshold (files)");
+				if (f_thresh == 0)
 					cfgerror("Invalid resume threshold (files)");

David

  parent reply	other threads:[~2016-02-03 14:01 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-25 16:41 [PATCH] CacheFiles: Provide read-and-reset release counters for cachefilesd David Howells
2016-01-25 16:49 ` [PATCH 1/2] cachefilesd can spin when disk space is short David Howells
2016-01-27 16:03   ` [Linux-cachefs] " Steve Dickson
2016-02-01 22:53   ` John Snow
2016-02-01 22:53     ` John Snow
2016-01-25 16:49 ` [PATCH 2/2] Suspend/resume culling based on recently released file/block counts David Howells
2016-01-27 16:03   ` [Linux-cachefs] " Steve Dickson
2016-02-01 23:29   ` John Snow
2016-02-03 14:01   ` David Howells [this message]
2016-02-03 16:30     ` John Snow
2016-01-27 16:39 ` [Linux-cachefs] [PATCH] CacheFiles: Provide read-and-reset release counters for cachefilesd Steve Dickson

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=20004.1454508072@warthog.procyon.org.uk \
    --to=dhowells@redhat.com \
    --cc=jlayton@poochiereds.net \
    --cc=jsnow@redhat.com \
    --cc=linux-cachefs@redhat.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=neilb@suse.de \
    /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.