From: Josh Durgin Date: Tue, 9 Oct 2012 00:59:36 +0000 (-0700) Subject: FileJournal: ignore osd journal size for block devices X-Git-Tag: v0.54~78 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=97c2f196a3e9691430c64e7196cc8658345f0a8a;p=ceph.git FileJournal: ignore osd journal size for block devices 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 Reviewed-by: Sage Weil --- diff --git a/doc/config-cluster/osd-config-ref.rst b/doc/config-cluster/osd-config-ref.rst index e959de4d8572..05a3369cde14 100644 --- a/doc/config-cluster/osd-config-ref.rst +++ b/doc/config-cluster/osd-config-ref.rst @@ -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``. diff --git a/src/os/FileJournal.cc b/src/os/FileJournal.cc index a024a8094753..2ef43798c522 100644 --- a/src/os/FileJournal.cc +++ b/src/os/FileJournal.cc @@ -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;