ftell() fails on files in shared folders

Yuri Gribov tetra2005@googlemail.com
Tue Mar 20 20:12:00 GMT 2012


> First of all, there's a bug in your testcase.

Nice catch. With fixed code O_RDWR and O_WRONLY no longer influence
the result but the bug still remains.

> What filesystem is your remote FS?  Please run

Done. All nodes seem to have same volume attributes.

> You could also run the testcase under strace, like this:

Done, here's the relevant part: for local (successful) run:
  write: write(3, 0x402080, 8)
  write: 8 = write(3, 0x402080, 8)
  fhandler_base::lseek: setting file pointer to 8
  lseek64: 8 = lseek(0, 3, 0)
  fhandler_base::lseek: setting file pointer to 8
  lseek64: 8 = lseek(0, 3, 0)
and for remote:
  write: write(3, 0x402080, 8)
  write: 8 = write(3, 0x402080, 8)
  fhandler_base::lseek: setting file pointer to 0
  lseek64: 0 = lseek(0, 3, 0)

-- 
Best regards,
Yuri
-------------- next part --------------
Device Type        : 7
Characteristics    : 10
Volume Name        : <Node>
Serial Number      : 3366888764
Max Filenamelength : 255
Filesystemname     : <NTFS>
Flags              : 2700ff
  FILE_CASE_SENSITIVE_SEARCH  : TRUE
  FILE_CASE_PRESERVED_NAMES   : TRUE
  FILE_UNICODE_ON_DISK        : TRUE
  FILE_PERSISTENT_ACLS        : TRUE
  FILE_FILE_COMPRESSION       : TRUE
  FILE_VOLUME_QUOTAS          : TRUE
  FILE_SUPPORTS_SPARSE_FILES  : TRUE
  FILE_SUPPORTS_REPARSE_POINTS: TRUE
  FILE_SUPPORTS_REMOTE_STORAGE: FALSE
  FILE_VOLUME_IS_COMPRESSED   : FALSE
  FILE_SUPPORTS_OBJECT_IDS    : TRUE
  FILE_SUPPORTS_ENCRYPTION    : TRUE
  FILE_NAMED_STREAMS          : TRUE
  FILE_READ_ONLY_VOLUME       : FALSE
  FILE_SEQUENTIAL_WRITE_ONCE  : FALSE
  FILE_SUPPORTS_TRANSACTIONS  : TRUE
-------------- next part --------------
A non-text attachment was scrubbed...
Name: io.c
Type: text/x-csrc
Size: 1119 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20120320/7a090223/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: strace_local.log
Type: application/octet-stream
Size: 51553 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20120320/7a090223/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: strace_remote.log
Type: application/octet-stream
Size: 51582 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20120320/7a090223/attachment-0001.obj>
-------------- next part --------------
--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


More information about the Cygwin mailing list