From 0edda2e0d891998b77e46956a3b110a4a86f35aa Mon Sep 17 00:00:00 2001 From: sage Date: Tue, 21 Mar 2006 18:21:37 +0000 Subject: [PATCH] *** empty log message *** git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@725 29311d96-e01e-0410-9327-a35deaab8ce9 --- ceph/ebofs/BlockDevice.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ceph/ebofs/BlockDevice.cc b/ceph/ebofs/BlockDevice.cc index 11665502a446e..2acaeb18ce220 100644 --- a/ceph/ebofs/BlockDevice.cc +++ b/ceph/ebofs/BlockDevice.cc @@ -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) { -- 2.39.5