-
Notifications
You must be signed in to change notification settings - Fork 82
Refactoring for Intelligent Volume Provisioning #782
Conversation
glusterd2/volume/volume-utils.go
Outdated
func GetRedundancy(disperse uint) int { | ||
var temp, l, mask uint | ||
temp = disperse | ||
l = 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no need to set it explicitly to zero
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This func is moved from volume-create-disperse.go
to utils. Implementation not changed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed.
Note for reviewers:
|
pkg/api/brickutils.go
Outdated
"github.com/pborman/uuid" | ||
) | ||
|
||
func nodesFromVolumeCreateReq(req *api.VolCreateReq) ([]uuid.UUID, error) { | ||
// NodesFromVolumeCreateReq extracts the list of nodes from Volume Create request | ||
func NodesFromVolumeCreateReq(req *VolCreateReq) ([]uuid.UUID, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can make this as a method of VolCreateReq structure and then use it as req.Nodes()
pkg/api/brickutils.go
Outdated
@@ -26,7 +25,8 @@ func nodesFromVolumeCreateReq(req *api.VolCreateReq) ([]uuid.UUID, error) { | |||
return nodes, nil | |||
} | |||
|
|||
func nodesFromVolumeExpandReq(req *api.VolExpandReq) ([]uuid.UUID, error) { | |||
// NodesFromVolumeExpandReq extracts list of Peer IDs from Volume Expand request | |||
func NodesFromVolumeExpandReq(req *VolExpandReq) ([]uuid.UUID, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here.
@prashanthpai @Madhu-1 addressed review comments, please review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
plugins/device/deviceutils/fstab.go
Outdated
if err != nil { | ||
return nil, err | ||
} | ||
defer lockfile.Close() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The file is closed when the function returns. Doesn't closing file descriptor implicitly unlock ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, will remove this
Added more device utils and `fstab` handling library Updates: #466 Signed-off-by: Aravinda VK <avishwan@redhat.com>
retest this please |
1 similar comment
retest this please |
Added more device utils and
fstab
handling libraryUpdates: #466
Signed-off-by: Aravinda VK avishwan@redhat.com