From: Sage Weil Date: Thu, 22 Apr 2010 21:09:51 +0000 (-0700) Subject: osd: print a bit more debug info about compat problems X-Git-Tag: v0.20~19 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=f502547f45e66d1a0bd5c25acb03f14084bd96a1;p=ceph.git osd: print a bit more debug info about compat problems --- diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index 5f7eff5ee4b4..cb317ef3283f 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -700,18 +700,19 @@ int OSD::read_superblock() ::decode(superblock, p); dout(10) << "read_superblock " << superblock << dendl; - if (osd_compat.compare(superblock.compat_features) < 0) { - dout(5) << "The disk uses features unsupported by the executable." << dendl; + dout(0) << "The disk uses features unsupported by the executable." << dendl; + dout(0) << " ondisk features " << superblock.compat_features << dendl; + dout(0) << " daemon features " << osd_compat << dendl; + if (osd_compat.writeable(superblock.compat_features)) { - dout(5) << "it is still writeable, though. Missing features:" << dendl; + dout(0) << "it is still writeable, though. Missing features:" << dendl; CompatSet diff = osd_compat.unsupported(superblock.compat_features); - //NEEDS_ITER + return -EOPNOTSUPP; } else { dout(0) << "Cannot write to disk! Missing features:" << dendl; CompatSet diff = osd_compat.unsupported(superblock.compat_features); - //NEEDS_ITER return -EOPNOTSUPP; } }