X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-3.6 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org To: cygwin AT cygwin DOT com From: Eric Blake Subject: Re: MVFS results Date: Fri, 17 Jul 2009 23:15:03 +0000 (UTC) Lines: 31 Message-ID: References: <20090715204831 DOT GA27613 AT calimero DOT vinschen DOT de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit User-Agent: Loom/3.14 (http://gmane.org/) X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: 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 Eric Blake byu.net> writes: > > As I said above, I assume that MVFS has a problem similar to what we > > have for remote HPFS. It's not sufficient to set only the minimal > > set of access flags in calls to NtCreateFile/NtOpenFile in some > > circumstances. I can't tell where the problem is for cp -p since that > > shouldn't call anything different from touch in terms of setting timestamps. > > utimensat vs utimens? Found the root cause. R/O vs. writeable. Doesn't matter where the source file lives; rather, the utimens call is failing because cp is changing the permissions to R/O prior to changing the times, all while keeping the same fd open that was used for populating the copy. But touch starts from a closed fd, which is enough of a different path to trigger the workaround path that temporarily removes the R/O bit to change the time and then turn the bit back on. Is that enough for you to go on, or do I need to also give strace details? $ echo hi > /tmp/bar $ touch -d yesterday /tmp/bar $ cp -p /tmp/bar bar1 $ chmod a-w /tmp/bar $ cp -p /tmp/bar bar2 $ ls -l bar? -rw-r--r-- 1 eblake Domain Users 3 Jul 16 17:12 bar1 -r--r--r-- 1 eblake Domain Users 3 Jul 17 17:12 bar2 -- Eric Blake -- 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