From 31d17fc641a8566b6debc77fca7e8d54891143a4 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Wed, 27 May 2009 12:07:41 -0700 Subject: [PATCH] cosd: journal to a dedicated disk --- src/cosd.ceph.conf | 21 ++++++++++++++------- src/os/FileJournal.cc | 9 +++++---- 2 files changed, 19 insertions(+), 11 deletions(-) diff --git a/src/cosd.ceph.conf b/src/cosd.ceph.conf index d6114379ba1de..889c6a9fc88f1 100644 --- a/src/cosd.ceph.conf +++ b/src/cosd.ceph.conf @@ -39,8 +39,17 @@ debug ms = 1 debug osd = 20 debug filestore = 20 + debug journal = 20 log dir = /data/cosd$id osd data = /mnt/osd$id + btrfs options = "flushoncommit" + +; osd journal = /mnt/osd$id/journal +; osd journal size = 1000 + osd journal = "/dev/disk/by-path/pci-0000:05:02.0-scsi-6:0:0:0" + filestore max sync interval = 5 + +; btrfs devs = "/dev/disk/by-path/pci-0000:05:01.0-scsi-2:0:0:0" btrfs devs = "/dev/disk/by-path/pci-0000:05:01.0-scsi-2:0:0:0 \ /dev/disk/by-path/pci-0000:05:01.0-scsi-3:0:0:0 \ /dev/disk/by-path/pci-0000:05:01.0-scsi-4:0:0:0 \ @@ -52,8 +61,8 @@ /dev/disk/by-path/pci-0000:05:02.0-scsi-2:0:0:0 \ /dev/disk/by-path/pci-0000:05:02.0-scsi-3:0:0:0 \ /dev/disk/by-path/pci-0000:05:02.0-scsi-4:0:0:0 \ - /dev/disk/by-path/pci-0000:05:02.0-scsi-5:0:0:0 \ - /dev/disk/by-path/pci-0000:05:02.0-scsi-6:0:0:0" + /dev/disk/by-path/pci-0000:05:02.0-scsi-5:0:0:0" + ; valgrind = "--tool=memcheck --log-file=/data/cosd$id/v.osd$id" [osd0] @@ -72,12 +81,10 @@ /dev/disk/by-path/pci-0000:05:02.0-scsi-2:0:0:0 \ /dev/disk/by-path/pci-0000:05:02.0-scsi-3:0:0:0 \ /dev/disk/by-path/pci-0000:05:02.0-scsi-4:0:0:0 \ - /dev/disk/by-path/pci-0000:05:02.0-scsi-5:0:0:0 \ - /dev/disk/by-path/pci-0000:05:02.0-scsi-6:0:0:0" +; /dev/disk/by-path/pci-0000:05:02.0-scsi-5:0:0:0" -;[osd3] -; host = cosd3 -; btrfs devs = "/dev/disk/by-path/pci-0000:05:01.0-scsi-3:0:0:0 /dev/disk/by-path/pci-0000:05:01.0-scsi-4:0:0:0 /dev/disk/by-path/pci-0000:05:01.0-scsi-5:0:0:0 /dev/disk/by-path/pci-0000:05:01.0-scsi-6:0:0:0 /dev/disk/by-path/pci-0000:05:01.0-scsi-7:0:0:0 /dev/disk/by-path/pci-0000:05:02.0-scsi-0:0:0:0 /dev/disk/by-path/pci-0000:05:02.0-scsi-1:0:0:0 /dev/disk/by-path/pci-0000:05:02.0-scsi-2:0:0:0 /dev/disk/by-path/pci-0000:05:02.0-scsi-3:0:0:0 /dev/disk/by-path/pci-0000:05:02.0-scsi-4:0:0:0 /dev/disk/by-path/pci-0000:05:02.0-scsi-5:0:0:0 /dev/disk/by-path/pci-0000:05:02.0-scsi-6:0:0:0" +[osd3] + host = cosd3 [osd4] host = cosd4 [osd5] diff --git a/src/os/FileJournal.cc b/src/os/FileJournal.cc index 7d1e89a2cbf2b..eeafd32fed6e7 100644 --- a/src/os/FileJournal.cc +++ b/src/os/FileJournal.cc @@ -499,14 +499,15 @@ void FileJournal::do_write(bufferlist& bl) << dendl; pos += (*it).length(); } + if (!directio) { + dout(20) << "do_write fsync start" << dendl; #ifdef DARWIN - if (!directio) ::fsync(fd); #else - if (!directio) ::fdatasync(fd); #endif - + dout(20) << "do_write fsync finish" << dendl; + } write_lock.Lock(); @@ -521,7 +522,7 @@ void FileJournal::do_write(bufferlist& bl) dout(10) << "do_write NOT queueing finisher seq " << writing_seq.front() << ", full_commit_seq|full_restart_seq" << dendl; } else { - dout(20) << "do_write doing finisher queue " << writing_fin << dendl; + dout(20) << "do_write queueing finishers " << writing_fin << dendl; writing_seq.clear(); finisher->queue(writing_fin); } -- 2.39.5