]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-disk: fix mount options passed to move_mount
authorSage Weil <sage@inktank.com>
Sat, 10 Aug 2013 01:02:32 +0000 (18:02 -0700)
committerSage Weil <sage@inktank.com>
Sat, 10 Aug 2013 04:24:08 +0000 (21:24 -0700)
Commit 6cbe0f021f62b3ebd5f68fcc01a12fde6f08cff5 added a mount_options but
in certain cases it may be blank.  Fill in with the defaults, just as we
do in mount().

Backport: cuttlefish
Reviewed-by: Dan Mick <dan.mick@inktank.com>
Signed-off-by: Sage Weil <sage@inktank.com>
src/ceph-disk

index e34faaf0689aad90e279d2df86faef2ad1f7f49d..0ecfdf0207365be1ecf9e78bc3c5c4417a1fb176 100755 (executable)
@@ -1345,6 +1345,7 @@ def move_mount(
     path,
     cluster,
     osd_id,
+    fstype,
     mount_options,
     ):
     LOG.debug('Moving mount to final location...')
@@ -1355,6 +1356,10 @@ def move_mount(
         )
     maybe_mkdir(osd_data)
 
+    # pick best-of-breed mount options based on fs type
+    if mount_options is None:
+        mount_options = MOUNT_OPTIONS.get(fstype, '')
+
     # we really want to mount --move, but that is not supported when
     # the parent mount is shared, as it is by default on RH, Fedora,
     # and probably others.  Also, --bind doesn't properly manipulate
@@ -1528,6 +1533,7 @@ def mount_activate(
                 path=path,
                 cluster=cluster,
                 osd_id=osd_id,
+                fstype=fstype,
                 mount_options=mount_options,
                 )
         return (cluster, osd_id)