Skip to content

Commit

Permalink
Merge branch 'next'
Browse files Browse the repository at this point in the history
  • Loading branch information
glowell2 committed May 7, 2013
2 parents 9d85d67 + 237f3f1 commit e5b25bd
Show file tree
Hide file tree
Showing 11 changed files with 41 additions and 19 deletions.
1 change: 1 addition & 0 deletions ceph.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ Requires: libcephfs1 = %{version}-%{release}
Requires: python
Requires: python-argparse
Requires: python-lockfile
Requires: xfsprogs
Requires: cryptsetup
Requires: parted
Requires: util-linux
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ AC_PREREQ(2.59)
# VERSION define is not used by the code. It gets a version string
# from 'git describe'; see src/ceph_ver.[ch]

AC_INIT([ceph], [0.60], [[email protected]])
AC_INIT([ceph], [0.61], [[email protected]])

# Create release string. Used with VERSION for RPMs.
RPM_RELEASE=0
Expand Down
6 changes: 6 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
ceph (0.61-1) precise; urgency=low

* New upstream release

-- Gary Lowell <[email protected]> Mon, 06 May 2013 13:18:43 -0700

ceph (0.60-1) precise; urgency=low

* New upstream release
Expand Down
15 changes: 8 additions & 7 deletions src/ceph-disk
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ if LOG_NAME == '__main__':
LOG_NAME = os.path.basename(sys.argv[0])
LOG = logging.getLogger(LOG_NAME)

lock = lockfile.FileLock('/var/lib/ceph/tmp/ceph-disk.lock')
prepare_lock = lockfile.FileLock('/var/lib/ceph/tmp/ceph-disk.prepare.lock')
activate_lock = lockfile.FileLock('/var/lib/ceph/tmp/ceph-disk.activate.lock')

###### exceptions ########

Expand Down Expand Up @@ -1060,7 +1061,7 @@ def main_prepare(args):
osd_dm_keypath = None

try:
lock.acquire()
prepare_lock.acquire()
if not os.path.exists(args.data):
raise Error('data path does not exist', args.data)

Expand Down Expand Up @@ -1189,14 +1190,14 @@ def main_prepare(args):
)
else:
raise Error('not a dir or block device', args.data)
lock.release()
prepare_lock.release()

except Error as e:
if journal_dm_keypath:
os.unlink(journal_dm_keypath)
if osd_dm_keypath:
os.unlink(osd_dm_keypath)
lock.release()
prepare_lock.release()
raise e


Expand Down Expand Up @@ -1591,7 +1592,7 @@ def main_activate(args):
if not os.path.exists(args.path):
raise Error('%s does not exist', args.path)

lock.acquire()
activate_lock.acquire()
try:
mode = os.stat(args.path).st_mode
if stat.S_ISBLK(mode):
Expand All @@ -1613,10 +1614,10 @@ def main_activate(args):
cluster=cluster,
osd_id=osd_id,
)
lock.release()
activate_lock.release()

except:
lock.release()
activate_lock.release()



Expand Down
4 changes: 2 additions & 2 deletions src/ceph_mon.cc
Original file line number Diff line number Diff line change
Expand Up @@ -283,9 +283,9 @@ int main(int argc, const char **argv)
return prefork.parent_wait();
}
global_init_postfork(g_ceph_context, 0);
common_init_finish(g_ceph_context);
global_init_chdir(g_ceph_context);
}
common_init_finish(g_ceph_context);
global_init_chdir(g_ceph_context);

