]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
BlueFS: add a guard for log space allocation during mkfs
authorxie xingguo <xie.xingguo@zte.com.cn>
Sat, 23 Jan 2016 05:09:45 +0000 (13:09 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Wed, 3 Feb 2016 01:59:17 +0000 (09:59 +0800)
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
src/os/bluestore/BlueFS.cc

index 759d2c8918b027360c85e2ab1a5302b04fbd8b00..64dd9f38973449306c633f1d85066e5eb037e668 100644 (file)
@@ -174,9 +174,10 @@ int BlueFS::mkfs(uuid_d osd_uuid)
   FileRef log_file = new File;
   log_file->fnode.ino = 1;
   log_file->fnode.prefer_bdev = bdev.size() - 1;
-  _allocate(log_file->fnode.prefer_bdev,
+  int r = _allocate(log_file->fnode.prefer_bdev,
            g_conf->bluefs_max_log_runway,
            &log_file->fnode.extents);
+  assert(r == 0);
   log_writer = new FileWriter(log_file, bdev.size());
 
   // initial txn