We don't want to clone_range from clones too many times.
For now, just skip the cloning if there are too many holes.
Fixes: #5985
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
cls/hello: hello, world rados class
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Loic Dachary <loic@dachary.com>
Class methods are marked with RD and WR to help the OSD decide when we need
to flush objects or require certain permissions. Ensure that methods do
not step outside their advertised capabilities by keeping a counter of rd
and wr ops we perform in do_osd_ops() and making sure that class methods,
and any ops the indirectly call, do not break the rules.
Signed-off-by: Sage Weil <sage@inktank.com>
This method is problematic because it both writes/mutates and returns data,
which means that an untimely client disconnect or peering event will result
in a success to the client with no payload.
It has not been used since v0.52 (18054ba46f)
which is pre-bobtail; so this change breaks compatibility with pre-bobtail
librbd clients (at least for image creation).
Signed-off-by: Sage Weil <sage@inktank.com>
We were somewhat inadvertantly returning a data payload for write
operations. This was a side-effect of the OpContext::ops field being a
reference to MOSDOp::ops: the return data would end up there, and then
the MOSDOpReply ctor would copy it.
Fix this by breaking the ref, and making the do_op() logic also claim
return result data for error values (so that errors can return data to the
caller).
Signed-off-by: Sage Weil <sage@inktank.com>
common/Preforker.h: In member function 'void Preforker::daemonize()':
common/Preforker.h:97:40: warning: ignoring return value of 'ssize_t write(int, const void*, size_t)', declared with attribute warn_unused_result [-Wunused-result]
Signed-off-by: Sage Weil <sage@inktank.com>
Fix by restructuring code to hoist common code and have only one
place where admin_socket is actually called.
Signed-off-by: Dan Mick <dan.mick@inktank.com>
'osd crush set' should only be used to update already existing items on
the map whereas 'osd crush add' should be able to 'add and update' items.
Considering at that point we are effectively adding a new item to the
crush map, use 'add' instead of 'set'.
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
Bootstrap doesn't use or need this; the crush update happens when the osd
starts up (see init-ceph or upstart/ceph-osd.conf).
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
The std::copy construct leaves a trailing separator character, which breaks
parsing for booleans (among other things) and probably mangles everything
else too.
Backport: dumpling
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
The std::copy construct leaves a trailing separator character, which breaks
parsing for booleans (among other things) and probably mangles everything
else too.
Backport: dumpling
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
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>