{
Monitor::StoreConverter converter(g_conf->mon_data);
Expand Down
1 change: 1 addition & 0 deletions src/common/config_opts.h
Original file line number Diff line number Diff line change
Expand Up @@ -514,6 +514,7 @@ OPTION(filestore_replica_fadvise, OPT_BOOL, true)
OPTION(filestore_debug_verify_split, OPT_BOOL, false)
OPTION(journal_dio, OPT_BOOL, true)
OPTION(journal_aio, OPT_BOOL, true)
OPTION(journal_force_aio, OPT_BOOL, false)

// max bytes to search ahead in journal searching for corruption
OPTION(journal_max_corrupt_search, OPT_U64, 10<<20)
Expand Down
10 changes: 8 additions & 2 deletions src/mon/Monitor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2287,8 +2287,14 @@ void Monitor::_mon_status(ostream& ss)
jf.close_section();

if (is_synchronizing()) {
jf.dump_stream("sync_leader") << sync_leader->entity;
jf.dump_stream("sync_provider") << sync_provider->entity;
if (sync_leader)
jf.dump_stream("sync_leader") << sync_leader->entity;
else
jf.dump_string("sync_leader", "");
if (sync_provider)
jf.dump_stream("sync_provider") << sync_provider->entity;
else
jf.dump_string("sync_provider", "");
}

jf.open_object_section("monmap");
Expand Down
10 changes: 8 additions & 2 deletions src/os/FileJournal.cc
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,16 @@ int FileJournal::_open(bool forwrite, bool create)
goto out_fd;
}

if (S_ISBLK(st.st_mode))
if (S_ISBLK(st.st_mode)) {
ret = _open_block_device();
else
} else {
if (aio && !force_aio) {
derr << "FileJournal::_open: disabling aio for non-block journal. Use "
<< "journal_force_aio to force use of aio anyway" << dendl;
aio = false;
}
ret = _open_file(st.st_size, st.st_blksize, create);
}

if (ret)
goto out_fd;
Expand Down
6 changes: 3 additions & 3 deletions src/os/FileJournal.h
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ class FileJournal : public Journal {
off64_t max_size;
size_t block_size;
bool is_bdev;
bool directio, aio;
bool directio, aio, force_aio;
bool must_write_header;
off64_t write_pos; // byte where the next entry to be written will go
off64_t read_pos; //
Expand Down Expand Up @@ -351,7 +351,7 @@ class FileJournal : public Journal {
}

public:
FileJournal(uuid_d fsid, Finisher *fin, Cond *sync_cond, const char *f, bool dio=false, bool ai=true) :
FileJournal(uuid_d fsid, Finisher *fin, Cond *sync_cond, const char *f, bool dio=false, bool ai=true, bool faio=false) :
Journal(fsid, fin, sync_cond),
finisher_lock("FileJournal::finisher_lock", false, true, false, g_ceph_context),
journaled_seq(0),
Expand All @@ -362,7 +362,7 @@ class FileJournal : public Journal {
fn(f),
zero_buf(NULL),
max_size(0), block_size(0),
is_bdev(false), directio(dio), aio(ai),
is_bdev(false), directio(dio), aio(ai), force_aio(faio),
must_write_header(false),
write_pos(0), read_pos(0),
#ifdef HAVE_LIBAIO
Expand Down
3 changes: 2 additions & 1 deletion src/os/FileStore.cc
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,7 @@ FileStore::FileStore(const std::string &base, const std::string &jdev, const cha
do_update(do_update),
m_journal_dio(g_conf->journal_dio),
m_journal_aio(g_conf->journal_aio),
m_journal_force_aio(g_conf->journal_force_aio),
m_osd_rollback_to_cluster_snap(g_conf->osd_rollback_to_cluster_snap),
m_osd_use_stale_snap(g_conf->osd_use_stale_snap),
m_filestore_queue_max_ops(g_conf->filestore_queue_max_ops),
Expand Down Expand Up @@ -561,7 +562,7 @@ int FileStore::open_journal()
if (journalpath.length()) {
dout(10) << "open_journal at " << journalpath << dendl;
journal = new FileJournal(fsid, &finisher, &sync_cond, journalpath.c_str(),
m_journal_dio, m_journal_aio);
m_journal_dio, m_journal_aio, m_journal_force_aio);
if (journal)
journal->logger = logger;
}
Expand Down
2 changes: 1 addition & 1 deletion src/os/FileStore.h
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,7 @@ class FileStore : public JournalingObjectStore,
bool m_filestore_fail_eio;
bool m_filestore_replica_fadvise;
int do_update;
bool m_journal_dio, m_journal_aio;
bool m_journal_dio, m_journal_aio, m_journal_force_aio;
std::string m_osd_rollback_to_cluster_snap;
bool m_osd_use_stale_snap;
int m_filestore_queue_max_ops;
Expand Down

0 comments on commit e5b25bd

Please sign in to comment.