Merge branch 'next'

This commit is contained in:
Josh Durgin 2012-11-26 10:38:57 -08:00
commit caef5acdcf
18 changed files with 87 additions and 19 deletions

View File

@ -0,0 +1,26 @@
#!/bin/sh -ex
for i in $(seq 1 10)
do
for DELAY in 0 1000
do
for OPS in 1000 10000
do
for OBJECTS in 10 50 100
do
for READS in 0.90 0.50 0.10
do
for OP_SIZE in 4096 131072 1048576
do
for MAX_DIRTY in 0 25165824
do
test_objectcacher_stress --ops $OPS --percent-read $READS --delay-ns $DELAY --objects $OBJECTS --max-op-size $OP_SIZE --client-oc-max-dirty $MAX_DIRTY > /dev/null 2>&1
done
done
done
done
done
done
done
echo OK

View File

@ -1073,11 +1073,14 @@ EXTRA_DIST += \
$(ceph_tool_gui_DATA) \
$(srcdir)/test/encoding/readable.sh \
$(srcdir)/test/encoding/check-generated.sh \
$(srcdir)/upstart/ceph.conf \
$(srcdir)/upstart/ceph-mon.conf \
$(srcdir)/upstart/ceph-mon-all.conf \
$(srcdir)/upstart/ceph-mon-all-starter.conf \
$(srcdir)/upstart/ceph-create-keys.conf \
$(srcdir)/upstart/ceph-osd.conf \
$(srcdir)/upstart/ceph-osd-all.conf \
$(srcdir)/upstart/ceph-osd-all-starter.conf \
$(srcdir)/upstart/ceph-hotplug.conf \
$(srcdir)/upstart/ceph-mds.conf \
$(srcdir)/upstart/ceph-mds-all.conf \

View File

@ -41,6 +41,11 @@ inline int sync_filesystem(int fd)
return 0;
#endif
#ifdef __NR_syncfs
if (syscall(__NR_syncfs, fd) == 0)
return 0;
#endif
#ifdef BTRFS_IOC_SYNC
if (::ioctl(fd, BTRFS_IOC_SYNC) == 0)
return 0;

View File

@ -229,8 +229,6 @@ for name in $what; do
get_conf tmp_btrfs_devs "" "btrfs devs"
if [ -n "$tmp_btrfs_devs" ]; then
fs_devs="$tmp_btrfs_devs"
else
echo No osd devs defined!
fi
fi
first_dev=`echo $fs_devs | cut '-d ' -f 1`

View File

@ -188,7 +188,9 @@ int MonMap::build_from_host_list(std::string hostlist, std::string prefix)
addrs[i].set_port(CEPH_MON_PORT);
string name = prefix;
name += n;
add(name, addrs[i]);
if (!contains(addrs[i]) &&
!contains(name))
add(name, addrs[i]);
}
return 0;
}

View File

@ -1227,7 +1227,7 @@ int FileStore::_detect_fs()
} else {
dout(0) << "mount syncfs(2) syscall supported by glibc BUT NOT the kernel" << dendl;
}
#else
#endif
#ifdef SYS_syncfs
if (syscall(SYS_syncfs, fd) == 0) {
dout(0) << "mount syscall(SYS_syncfs, fd) fully supported" << dendl;
@ -1235,11 +1235,17 @@ int FileStore::_detect_fs()
} else {
dout(0) << "mount syscall(SYS_syncfs, fd) supported by libc BUT NOT the kernel" << dendl;
}
#else
dout(0) << "mount syncfs(2) syscall not support by glibc" << dendl;
#endif
#ifdef __NR_syncfs
if (syscall(__NR_syncfs, fd) == 0) {
dout(0) << "mount syscall(__NR_syncfs, fd) fully supported" << dendl;
have_syncfs = true;
} else {
dout(0) << "mount syscall(__NR_syncfs, fd) supported by libc BUT NOT the kernel" << dendl;
}
#endif
if (!have_syncfs) {
dout(0) << "mount syncfs(2) syscall not supported" << dendl;
if (btrfs) {
dout(0) << "mount no syncfs(2), but the btrfs SYNC ioctl will suffice" << dendl;
} else if (m_filestore_fsync_flushes_journal_data) {

View File

@ -1,7 +1,7 @@
description "Ceph MDS (task to start all instances)"
start on starting ceph-mds-all
stop on runlevel [!2345]
stop on runlevel [!2345] or stopping ceph-mds-all
task

View File

@ -1,4 +1,4 @@
description "Ceph MDS (all instances)"
start on (local-filesystems and net-device-up IFACE!=lo)
stop on runlevel [!2345]
start on starting ceph
stop on stopping ceph

View File

@ -6,7 +6,7 @@ stop on runlevel [!2345] or stopping ceph-mds-all
respawn
respawn limit 5 30
limit nofile 8192
limit nofile 16384 16384
pre-start script
set -e

View File

@ -1,7 +1,7 @@
description "Ceph MON (start all instances)"
start on starting ceph-mon-all
stop on runlevel [!2345]
stop on runlevel [!2345] or stopping ceph-mon-all
task

View File

@ -1,4 +1,4 @@
description "Ceph monitor (all instances)"
start on (local-filesystems and net-device-up IFACE!=lo)
stop on runlevel [!2345]
start on starting ceph
stop on runlevel [!2345] or stopping ceph

View File

@ -6,7 +6,7 @@ stop on runlevel [!2345] or stopping ceph-mon-all
respawn
respawn limit 5 30
limit nofile 16384
limit nofile 16384 16384
pre-start script
set -e

View File

@ -0,0 +1,20 @@
description "Ceph OSD (start all instances)"
start on starting ceph-osd-all
stop on runlevel [!2345] or stopping ceph-osd-all
task
script
set -e
# TODO what's the valid charset for cluster names and osd ids?
find /var/lib/ceph/osd/ -mindepth 1 -maxdepth 1 -regextype posix-egrep -regex '.*/[a-z0-9]+-[a-z0-9._-]+' -printf '%P\n' \
| while read f; do
if [ -e "/var/lib/ceph/osd/$f/ready" ]; then
cluster="${f%%-*}"
id="${f#*-}"
initctl emit ceph-osd cluster="$cluster" id="$id"
fi
done
end script

View File

@ -0,0 +1,4 @@
description "Ceph OSD (all instances)"
start on starting ceph
stop on runlevel [!2345] or stopping ceph

View File

@ -1,12 +1,12 @@
description "Ceph OSD"
start on ceph-osd
stop on runlevel [!2345]
stop on runlevel [!2345] or stopping ceph-osd-all
respawn
respawn limit 5 30
limit nofile 8192
limit nofile 16384 16384
pre-start script
set -e

4
src/upstart/ceph.conf Normal file
View File

@ -0,0 +1,4 @@
description "Ceph"
start on (local-filesystems and net-device-up IFACE!=lo)
stop on runlevel [!2345]

View File

@ -1,7 +1,7 @@
description "Ceph radosgw (task to start all instances)"
start on starting radosgw-all
stop on runlevel [!2345]
stop on runlevel [!2345] or stopping radosgw-all
task

View File

@ -1,4 +1,4 @@
description "Ceph radosgw (all instances)"
start on (local-filesystems and net-device-up IFACE!=lo)
stop on runlevel [!2345]
start on starting ceph
stop on runlevel [!2345] or stopping ceph