[issue21679] Prevent extraneous fstat during open()

2015-11-24 Thread Martin Panter
Martin Panter added the comment: The change made here no longer tolerates fstat() returning an error, which seems to be the cause of Issue 25717. -- nosy: +martin.panter ___ Python tracker

[issue21679] Prevent extraneous fstat during open()

2014-06-29 Thread Antoine Pitrou
Antoine Pitrou added the comment: Thank you very much. I've committed the patch to the default branch (I've just moved the _blksize test to a separate method). -- resolution: -> fixed stage: -> resolved status: open -> closed versions: -Python 3.4 ___

[issue21679] Prevent extraneous fstat during open()

2014-06-29 Thread Roundup Robot
Roundup Robot added the comment: New changeset 3b5279b5bfd1 by Antoine Pitrou in branch 'default': Issue #21679: Prevent extraneous fstat() calls during open(). Patch by Bohuslav Kabrda. http://hg.python.org/cpython/rev/3b5279b5bfd1 -- nosy: +python-dev ___

[issue21679] Prevent extraneous fstat during open()

2014-06-20 Thread Bohuslav "Slavek" Kabrda
Bohuslav "Slavek" Kabrda added the comment: I'm attaching fourth version of the patch. Changes: - fileio's _blksize member is now of type T_UINT - extended test_fileio.AutoFileTests.testAttributes to also test _blksize value -- Added file: http://bugs.python.org/file35702/python3-remove

[issue21679] Prevent extraneous fstat during open()

2014-06-17 Thread Bohuslav "Slavek" Kabrda
Bohuslav "Slavek" Kabrda added the comment: Thanks, Antoine. So, is there anything else that should be done about the patch so that it gets accepted? -- ___ Python tracker ___ _

[issue21679] Prevent extraneous fstat during open()

2014-06-16 Thread Josh Rosenberg
Changes by Josh Rosenberg : -- nosy: +josh.rosenberg ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue21679] Prevent extraneous fstat during open()

2014-06-16 Thread Antoine Pitrou
Antoine Pitrou added the comment: I think it's ok to keep the block size an int for now. It would be surprising for a block size to be more than 2 GB, IMO. -- ___ Python tracker ___

[issue21679] Prevent extraneous fstat during open()

2014-06-16 Thread Bohuslav "Slavek" Kabrda
Bohuslav "Slavek" Kabrda added the comment: So, as pointed out by haypo, blksize_t is actually signed long on Linux. This means that my patch (as well as the current code) is not right. Both with and without my patch, io_open function uses "int" to store blksize_t and it also passes it to one o

[issue21679] Prevent extraneous fstat during open()

2014-06-10 Thread Bohuslav "Slavek" Kabrda
Bohuslav "Slavek" Kabrda added the comment: Again, thanks for the review. It's true that HAVE_FSTAT can be defined without stat structure containing st_blksize. I added an ifdef HAVE_STRUCT_STAT_ST_BLKSIZE for that. Attaching third version of the patch, hopefully everything will be ok now. --

[issue21679] Prevent extraneous fstat during open()

2014-06-09 Thread Bohuslav "Slavek" Kabrda
Bohuslav "Slavek" Kabrda added the comment: Thanks a lot for the code review! I'm attaching a revised version of the patch. Fixes I made: - added check whether PyLong_AsLong returned an error - removed "ADD_INTERNED(_blksize)" and "PyObject *_PyIO_str__blksize;" - I noticed that these are only

[issue21679] Prevent extraneous fstat during open()

2014-06-06 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +benjamin.peterson, pitrou, serhiy.storchaka, stutzbach ___ Python tracker ___ ___ Python-bugs-

[issue21679] Prevent extraneous fstat during open()

2014-06-06 Thread Bohuslav "Slavek" Kabrda
New submission from Bohuslav "Slavek" Kabrda: Hi, with Python 3.3/3.4, I noticed that there are lots of syscalls on open() - I noticed 2x fstat, 2x ioctl and 2x lseek. This is not noticable when working with small amounts of files on local filesystem, but if working with files via NSF or if wo