Change in vdsm[master]: hsm: Fix race when checking visible devices readability

abaron at redhat.com abaron at redhat.com
Mon Nov 11 07:59:15 UTC 2013


Ayal Baron has posted comments on this change.

Change subject: hsm: Fix race when checking visible devices readability
......................................................................


Patch Set 1:

(1 comment)

....................................................
File vdsm/storage/hsm.py
Line 2009:             if visibility[guid]:
Line 2010:                 path = os.path.join('/dev/mapper', guid)
Line 2011:                 try:
Line 2012:                     mode = os.stat(path).st_mode
Line 2013:                     visibility[guid] = mode & stat.S_IRUSR != 0
this line should not be in the try clause as it cannot throw and ENOENT exception
Line 2014:                 except OSError as e:
Line 2015:                     if e.errno != errno.ENOENT:
Line 2016:                         raise
Line 2017:                     self.log.warning("device %s disappeared", path)


-- 
To view, visit http://gerrit.ovirt.org/21053
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I8628ebe2eb03f42761f8ee1faa648d75052983c1
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Ayal Baron <abaron at redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimonce at redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list