]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
*** empty log message ***
authorsage <sage@29311d96-e01e-0410-9327-a35deaab8ce9>
Tue, 21 Mar 2006 18:21:37 +0000 (18:21 +0000)
committersage <sage@29311d96-e01e-0410-9327-a35deaab8ce9>
Tue, 21 Mar 2006 18:21:37 +0000 (18:21 +0000)
git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@725 29311d96-e01e-0410-9327-a35deaab8ce9

ceph/ebofs/BlockDevice.cc

index 11665502a446efbc8beb0f219069cc3fa89c4a13..2acaeb18ce22037263e72c4ce048e5133bd9fa23 100644 (file)
@@ -60,8 +60,10 @@ block_t BlockDevice::get_num_blocks()
          // hmm, try stat!
          struct stat st;
          fstat(fd, &st);
-         num_blocks = st.st_size / (__uint64_t)EBOFS_BLOCK_SIZE;
-       }       
+         num_blocks = st.st_size;
+       }
+       
+       num_blocks /= (__uint64_t)EBOFS_BLOCK_SIZE;
 
        if (g_conf.bdev_fake_max_mb &&
                num_blocks > (block_t)g_conf.bdev_fake_max_mb * 256ULL) {