]> git.apps.os.sepia.ceph.com Git - ceph-client.git/commit
rbd: fix ceph_pg_poolid_by_name()
authorAlex Elder <elder@dreamhost.com>
Thu, 1 Nov 2012 15:17:15 +0000 (10:17 -0500)
committerAlex Elder <elder@inktank.com>
Mon, 19 Nov 2012 23:37:47 +0000 (17:37 -0600)
commit15c8ca6c94f92017e5c91d5aba849d2fcab0e011
tree381e37fd98f279a33fc7374b32683cff2da29864
parent74d907ccd569c8df7592f70bb1c1fcb761211cc2
rbd: fix ceph_pg_poolid_by_name()

Currently ceph_pg_poolid_by_name() returns an int, which is used to
encode a ceph pool id.  This could be a problem because a pool id
(at least in some cases) is a 64-bit value.  We have a defined pool
id value that represents "no pool," and that's a very sensible
return value here.

This patch changes ceph_pg_poolid_by_name() to return a 64-bit
pool id value, or CEPH_NOPOOL if the named pool is not found.

The patch also gratuitously renames the function, separating "pool"
from "id" in the name by an underscore.

Signed-off-by: Alex Elder <elder@inktank.com>
drivers/block/rbd.c
include/linux/ceph/osdmap.h
net/ceph/osdmap.c