]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
rbd: don't attempt to interpret image cache state json
authorIlya Dryomov <idryomov@gmail.com>
Thu, 6 May 2021 09:20:23 +0000 (11:20 +0200)
committerIlya Dryomov <idryomov@gmail.com>
Thu, 6 May 2021 09:20:23 +0000 (11:20 +0200)
commitf70bb26a66cccf560065eb7bdf083361a1caec1a
tree3353c787fe22486c376ac3578cff86c1efba8030
parent5f12e85d91543db5cd041ef2d840b8f4b98ce6be
rbd: don't attempt to interpret image cache state json

There are several issues with the current code:

- the value of "present" field is lost to the value of "clean" -- if the
  cache is present but dirty, we report that there is no cache
- the value of "clean" field is lost -- we always report false
- for a cache bigger than 2G, size is reported incorrectly -- 32-bit int
  overflow
- there is no way to get the type of the cache (rwl vs ssd)

Finally, even with all of the above fixed, image cache state output
would still be confusing because it is effectively a snapshot from
the time the cache was loaded.  It is not updated until the cache is
orderly closed.

Given that more changes would be needed to make "rbd status" output
useful and in the meantime it just needs to be correct to allow for
basic troubleshooting, just dump raw json.

Fixes: https://tracker.ceph.com/issues/50613
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
src/tools/rbd/action/Status.cc