X-Recipient: archive-cygwin@delorie.com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8FFDD3969035
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
	s=default; t=1619712462;
	bh=bRhiJzMAvDWsh+q8suNuXtcaMOVCkQHitr1OKa2rLlo=;
	h=Date:To:Subject:References:In-Reply-To:List-Id:List-Unsubscribe:
	 List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:
	 From;
	b=UWan3ioTxwHS9eR/J0pozNBRiKzzMypNXbAEuZVXbCX5zM4MzM3RVYvnMrfTIksKJ
	 m7wy9Um5uWMLmWZSfX8q0q3nnK6yXER3PAr2jkP+76bC+UylZQW1YZLk+nWr7+/pEH
	 s5yJZU9AcmWogRUrhLytFryNpbZbcoYW+rUNXRLk=
X-Original-To: cygwin@cygwin.com
Delivered-To: cygwin@cygwin.com
DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 12342385E454
Date: Thu, 29 Apr 2021 18:07:34 +0200
To: cygwin@cygwin.com
Subject: Re: how about little improve "stat" function for virtual cloned
 drisk on windows ?
Message-ID: <YIrZxoRUJOcrSTMT@calimero.vinschen.de>
Mail-Followup-To: cygwin@cygwin.com
References: <CAHO0KOUQbcFnCsnjETPH5tsGwG8-rUn80KBBt2RkyWr=J9mPGg@mail.gmail.com>
MIME-Version: 1.0
Content-Disposition: inline
In-Reply-To: <CAHO0KOUQbcFnCsnjETPH5tsGwG8-rUn80KBBt2RkyWr=J9mPGg@mail.gmail.com>
X-Provags-ID: V03:K1:bx5qPXiSCF2P/ijDKQ/eWN5Ukm2JOtrBcDomAVHICYw3WHp1bUS
 kE7PUH1y1zcxoo98G8XfByErqVCHBuUrEHn1Rsbrj8e/hUhqWEFAJ876qOHi8ypS1Drp4IM
 TBIW4ZKseMmnoCr1Mjz+yqttKOWszMWj4XpJvZIASVSj1fzoz9/Og9KnTMkDcHcSsCRzoZV
 USCRE56fqHcGH3QnWvfUQ==
X-UI-Out-Filterresults: notjunk:1;V03:K0:+1z8SFl8H0o=:orwvTnVxxh5ddtDv8AG1d5
 z/IzUTa/j+3vhJvr5Bjbnk2zqCZS0D37JnzX6q9P83t9DQj6P7/TmllRUfwck9aa0AQ/QVERk
 zSvZNCeLtdtQadd6NGQjlwYU+xXi6nnuqPARAquEhFedQNHgO39kixWhB/lk+XHrlIEI9dwbD
 myOElVIhbZvNyBk1PzlIL2b82eN4OO02tO+z4y9btZAqLJwlQiqNtubU5LxW8wypJZFCg5cks
 7B45OlO+Th9SvmYPzCFX8ZyZ+IsBxkunlv8Dt8vf5BbNt4hmSDzEYRtklB45bSKL5enYFVSdY
 0Zok0kfUvu67GRWpK7VyhfywbTOM2LsS7sMID8hMLEydUC3J+ysmTfolwKSxrqxjupKmQjWRG
 Z9HGUGdfyXeR4gIEhzSwWhJT9YC1k1KaYiGxgD2HWq05Ovbg7hLSOzn4+RpxcXriq3361sf8W
 942iDxJrZwfCrgH4nfG5QOJT+mMaOEYh7yxAm86UytQorE7KYo/Sdiq8sctaioWYsqeG/tJoJ
 XP7Hg4OLLdTZbUfTZOq6Vo=
X-Spam-Status: No, score=-100.1 required=5.0 tests=BAYES_00,
 GOOD_FROM_CORINNA_CYGWIN, JMQ_SPF_NEUTRAL, KAM_DMARC_NONE, KAM_DMARC_STATUS,
 RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,
 SPF_NEUTRAL, TXREP autolearn=ham autolearn_force=no version=3.4.2
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on
 server2.sourceware.org
X-BeenThere: cygwin@cygwin.com
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
 <mailto:cygwin-request@cygwin.com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-request@cygwin.com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
 <mailto:cygwin-request@cygwin.com?subject=subscribe>
From: Corinna Vinschen via Cygwin <cygwin@cygwin.com>
Reply-To: cygwin@cygwin.com
Cc: Corinna Vinschen <corinna-cygwin@cygwin.com>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: cygwin-bounces@cygwin.com
Sender: "Cygwin" <cygwin-bounces@cygwin.com>

On Apr 29 18:29, dreverser--- via Cygwin wrote:
> hello, i have issue for using stat for virtual cloned disk on windows/vmware
> st_dev give me the the same serial number
> and diff util doest work, because thinking path the same and there are
> no files for diff
> 
> iam propose improve winsup\cygwin\mount.c
> by add disk letter to st_dev
> 
> at this line
> https://github.com/cygwin/cygwin/blob/367c1ae16185e7a81aea5bcc2388e4a7a473c92e/winsup/cygwin/mount.cc#L266
> 
> sernum = ffvi_buf.ffvi.VolumeSerialNumber;
> 
> after add disk letter to sernum
> stat will give more unique st_dev
> and as less diff will work

Unfortunately it's not that easy, because it's not just one drive letter
mounted filesystem vs. the virtual clone.  What if the filesystem is not
mounted with a drive letter but into a directory instead?  What if the
same filesystem has been mounted multiple times?  Especially the latter
case is a problem because it's the same filesystem in a very real sense.


Corinna

-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple
