Re: minor file journal size bug

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 06/14/2010 01:37 PM, Yehuda Sadeh Weinraub wrote:
On Mon, Jun 14, 2010 at 7:19 AM, Phil Carns<carns@xxxxxxxxxxx>  wrote:
Hi,

I ran into a minor problem when configuring the ObjectStore to use a file
journal that was 10 gigabytes in size (osd_journal_size = 10240).  The
osd_journal_size configuration parameter is an integer.  This would normally
be fine since the units are in megabytes, but it can overflow when bit
shifted in FileJournal.cc.  This causes the journal to fall back to trying
to detect a raw block device journal.

I've attached a small patch that fixes the problem for me, but there is
probably a cleaner way to do it.

Thanks!

Just defining osd_journal_size as a long long would do the trick (as
follows), although I'm not sure whether we need to be able to define
journals that are bigger than 2^32 MB. So I guess that in this case we
should probably go with your solution, and also go over the code and
check to see whether we have some other places where we do the same.
We should really be using some macro that does this conversion with a
correct cast.

Yehuda

Thanks Yehuda. I don't know what the right long term answer is, but either way works fine for my test case (I just tried your patch to confirm).

-Phil
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux