Federico Simoncelli has uploaded a new change for review.
Change subject: Improve the cleanStorageRepository method ......................................................................
Improve the cleanStorageRepository method
Change-Id: I4b1733bfa4145bbec07860be41dccafebd584fc3 --- M vdsm/storage/hsm.py 1 file changed, 46 insertions(+), 33 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/31/631/1 -- To view, visit http://gerrit.ovirt.org/631 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange Gerrit-Change-Id: I4b1733bfa4145bbec07860be41dccafebd584fc3 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Federico Simoncelli fsimonce@redhat.com
Igor Lvovsky has posted comments on this change.
Change subject: Improve the cleanStorageRepository method ......................................................................
Patch Set 1: Looks good to me, but someone else must approve
-- To view, visit http://gerrit.ovirt.org/631 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I4b1733bfa4145bbec07860be41dccafebd584fc3 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com
Ayal Baron has posted comments on this change.
Change subject: Improve the cleanStorageRepository method ......................................................................
Patch Set 1: (1 inline comment)
.................................................... File vdsm/storage/hsm.py Line 277: else: why not simplify and always treat as symlink? "isabs" probably costs about the same anyway.
-- To view, visit http://gerrit.ovirt.org/631 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I4b1733bfa4145bbec07860be41dccafebd584fc3 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Ayal Baron abaron@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com
Federico Simoncelli has posted comments on this change.
Change subject: Improve the cleanStorageRepository method ......................................................................
Patch Set 1: (1 inline comment)
.................................................... File vdsm/storage/hsm.py Line 277: else: This part is in charge of treating *only* symlinks (see line 270). Maybe you meant "simplify and treat as relative symlink". The two way of symlinking /base/foo/bar to /base/egg/bacon are:
/base/foo/bar -> ../egg/bacon /base/foo/bar -> /base/egg/bacon
To build the full path from the relative symlink we use the source dirname /base/foo and we add the target (relative path) ../egg/bacon obtaining: /base/foo/../egg/bacon. Then abspath normalizes the path to /base/egg/bacon. If we use the same algorithm for a symlink absolute path we obtain: /base/foo/base/egg/bacon, which is wrong.
-- To view, visit http://gerrit.ovirt.org/631 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I4b1733bfa4145bbec07860be41dccafebd584fc3 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Ayal Baron abaron@redhat.com Gerrit-Reviewer: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com
Federico Simoncelli has posted comments on this change.
Change subject: Improve the cleanStorageRepository method ......................................................................
Patch Set 1: (1 inline comment)
.................................................... File vdsm/storage/hsm.py Line 277: else: I just saw what you probably meant: "os.path.join(a, *p): Join two or more pathname components, inserting '/' as needed. If any component is an absolute path, all previous path components will be discarded." Was that it?
-- To view, visit http://gerrit.ovirt.org/631 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I4b1733bfa4145bbec07860be41dccafebd584fc3 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Ayal Baron abaron@redhat.com Gerrit-Reviewer: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com
Igor Lvovsky has posted comments on this change.
Change subject: Improve the cleanStorageRepository method ......................................................................
Patch Set 2: Looks good to me, but someone else must approve
-- To view, visit http://gerrit.ovirt.org/631 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I4b1733bfa4145bbec07860be41dccafebd584fc3 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Ayal Baron abaron@redhat.com Gerrit-Reviewer: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com
Federico Simoncelli has posted comments on this change.
Change subject: Improve the cleanStorageRepository method ......................................................................
Patch Set 2: Verified
-- To view, visit http://gerrit.ovirt.org/631 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I4b1733bfa4145bbec07860be41dccafebd584fc3 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Ayal Baron abaron@redhat.com Gerrit-Reviewer: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com
Dan Kenigsberg has posted comments on this change.
Change subject: Improve the cleanStorageRepository method ......................................................................
Patch Set 2: Looks good to me, approved
I wish your commit message explained the improvement (much of the diff is style improvements...)
-- To view, visit http://gerrit.ovirt.org/631 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I4b1733bfa4145bbec07860be41dccafebd584fc3 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Ayal Baron abaron@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com
Dan Kenigsberg has submitted this change and it was merged.
Change subject: Improve the cleanStorageRepository method ......................................................................
Improve the cleanStorageRepository method
Change-Id: I4b1733bfa4145bbec07860be41dccafebd584fc3 --- M vdsm/storage/hsm.py 1 file changed, 42 insertions(+), 31 deletions(-)
Approvals: Federico Simoncelli: Verified Dan Kenigsberg: Looks good to me, approved Igor Lvovsky: Looks good to me, but someone else must approve
-- To view, visit http://gerrit.ovirt.org/631 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: merged Gerrit-Change-Id: I4b1733bfa4145bbec07860be41dccafebd584fc3 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Ayal Baron abaron@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com
vdsm-patches@lists.fedorahosted.org