Re: rbd: use watch/notify for changes in rbd header

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

 



On Thu, Feb 13, 2014 at 11:50 AM, Dan Carpenter
<dan.carpenter@xxxxxxxxxx> wrote:
> Hello Yehuda Sadeh,
>
> The patch 59c2be1e4d42: "rbd: use watch/notify for changes in rbd
> header" from Mar 21, 2011, leads to the following static checker
> warning:
>
>         drivers/block/rbd.c:687 parse_rbd_opts_token()
>         warn: we tested 'token < 0' before and it was 'false'
>
> drivers/block/rbd.c
>    677  static int parse_rbd_opts_token(char *c, void *private)
>    678  {
>    679          struct rbd_options *rbd_opts = private;
>    680          substring_t argstr[MAX_OPT_ARGS];
>    681          int token, intval, ret;
>    682
>    683          token = match_token(c, rbd_opts_tokens, argstr);
>    684          if (token < 0)
>                     ^^^^^^^^^
>    685                  return -EINVAL;
>    686
>    687          if (token < Opt_last_int) {
>                     ^^^^^^^^^^^^^^^^^^^^
> Opt_last_int is zero so this is never true.  Should the < be == or
> something?

Probably not.  It's there in case an integer option gets added to rbd
in the future.  See parse_fsopt_token() and the enums above it in
fs/ceph/super.c.

Thanks,

                Ilya
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux