Greg Padgett has posted comments on this change.
Change subject: broker: use direct I/O to read metadata
......................................................................
Patch Set 1:
(2 comments)
....................................................
File ovirt_hosted_engine_ha/broker/storage_broker.py
Line 62: # Use direct I/O if possible, to avoid the local filesystem
cache
Line 63: # from hiding metadata file updates from other hosts. For
NFS, we
Line 64: # don't have to worry about alignment; see man open(2) for
details.
Line 65: # TODO it would be better if this was configurable
Line 66: direct_flag = os.O_DIRECT if constants.USE_DIRECT_IO else 0
Done - thanks for the reference
Line 67:
Line 68: bs = constants.HOST_SEGMENT_BYTES
Line 69: # TODO it would be better if this was configurable
Line 70: read_size = bs * (constants.MAX_HOST_ID_SCAN + 1)
Line 79: path, exc_info=True)
Line 80: raise RequestError("failed to read metadata:
{0}".format(str(e)))
Line 81:
Line 82: return dict(((i / bs, data[i:i+bs])
Line 83: for i in xrange(0, len(data), bs)
Done
Line 84: if data[i] != '\0'))
Line 85:
Line 86: def put_stats(self, storage_dir, service_type, host_id, data):
Line 87: """
--
To view, visit http://gerrit.ovirt.org/19760
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I296977000ffa3fff3f9391f93a8b4f3f519eae4e
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-hosted-engine-ha
Gerrit-Branch: master
Gerrit-Owner: Greg Padgett <[email protected]>
Gerrit-Reviewer: Doron Fediuck <[email protected]>
Gerrit-Reviewer: Federico Simoncelli <[email protected]>
Gerrit-Reviewer: Greg Padgett <[email protected]>
Gerrit-Reviewer: Martin Sivák <[email protected]>
Gerrit-Reviewer: Sandro Bonazzola <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches