Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: ceph/ceph-csi
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 0330a4141c3a66282fbb21e68c71673810eabce2
Choose a base ref
..
head repository: ceph/ceph-csi
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: e94d02ae3ec5600b8129078baa3c3703276395ec
Choose a head ref
Showing with 6 additions and 6 deletions.
  1. +6 −6 internal/rbd/rbd_util.go
12 changes: 6 additions & 6 deletions internal/rbd/rbd_util.go
Original file line number Diff line number Diff line change
@@ -1586,27 +1586,27 @@ func (rv *rbdVolume) constructImageOptions(ctx context.Context) (*librbd.ImageOp

logMsg := fmt.Sprintf("setting image options on %s", rv)
if rv.DataPool != "" {
logMsg += ", data pool %s" + rv.DataPool
err = options.SetString(librbd.RbdImageOptionDataPool, rv.DataPool)
logMsg += ", data pool " + rv.DataPool
err = options.SetString(librbd.ImageOptionDataPool, rv.DataPool)
if err != nil {
return nil, fmt.Errorf("failed to set data pool: %w", err)
}
}

if rv.ImageFeatureSet != 0 {
err = options.SetUint64(librbd.RbdImageOptionFeatures, uint64(rv.ImageFeatureSet))
err = options.SetUint64(librbd.ImageOptionFeatures, uint64(rv.ImageFeatureSet))
if err != nil {
return nil, fmt.Errorf("failed to set image features: %w", err)
}
}

if rv.StripeCount != 0 {
logMsg += fmt.Sprintf(", stripe count %d, stripe unit %d", rv.StripeCount, rv.StripeUnit)
err = options.SetUint64(librbd.RbdImageOptionStripeCount, rv.StripeCount)
err = options.SetUint64(librbd.ImageOptionStripeCount, rv.StripeCount)
if err != nil {
return nil, fmt.Errorf("failed to set stripe count: %w", err)
}
err = options.SetUint64(librbd.RbdImageOptionStripeUnit, rv.StripeUnit)
err = options.SetUint64(librbd.ImageOptionStripeUnit, rv.StripeUnit)
if err != nil {
return nil, fmt.Errorf("failed to set stripe unit: %w", err)
}
@@ -1615,7 +1615,7 @@ func (rv *rbdVolume) constructImageOptions(ctx context.Context) (*librbd.ImageOp
if rv.ObjectSize != 0 {
order := uint64(math.Log2(float64(rv.ObjectSize)))
logMsg += fmt.Sprintf(", object size %d, order %d", rv.ObjectSize, order)
err = options.SetUint64(librbd.RbdImageOptionOrder, order)
err = options.SetUint64(librbd.ImageOptionOrder, order)
if err != nil {
return nil, fmt.Errorf("failed to set object size: %w", err)
}