]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
FileJournal: ignore osd journal size for block devices
authorJosh Durgin <josh.durgin@inktank.com>
Tue, 9 Oct 2012 00:59:36 +0000 (17:59 -0700)
committerSage Weil <sage@inktank.com>
Tue, 9 Oct 2012 03:33:43 +0000 (20:33 -0700)
Using part of a block device doesn't make much sense. This makes the
common case, where you partition a disk to act as several journals,
easier to configure.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
doc/config-cluster/osd-config-ref.rst
src/os/FileJournal.cc

index e959de4d85721d8ff62bab09c035f060ffc9f6d6..05a3369cde1489e2d899b1ce10bfd2151c1060fa 100644 (file)
@@ -27,7 +27,7 @@
 
 ``osd journal size`` 
 
-:Description: The size of the journal in megabytes. If this is 0, and the journal is a block device, the entire block device is used.
+:Description: The size of the journal in megabytes. If this is 0, and the journal is a block device, the entire block device is used. Since v0.54, this is ignored if the journal is a block device, and the entire block device is used.
 :Type: 32-bit Integer
 :Default: ``1024``
 :Recommended: Begin with 1GB. Should at least twice the product of the expected speed multiplied by ``filestore min sync interval``.
index a024a809475393ef489301493775a55f6436ae35..2ef43798c522e6cc8946254ed6734b6a39e8aff9 100644 (file)
@@ -139,20 +139,10 @@ int FileJournal::_open_block_device()
   int64_t conf_journal_sz(g_conf->osd_journal_size);
   conf_journal_sz <<= 20;
 
-  if (conf_journal_sz == 0) {
-    dout(10) << __func__ << ": no journal size specified in configuration. "
-      << "We'll use the entire block device (size: " << bdev_sz << ")" << dendl;
-    max_size = bdev_sz;
-  }
-  else if (bdev_sz > conf_journal_sz) {
-    dout(10) << __func__ << ": using " << conf_journal_sz << " bytes "
-             << "of a " << bdev_sz << " byte block device." << dendl;
-    max_size = conf_journal_sz;
-  } else {
-    dout(0) << __func__ << ": WARNING: configured 'osd journal size' is "
-           << conf_journal_sz << ", but " << fn << " is only "
-      << bdev_sz << " bytes." << dendl;
-  }
+  dout(10) << __func__ << ": ignoring osd journal size. "
+          << "We'll use the entire block device (size: " << bdev_sz << ")"
+          << dendl;
+  max_size = bdev_sz;
 
   /* block devices have to write in blocks of CEPH_PAGE_SIZE */
   block_size = CEPH_PAGE_SIZE;