From: xie xingguo Date: Sat, 23 Jan 2016 05:09:45 +0000 (+0800) Subject: BlueFS: add a guard for log space allocation during mkfs X-Git-Tag: v10.0.4~57^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=3278968423106e9f08b02272d4f8e26318498d99;p=ceph.git BlueFS: add a guard for log space allocation during mkfs Signed-off-by: xie xingguo --- diff --git a/src/os/bluestore/BlueFS.cc b/src/os/bluestore/BlueFS.cc index 759d2c8918b..64dd9f38973 100644 --- a/src/os/bluestore/BlueFS.cc +++ b/src/os/bluestore/BlueFS.cc @@ -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