]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mkcephfs: Only create OSD journal dir if we have a journal.
authorTommi Virtanen <tommi.virtanen@dreamhost.com>
Tue, 5 Jul 2011 21:56:51 +0000 (14:56 -0700)
committerTommi Virtanen <tommi.virtanen@dreamhost.com>
Tue, 5 Jul 2011 21:57:10 +0000 (14:57 -0700)
Thanks to huang jun <hjwsm1989@gmail.com> for finding the bug.

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
src/mkcephfs.in

index f266843b1535e92cd8f00abc3b2d6fb1d9769858..d4d5092bf9386efe8f70534b3e09ae98ba6f87da 100644 (file)
@@ -299,7 +299,9 @@ if [ -n "$prepareosdfs" ]; then
     
     test -d $osd_data || mkdir -p $osd_data
 
-    [ -n "$osd_journal" ] && test -d $osd_journal || mkdir -p `dirname $osd_journal`
+    if [ -n "$osd_journal" ]; then
+       test -d $osd_journal || mkdir -p `dirname $osd_journal`
+    fi
 
     umount $btrfs_path || true
     for f in $btrfs_devs ; do