At http://bazaar.launchpad.net/~jameinel/bzr/2.4-fdatasync-ENOTSUP-1075108
------------------------------------------------------------ revno: 6075 revision-id: j...@arbash-meinel.com-20130523081058-hceputwy9u0tckjg parent: j...@arbash-meinel.com-20121105120539-ri8f1r6jpzt7oz1o committer: John Arbash Meinel <j...@arbash-meinel.com> branch nick: 2.4-fdatasync-ENOTSUP-1075108 timestamp: Thu 2013-05-23 09:10:58 +0100 message: only squelch known errors per vila.
=== modified file 'bzrlib/osutils.py' --- a/bzrlib/osutils.py 2012-11-05 12:05:39 +0000 +++ b/bzrlib/osutils.py 2013-05-23 08:10:58 +0000 @@ -2522,6 +2522,9 @@ else: is_local_pid_dead = _posix_is_local_pid_dead +_fdatasync_ignored = [getattr(errno, name) + for name in ['EAGAIN', 'EINTR', 'ENOTSUP', 'EACCES'] + if getattr(errno, name, None) is not None] def fdatasync(fileno): """Flush file contents to disk if possible. @@ -2539,6 +2542,8 @@ # and reduce the chance of corruption-on-powerloss situations. It # is not a mandatory call, so it is ok to suppress failures. trace.mutter("ignoring error calling fdatasync: %s" % (e,)) + if getattr(e, 'errno', None) not in _fdatasync_ignored: + raise def ensure_empty_directory_exists(path, exception_class):
-- bazaar-commits mailing list bazaar-commits@lists.canonical.com https://lists.ubuntu.com/mailman/listinfo/bazaar-commits