X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Date: Tue, 20 Mar 2012 21:50:03 +0100 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: ftell() fails on files in shared folders Message-ID: <20120320205003.GJ18032@calimero.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <20120318155829 DOT GA21914 AT calimero DOT vinschen DOT de> <20120318191043 DOT GA32177 AT calimero DOT vinschen DOT de> <20120319091408 DOT GA30682 AT calimero DOT vinschen DOT de> <20120320120923 DOT GB20228 AT calimero DOT vinschen DOT de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com On Mar 21 00:12, Yuri Gribov wrote: > > 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) Apart from the bug in Cygwin's debug output, the problem is obviously that your remote filesystem returns 0 as the current file size. I have no idea why it does that, and why only on your system. What OS are your remote filesystems running on? I tried on Windows 2008, 7, and 2008R2 in every from<->to combination. Can anybody else on this list observe this behaviour? Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader cygwin AT cygwin DOT com Red Hat -- 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