From 8639f24374bd7648505a175c80943503b6088d64 Mon Sep 17 00:00:00 2001 From: markturansky Date: Mon, 27 Jul 2015 16:33:22 -0400 Subject: [PATCH] rebased and updated --- pkg/volume/gce_pd/gce_pd.go | 4 ++-- pkg/volume/rbd/disk_manager.go | 6 +----- pkg/volume/rbd/rbd_util.go | 10 +--------- 3 files changed, 4 insertions(+), 16 deletions(-) diff --git a/pkg/volume/gce_pd/gce_pd.go b/pkg/volume/gce_pd/gce_pd.go index 8969893592..8ef2dbeb30 100644 --- a/pkg/volume/gce_pd/gce_pd.go +++ b/pkg/volume/gce_pd/gce_pd.go @@ -229,8 +229,8 @@ func (b *gcePersistentDiskBuilder) SetUpAt(dir string) error { return nil } -func (pd *gcePersistentDisk) IsReadOnly() bool { - return pd.readOnly +func (b *gcePersistentDiskBuilder) IsReadOnly() bool { + return b.readOnly } func makeGlobalPDName(host volume.VolumeHost, devName string) string { diff --git a/pkg/volume/rbd/disk_manager.go b/pkg/volume/rbd/disk_manager.go index ec000e86cc..d376957ae7 100644 --- a/pkg/volume/rbd/disk_manager.go +++ b/pkg/volume/rbd/disk_manager.go @@ -62,11 +62,7 @@ func diskSetUp(manager diskManager, b rbdBuilder, volPath string, mounter mount. } // Perform a bind mount to the full path to allow duplicate mounts of the same disk. options := []string{"bind"} -<<<<<<< HEAD - if b.ReadOnly { -======= - if disk.readOnly { ->>>>>>> rebased and updated to latest + if b.IsReadOnly() { options = append(options, "ro") } err = mounter.Mount(globalPDPath, volPath, "", options) diff --git a/pkg/volume/rbd/rbd_util.go b/pkg/volume/rbd/rbd_util.go index 34d3eed769..545a4b2abd 100644 --- a/pkg/volume/rbd/rbd_util.go +++ b/pkg/volume/rbd/rbd_util.go @@ -161,11 +161,7 @@ func (util *RBDUtil) loadRBD(rbd *rbd, mnt string) error { func (util *RBDUtil) fencing(b rbdBuilder) error { // no need to fence readOnly -<<<<<<< HEAD - if b.ReadOnly { -======= - if rbd.readOnly { ->>>>>>> rebased and updated to latest + if b.IsReadOnly() { return nil } return util.rbdLock(b, true) @@ -173,11 +169,7 @@ func (util *RBDUtil) fencing(b rbdBuilder) error { func (util *RBDUtil) defencing(c rbdCleaner) error { // no need to fence readOnly -<<<<<<< HEAD if c.ReadOnly { -======= - if rbd.readOnly { ->>>>>>> rebased and updated to latest return nil }