From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 73363 invoked by alias); 19 Dec 2017 18:45:44 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 73355 invoked by uid 89); 19 Dec 2017 18:45:43 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mail-qt0-f181.google.com Received: from mail-qt0-f181.google.com (HELO mail-qt0-f181.google.com) (209.85.216.181) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 19 Dec 2017 18:45:42 +0000 Received: by mail-qt0-f181.google.com with SMTP id g10so25364611qtj.12 for ; Tue, 19 Dec 2017 10:45:42 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=4qO+IUbXpkOXbTJSXgwtYDE4AXzbCsE0LQhQz+vzt60=; b=b0HlQ5HpIOZzM4qwDkoDR78B+j2ZneYIf+cB9xeGmY8bh2qCSQQdyQcojqVfY6EGxN EXzDIZQh2Ki3mmiEbVzoWavrXvAkkcv2qfgmHAKPndj9Nlay7mKi3Ou9YzpYwmmb6x/y iudfeqqL2PVND+bDQCwl9MRJ8r5WcEE3MouhETTwmZ5p17vXt6MNzCfnFfDQ4a+p1hOr 5exSClLWLnfxktbi97tE//H5FpSQPw0WglUFa4CjdxDYQ+MK+l+l42m0Hz5JH5TMLqgg x/B3m2qtoB4tJolmIRUeC2cpYJtVs00KU2LeLHdHk5ttAdPhOZURmEym5mmpWQgtP4MZ s09Q== X-Gm-Message-State: AKGB3mLQTM3U41IcxHMV7TV35glKUeyN/NxAnKQaJfDu+24u2tAABfUU Oha06Jm4fHRs/x6DJcoAKWki5fUlvcKBuH6DJL8mmqYT X-Google-Smtp-Source: ACJfBosVdvpkQXVywhyxX3R/u8EhvFl1mlLnF/5BUvj2LDT9UwkXhvO7lUICRo+KTDdGk6zFpbc7gax//kNXIYo+N9Q= X-Received: by 10.200.63.208 with SMTP id v16mr6286512qtk.249.1513709139017; Tue, 19 Dec 2017 10:45:39 -0800 (PST) MIME-Version: 1.0 Received: by 10.237.58.41 with HTTP; Tue, 19 Dec 2017 10:45:07 -0800 (PST) In-Reply-To: <20171219181914.GE19986@calimero.vinschen.de> References: <20171218131035.GB11285@calimero.vinschen.de> <5a385ced.195b9d0a.d434.5400@mx.google.com> <20171219091431.GF11285@calimero.vinschen.de> <9f29d418-10af-1dc7-2636-89cae1eb16f4@redhat.com> <20171219181914.GE19986@calimero.vinschen.de> From: Ivan Kozik Date: Wed, 20 Dec 2017 05:47:00 -0000 Message-ID: Subject: Re: Wrong file position after writing 65537 bytes to block device To: cygwin@cygwin.com Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes X-SW-Source: 2017-12/txt/msg00208.txt.bz2 On Tue, Dec 19, 2017 at 6:19 PM, Corinna Vinschen wrote: > On Dec 19 16:35, Ivan Kozik wrote: >> From what I observe on Linux, it supports writing at any offset to the >> block device because it does a read-modify-write behind the scenes, >> with accompanying nasty overhead (e.g. writes going at 64MB/s instead >> of an "expected" 180MB/s). > > That's what Cygwin was trying to emulate as well. Debugging pointed out > that it only works for reading, not for writing, because the latter > neglected to fix up buffer pointers. Those are used in lseek to report > the Linux-like byte-exact file position. > > I pushed a patch and uploaded new developer snapshots to > https://cygwin.com/snapshts/ > > Please give them a test. Hi Corinna, It is writing correctly now, thank you for the fix! Ivan -- 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