From 83688c5567b256eed8592c3377de4bb43795a7fb Mon Sep 17 00:00:00 2001 From: sageweil Date: Fri, 20 Jul 2007 17:08:36 +0000 Subject: [PATCH] mount validates superblock vs actual dev size git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@1535 29311d96-e01e-0410-9327-a35deaab8ce9 --- trunk/ceph/ebofs/Ebofs.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/trunk/ceph/ebofs/Ebofs.cc b/trunk/ceph/ebofs/Ebofs.cc index 86504b6fdb949..55567952a4c12 100644 --- a/trunk/ceph/ebofs/Ebofs.cc +++ b/trunk/ceph/ebofs/Ebofs.cc @@ -76,8 +76,8 @@ int Ebofs::mount() derr(0) << "mount bad magic, not a valid EBOFS file system" << endl; return -EINVAL; } - if (sb1->num_blocks < dev.get_num_blocks() || - sb2->num_blocks < dev.get_num_blocks()) { + if (sb1->num_blocks > dev.get_num_blocks() || + sb2->num_blocks > dev.get_num_blocks()) { derr(0) << "mount superblock size exceeds actual device size" << endl; return -EINVAL; } -- 2.39.5