diff -r 2294594fbe6c Modules/posixmodule.c --- a/Modules/posixmodule.c Mon Aug 12 13:29:11 2013 -0400 +++ b/Modules/posixmodule.c Mon Aug 12 14:23:31 2013 -0400 @@ -10252,6 +10252,17 @@ goto exit; } + /* + * On Linux using ZFS (native), if attr is >128 bytes, + * and we ask for 128 bytes, we successfully get 128 bytes + * and no error is indicated. So we always retry if we + * got exactly what we asked for. + */ + if (result == buffer_size && buffer_size != XATTR_SIZE_MAX) { + Py_DECREF(buffer); + continue; + } + if (result != buffer_size) { /* Can only shrink. */ _PyBytes_Resize(&buffer, result);