This patch adds ZFS parallel journal support. It uses libzfs provided by
zfsonlinux to access ZFS' functionalities. To enable ZFS parallel journal
support, compile ceph by:
./configure --with-libzfs LIBZFS_CFLAGS="-I<libzfs header> -I<libspl header>"
make
Add following line to osd section of ceph.conf
filestore zfs_snap = 1
Note: ZFS (no mater parallel journal is enabled or not) does not support
direct IO. To use it as backend FS for OSD, you need to add following line
to osd section of ceph.conf
journal aio = 0
journal dio = 0
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
This patch defines class FileStoreBackend, and use it to abstracts
filesystem's functionalities.
Fiemap() and syncfs() related code is moved into class
GenericFileStoreBackend.
All btrfs specific code is moved into class BtrfsFileStoreBackend.
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
This patch change the fsx.sh to pull better fsx.c from xfstests site
to support hole punching test.
Signed-off-by: Yunchuan Wen <yunchuanwen@ubuntukylin.com>
Signed-off-by: Li Wang <liwang@ubuntukylin.com>
Check new parameters and check that rados_id is not None again to
catch the empty string.
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
Reviewed-by: Sage Weil <sage.weil@inktank.com>
Previously it had no name parameter, so the default will be used by
old clients. However, if an old client set rados_id, a new check that
both rados_id and name are set would result in an error. Fix this by
only applying the default names after the check, and add tests of this
behavior.
This was introduced in 783b7ec847,
so it does not affect cuttlefish.
Fixes: #5970
Reported-by: Michael Morgan <mmorgan@dca.net>
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
Reviewed-by: Sage Weil <sage.weil@inktank.com>
For aio flush, we register a wait on the most recent write. The write
completion code, however, was *only* waking the waiter if they were waiting
on that write, without regard to previous writes (completed or not).
For example, we might have 6 and 7 outstanding and wait on 7. If they
finish in order all is well, but if 7 finishes first we do the flush
completion early. Similarly, if we
- start 6
- start 7
- finish 7
- flush; wait on 7
- finish 6
we can hang forever.
Fix by doing any completions that are prior to the oldest pending write in
the aio write completion handler.
Refs: #5919
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Tested-by: Oliver Francke <Oliver.Francke@filoo.de>
Add an already-locked helper so that C_Aio{Safe,Complete} can
increment the reference count when their caller holds the
lock. C_AioCompleteAndSafe's caller is not holding the lock, so call
regular get() to ensure no racing updates can occur.
This eliminates all direct manipulations of AioCompletionImpl->ref,
and makes the necessary locking clear.
The only place C_AioCompleteAndSafe is used is in handling
aio_flush_async(). This could cause a missing completion.
Refs: #5919
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
Tested-by: Oliver Francke <Oliver.Francke@filoo.de>
Do not assert before the loop waiting for the thread to complete the
expected side effect. The whole point of the loop is to make sure
there is no window of opportunity for a race condition and asserting
before it means taking a useless risk. If run enough times, it will
happen.
Signed-off-by: Loic Dachary <loic@dachary.org>
Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Dan Mick <dan.mick@inktank.com>
both consented to this change via email.
Signed-off-by: Sage Weil <sage@inktank.com>
All past authors for rbd.cc have consented to relicensing from GPL to
LGPL2 via email:
---
Date: Sat, 27 Jul 2013 01:59:36 +0200
From: Sylvain Munaut <s.munaut@whatever-company.com>
Subject: Re: Ceph rbd.cc GPL -> LGPL2 license change
I hereby consent to the relicensing of any contribution I made to the
aforementioned rbd.cc file from GPL to LGPL2.1.
(I hope that'll be impressive enough, I did my best :p)
btw, tnt@246tNt.com and s.munaut@whatever-company.com are both me.
Cheers,
Sylvain
---
Date: Fri, 26 Jul 2013 17:00:48 -0700
From: Yehuda Sadeh <yehuda@inktank.com>
Subject: Re: Ceph rbd.cc GPL -> LGPL2 license change
I consent.
---
Date: Fri, 26 Jul 2013 17:02:24 -0700
From: Josh Durgin <josh.durgin@inktank.com>
Subject: Re: Ceph rbd.cc GPL -> LGPL2 license change
I consent.
---
Date: Fri, 26 Jul 2013 18:17:46 -0700
From: Stanislav Sedov <stas@freebsd.org>
Subject: Re: Ceph rbd.cc GPL -> LGPL2 license change
I consent.
Thanks for taking care of it!
---
Date: Fri, 26 Jul 2013 18:24:15 -0700
From: Colin McCabe <cmccabe@alumni.cmu.edu>
I consent.
cheers,
Colin
---
Date: Sat, 27 Jul 2013 07:08:12 +0200
From: Christian Brunner <christian@brunner-muc.de>
Subject: Re: Ceph rbd.cc GPL -> LGPL2 license change
I consent
Christian
---
Date: Sat, 27 Jul 2013 12:17:34 +0300
From: Stratos Psomadakis <psomas@grnet.gr>
Subject: Re: Ceph rbd.cc GPL -> LGPL2 license change
Hi,
I consent with the GPL -> LGL2.1 re-licensing.
Thanks
Stratos
---
Date: Sat, 27 Jul 2013 16:13:13 +0200
From: Wido den Hollander <wido@42on.com>
Subject: Re: Ceph rbd.cc GPL -> LGPL2 license change
I consent!
You have my permission to re-license the code I wrote for rbd.cc to LGPL2.1
---
Date: Sun, 11 Aug 2013 10:40:32 +0200
From: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Subject: Re: btw
Hi Sage,
I agree to switch the license of ceph_argparse.py and rbd.cc from GPL2
to LGPL2.
Regards
Danny Al-Gaaf
---
Date: Tue, 13 Aug 2013 17:15:24 -0700
From: Dan Mick <dan.mick@inktank.com>
Subject: Re: Ceph rbd.cc GPL -> LGPL2 license change
I consent to relicense any contributed code that I wrote under LGPL2.1 license.
---
...and I consent too. Drop the exception from COPYING and debian/copyright
files.
Signed-off-by: Sage Weil <sage@inktank.com>
Similar to si_t, but leaves a space between the numbers and the units. In
the degenerate case (no M, K, etc. modifier) there's simply a trailing
space. For example,
out << pretty_si_t(num) << "objects/sec";
will look pretty.
Signed-off-by: Sage Weil <sage@inktank.com>
Do not leak the message if the watcher is not registered. Also, simplify
this block.
Fixes (part of): #5949
Backport: dumpling, cuttlefish
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
If we fail to initialize, delete the handler.
Fixes (part of): #5949
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
Umount is not always done in the correct order.
For exemple in that case :
/dev/rbd1 on /myrbd
/dev/rbd2 on /myrbd/.snapshots/@GMT-2013.08.09-10.14.44
rbd2 should be umounted before rbd1
Signed-off-by: Laurent Barbe <laurent@ksperis.com>
Several targets had libglobal.la in the _LDFLAGS macro definition
when it should have been in the _LDADD macro. Remove those occurrance
and add the LIBGLOBAL_LDA macro to the targets _LDADD instead.
See related commit 71f3e56d4b
Signed-off-by: Gary Lowell <gary.lowell@inktank.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
Fixes: #5931
Backport: bobtail, cuttlefish
Fix a bad check, where we compare the wrong field. Instead of
comparing the ret code to 0, we compare the string value to 0
which generates implicit casting, hence the crash.
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Commit 6cbe0f021f added a mount_options but
in certain cases it may be blank. Fill in with the defaults, just as we
do in mount().
Backport: cuttlefish
Reviewed-by: Dan Mick <dan.mick@inktank.com>
Signed-off-by: Sage Weil <sage@inktank.com>