Re: [Linux-cachefs] [PATCH 2/2] Suspend/resume culling based on recently released file/block counts

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

 




On 02/03/2016 09:01 AM, David Howells wrote:
> John Snow <jsnow@xxxxxxxxxx> 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
> 

I'm fine with either; I gave my R-B regardless. I'm fine with this
change, too.
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux