Merge remote-tracking branch 'gh/next'

This commit is contained in:
Sage Weil 2014-07-16 15:28:10 -07:00
commit bf252c8df9
3 changed files with 27 additions and 8 deletions

View File

@ -661,6 +661,12 @@ OPTION(filestore_btrfs_clone_range, OPT_BOOL, true)
OPTION(filestore_zfs_snap, OPT_BOOL, false) // zfsonlinux is still unstable
OPTION(filestore_fsync_flushes_journal_data, OPT_BOOL, false)
OPTION(filestore_fiemap, OPT_BOOL, false) // (try to) use fiemap
// (try to) use extsize for alloc hint
// WARNING: extsize seems to trigger data corruption in xfs -- that is why it is
// off by default, see bug #8830
OPTION(filestore_xfs_extsize, OPT_BOOL, false)
OPTION(filestore_journal_parallel, OPT_BOOL, false)
OPTION(filestore_journal_writeahead, OPT_BOOL, false)
OPTION(filestore_journal_trailing, OPT_BOOL, false)

View File

@ -44,6 +44,10 @@ test -f $LIBDIR/ceph_common.sh || exit 0
EXIT_STATUS=0
# detect systemd
SYSTEMD=0
grep -qs systemd /proc/1/comm && SYSTEMD=1
signal_daemon() {
name=$1
daemon=$2
@ -272,7 +276,11 @@ for name in $what; do
[ -n "$wrap" ] && runmode="-f &" && runarg="-f"
[ -n "$max_open_files" ] && files="ulimit -n $max_open_files;"
cmd="$files $wrap $cmd --cluster $cluster $runmode"
if [ $SYSTEMD -eq 1 ]; then
cmd="systemd-run -r bash -c '$files $cmd --cluster $cluster -f'"
else
cmd="$files $wrap $cmd --cluster $cluster $runmode"
fi
if [ $dofsmount -eq 1 ] && [ -n "$fs_devs" ]; then
get_conf pre_mount "true" "pre mount command"

View File

@ -103,15 +103,20 @@ int XfsFileStoreBackend::detect_features()
goto out_close;
}
ret = set_extsize(fd, 1U << 15); // a few pages
if (ret) {
ret = 0;
dout(0) << "detect_feature: failed to set test file extsize, assuming extsize is NOT supported" << dendl;
goto out_close;
if (g_conf->filestore_xfs_extsize) {
ret = set_extsize(fd, 1U << 15); // a few pages
if (ret) {
ret = 0;
dout(0) << "detect_feature: failed to set test file extsize, assuming extsize is NOT supported" << dendl;
goto out_close;
} else {
dout(0) << "detect_feature: extsize is supported" << dendl;
m_has_extsize = true;
}
} else {
dout(0) << "detect_feature: extsize is disabled by conf" << dendl;
}
dout(0) << "detect_feature: extsize is supported" << dendl;
m_has_extsize = true;
out_close:
TEMP_FAILURE_RETRY(::close(fd));