X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 21856398546C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1629298945; bh=CFIYVxGs3Qfrdp5BuGMDIcupKBtUBQbLPSLwZHZf4RM=; 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=YHtSsIVImw5Dc/3Np/qK1NBIrPRZkpUm2AIARJZepNGcmBBC6Tn/PuRSVD59SkPE+ Hc4fIA1gStDklZCDe8hUMXdm4C2nDGSqopZG+e8QramBYw844v1oSDw5mr02LlHCKK 0sYJo9YJOqVVxU6W465zFg7n00i1k9LRYleyQWOk= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 9DD903857825 Date: Wed, 18 Aug 2021 17:01:47 +0200 To: cygwin AT cygwin DOT com Subject: Re: Duplicates in /proc/partitions Message-ID: Mail-Followup-To: cygwin AT cygwin DOT com References: <9a770c83-62ef-6849-16e7-e6956f4d2fab AT SystematicSw DOT ab DOT ca> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Provags-ID: V03:K1:ser/7yve3jUx5wK55dCw8tEuAma35PMS//h0g2WZRQE8gGk1x23 OHN5K87fX1wPU7S2DkChJ7zBp7hTv7S0Ffr7jqOrdlrb5FYpOffKrpOCB4LiBcWfBP2kXOO 0f8VA9kBX0/lu9PAa7XwWXmEjEVl3zYG6E2rXiUSiH8ruYlliwtMWft+FW3c+Pu/F6Pif2i tWPJmiDx1/vbO4YGhCJrg== X-UI-Out-Filterresults: notjunk:1;V03:K0:MYq0rY9d1Z8=:MDaDr92G1+BB2Eb1P2Wa/H xrZF0ZcDQ0e9R/qsj6XjUXgeyiNbr3aJ840fkn79w0jmRp+meWY5/m5TeabRWA4QG1suMyoTP U1iSpKoVStIjLNs9yiPRl/1PtOc+ZbP1O1dWO1CcZiXyU0WrWxmllp/9FFvOEKNdXLlBdSWVe ftQeuNj1/T/B2oMDrCOOGm032GaN7D6neCSxchTbHRjtukS1gMQCXvpoI7Ji2PCgmGc+Giyl3 BU9I6m+RjqFmTeXCrBilIxb/wrWQgPUH6UE8ANZdkXc6n4HJG7B/Xz0Op/Sv3Xg9dCl0libyR w/KnW4b38urSjSGQSXmNniuAl/uQ+3t30gxFjjvgJIxBvbYZZvWHrSxVg34gkHrcT9RHN832G K62l7VgoCbOG1iONqhCcUz2KVqVYLrBG+N66NRZgkjLPxVDJBv4pOQ8TC005t/TmIZj+A7RpC I2alB4IjkTbuBBRJw//vmkTfDnSIk/PAcC/8xniOpjRM1BI0cj0ikvYhwPGu7aCRBenFp1TB4 G51mCWiGY5+8BF/3XRmxRY7xnOdR0bw7spw11nr6rauK/YBM+26fTDU7NmaNcDOluyBIzA97A nN3orMaeDZpRwVApNqx4XM7rVBxS9Znl5THOoMk5uEaa+RpXULtWr/6bqHusYJZoYmYDOYMqo umbCF1YRjpYP6fS1LBM0lTvgv8l/kQ8iZVTHySLAUJzYg0HGAC3gIz6o8IOW8iW0Wz/nJ7sRP z+Xsfh4RTRfnur5xqeL5yfDxQe0LTDcNPjqfNWwFXrWRMKXcwMBmoH7Y6G8V3W1n5BwM45Sa6 OFwFRXx/SrtOC8EwX1NL/fA13zZUa3sKjZKWTp6Ikb7NXl0B5/4YnucmfL2rN7hOEF7KcpMRw jJ0Wp0iqO9i2Jg7hBOEA== X-Spam-Status: No, score=-99.9 required=5.0 tests=BAYES_00, GOOD_FROM_CORINNA_CYGWIN, JMQ_SPF_NEUTRAL, KAM_DMARC_NONE, KAM_DMARC_STATUS, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NEUTRAL, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: cygwin AT cygwin DOT com X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Corinna Vinschen via Cygwin Reply-To: cygwin AT cygwin DOT com Cc: Corinna Vinschen Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com Sender: "Cygwin" On Aug 18 14:18, Lavrentiev, Anton (NIH/NLM/NCBI) [C] via Cygwin wrote: > > On second thought, I have a vague idea... Could you please just add > > something to the output, i.e, change lines 124/125 from > > > > printf ("%5d %5d %9llu sd%c\n", > > 8, (dev_name - 'a') * 16, size >> 10, dev_name); > > > > to > > > > printf ("%5d %5d %9llu sd%c (%lu)\n", > > 8, (dev_name - 'a') * 16, size >> 10, dev_name, > > (unsigned long) context); > > > > and just compile and run the testcase again? > > Here's the output (and /proc/partitions for comparison) from today: > [...] > 8 16 1000204632 sdb (301) ^^^ > 8 17 1000202240 sdb1 D:\ > 8 32 1000204632 sdc (302) ^^^ > 8 33 1000202240 sdc1 D:\ > 8 48 1000204632 sdd (314) ^^^ > 8 49 1000202240 sdd1 G:\ > 8 64 1000204632 sde (315) ^^^ > i 8 65 1000202240 sde1 G:\ > 8 80 1000204632 sdf (329) ^^^ > 8 81 1000202240 sdf1 I:\ > 8 96 1000204632 sdg (330) ^^^ > 8 97 1000202240 sdg1 I:\ > 8 112 234431064 sdh (340) ^^^ > 8 113 234428416 sdh1 F:\ > 8 128 234431064 sdi (341) ^^^ > 8 129 234428416 sdi1 F:\ Thanks! These context numbers indicate that either of these harddisk entries is actually returned twice by the NtQueryDirectoryObject call, just next to each other. Just for kicks, can you please change the affected printf to printf ("%5d %5d %9llu sd%c (%lu, %ls)\n", 8, (dev_name - 'a') * 16, size >> 10, dev_name, (unsigned long) context, dbi->ObjectName.Buffer); This also prints the device name as returned by NtQueryDirectoryObject. So, the duplicates are actually created by the OS itself. Why... I have no idea so far... 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