X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D8C7E3889C18 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1629310756; bh=Cbqs/wZCte1Fb/6Ar7M/5xPjWyClrTn/t5d3ZTUleVE=; h=To:Subject:Date:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=XKcLLTSZb/4EndPYd5mTwXh5q8eID6aUBWHHQp1AuLMrWg1Y04TnDhhu8JaJKd646 1Ka02pVoRN4c38X7DlTjlqi+eCpi7HxthO/oBp9UobDEpLfvBRFSzmE60jDW1vBhI9 ue++9f7AjtfGB3F/ZAZCECtUoGXVWTgtzZVPdxq0= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 664C03855036 IronPort-SDR: cWQS1RXAW0eaND7jFTO6ooNxxTHzTRk/2+ObXqiFuGjHBqGlQGiX+tn7ttn+QxKGLIIrpX0twx CMg0oOG+yoDQ== X-SBRS-Extended: Low X-IronPortListener: ces-out X-IronPort-AV: E=Sophos;i="5.84,332,1620705600"; d="scan'208";a="206800271" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GJHOrFfem569k3WaJ8CefATy6Qrju3XYGzcFBUByr1zWJw2P0qtjypb7yG8LT8xbwH7mP97c1kfkZy+PI9VWJlhDTGOgaTezrRPnG0Xe55o82MgW+s2uk+/z7IpHbQqydISXHOKbGfLin2c7unqppqpGu30OKHgSnExOzj51vAF+M1deXGYKF1DWJvZckvDKtA8I/wkcFf6EU+MyAgZIFBlnoSchg2vVzH9wlH/tVcAqw6mZsH0sCSC7v1WS7CZCAN7a1kK4tc1O9crj9OhoP7GAsw7gsPVt6LA/hLDkjCqGE1m+oEC8svfam2IZqlOIkdQiNIch4D7pTppPgyOZhw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=OXigSunNJhT5x6ETBA0w5oi86CpKwC0ydeU+MoaftK0=; b=OIwtmJ+loiZi+wKxHFauB47xiac3NT/t118wZFOeiJ6NXv8NPu1fGtm+ko7JM+Pyn6idIcG4wX0IYmv9SDvooOmGGO6d0BZmAMlAsRHHeKB2TA4RmNvkr30OjOyY6f8QMSeo00b14UZOd/WZUZuzIo5hRFubzZ7c2aqg7BBNDpRtrkeYhAwUetNy/S77Nz8/W0MIrjdc4nF3wfn5gcjfudvTEyhfwoCXfiSystTU3H6gBSJ6iqUOjjVpCs/G6ygztceQGjPC8GB2Cb1UxaiaFi4h3a+loJQ/mBD+ytyQmb43PMg7MUXT+Zkhzfa4XVEK08HTWfhNbnDnS2WhEMMXkg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=ncbi.nlm.nih.gov; dmarc=pass action=none header.from=ncbi.nlm.nih.gov; dkim=pass header.d=ncbi.nlm.nih.gov; arc=none To: "cygwin AT cygwin DOT com" Subject: RE: Duplicates in /proc/partitions Thread-Topic: Duplicates in /proc/partitions Thread-Index: AQHXkDH4cTCV58/8mUC5AX7lCy3dnKt2O/aAgAAi+gCAAB+OgIABL1kAgAAP1wCAAZkwsIAADKyAgAA0qxA= Date: Wed, 18 Aug 2021 18:18:31 +0000 Message-ID: References: <9a770c83-62ef-6849-16e7-e6956f4d2fab AT SystematicSw DOT ab DOT ca> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: f895c80d-c536-4fd1-b279-08d962749587 x-ms-traffictypediagnostic: DM6PR09MB5590: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:7691; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: iWV1zingRwYtFU4q5EL22hbyeKwo2TnT7yfZMzFJj1FzaPpxj7yWtXPjdw37k+2rVRoOgqK0mrviDJi1nROvBWfilpjx6dSYXAEEMLZQuxpZUbPCTC0tS1bf2Uj2Bjgkq1l1wytQv8aLiZzrteSJnsNztUlkyo2eWJleiLkidqFM9D+VZWw7OmFel66N06riVIloGjYapi/8BhFx+/ffmXUU8VDsj0l1+iXF7B0Ek8kVW/7BWxwg49FoxQGWvmJ6JgOAo4HJBT0iGHG87zes7cijEao9NzQNCxaX9LCxq8E0bmkxFuPSdJrOMxzhTJia83KjzT+4uGHYDk2QgRsHGQLyDLD7Cr8wWjNM/sQH7/JoZPXlSBmkJ+MPymWbm+IWtdRDCqwOk82t415YSYk4kugV33jgMgjyiYWK3LKgnua+xy9O4Ew4upD2J1/BKjmoPp85MQWFsw9Jkes+blf1XUHYy8SxTwWgqk7t4bGWO/1IXvnaq2F+/qPltzeNCPKH4nLY8gxKA7gcSVScxCoy/seyInUWFPuqVk4A5xo5APnUBeBckSOvFc4f7T/ClM753OQJ9YXa3KNVm3F80ZdUVwS3iwMCw0sZVzZbC3MFg48n6Mm6vx2wQun6UfW9sS/ibijh7vX4y81to3mlAPyixpWrJjbBcjrxwU9q/1X/kgRkhTknPoPl+9BdCTn5SJAvfa0746s+VyVPaesjiOL6xw== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM8PR09MB7095.namprd09.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(39860400002)(346002)(366004)(136003)(376002)(396003)(6506007)(122000001)(2906002)(7696005)(6916009)(38070700005)(478600001)(52536014)(83380400001)(450100002)(316002)(5660300002)(4326008)(38100700002)(55016002)(71200400001)(9686003)(66556008)(26005)(66446008)(66476007)(66946007)(64756008)(8936002)(76116006)(8676002)(86362001)(186003)(33656002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?UPrl6ZS3FZTq8shtdF92sd1izZGqsI7bLsF129rRM1wMuED6dZ216YRgGtxP?= =?us-ascii?Q?jNsxd13hJKwn7bWCAEnDbeIkcxRsoL9LK09mLH7NO2o/CPES7w8fhjfH1fZA?= =?us-ascii?Q?asnFfdroyJMi75JG08ZwQ4IETX7YdWdZ2kSkhl79bkUFKzY5wDujKDWxcTJ1?= =?us-ascii?Q?ov4MisjSpnjJcMMfSm4VYYD5xk9YkXqaLPuIcblXMT1FlAzkIGgo4/j82PQp?= =?us-ascii?Q?6R6peRALZt1WNp402stjbRsWYnegqFVlj/ILROFhA91uquDFZtycvDLK2Oir?= =?us-ascii?Q?invsNdeayv9kGPHdhdVmrCwZriROnD9AypEGrlZuHDG8PJmkhQfsaoLJwuo4?= =?us-ascii?Q?LGUx8jFmz62leRBUXPxVdVFf/ZM6J6vf+nlXWb4N7zwklCbmQ9qiXMTVP3bH?= =?us-ascii?Q?9IqyckPI1+Ra1DWzZO6mjtptVOZ21xYQNhWacIk3naz2hXgKEU52rUBhWOPN?= =?us-ascii?Q?GbAVvP1zS2teGeuW3Br1QXu8JAkbAFDZNb2rbwt0qoj32b5jP0Ok/3ce9MO0?= =?us-ascii?Q?RBnfKJao9DPsgI2CD9hDH3tuNhn1zl5jb3eK6+ajA7gGN4nmU60tXrZHl3sh?= =?us-ascii?Q?igOJUMqWg91PtR9lPQG3VBtKoEgMIz5pIALGXg9T/xpoHfBUaYTRoWaNywKQ?= =?us-ascii?Q?S6ZVcmc3xXT0AXmGnpA+q74VFpr3phFTi8Be1/hcw0AT+LabZR0vt+ZZNn+7?= =?us-ascii?Q?K5jxcbDIgjwwrCw6+MTM76I+ZxUkJa2SfuUt+MAhnmWJBd4hnYEkXJXLMGK2?= =?us-ascii?Q?AgP0tRhz659BsIg/M6II5t0d+xonzmVunhJTdWURmZtMT98QcZW14SiNlWxo?= =?us-ascii?Q?WX8kvA6lMZ6pUntsssQqB/nmLyS+Q1nM3nKBFDk5DU4YpAdoUjfTGg1F/9Ui?= =?us-ascii?Q?OCCxS2O9rPR57k6Uw9W3SPl4BoQgLmvPyt1XJJpOxXj3irH/eiT5hOGTCXXf?= =?us-ascii?Q?Qc9TZhf1cWQaOHrcSEDilQ9oRy/UA+YHUx3UgGB9RtNAbpVTo0wsgnnRSZ0+?= =?us-ascii?Q?QNBLvaJLrINd9XnggD96z73UfkQoDKZ/4FomDhmwWdX4bdw3S1FLhmkpnLxh?= =?us-ascii?Q?LKGoWVMKSOLQ7VPmz9SWoHA00pjOAhioJJT+mj7tehHCYt2Zjj96YfApDzlt?= =?us-ascii?Q?g4Z5726SAHZFeemmHMM3ZhRUnpbKF6Wv6+aLkalQu3iTNA0YQeum+wcJg1s/?= =?us-ascii?Q?x9dmsDzpcauiI15htCNep8UoR+RwNInmCnkuzEQ/VHNMyYIy9aL5D+w+uID0?= =?us-ascii?Q?/YBTQk3P+6HG9gAMEQsfXjpCTuUa4ZSut5bBDvFkegKKJ+8cc4yGbAFwByHT?= =?us-ascii?Q?eVI=3D?= x-ms-exchange-transport-forked: True MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM8PR09MB7095.namprd09.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: f895c80d-c536-4fd1-b279-08d962749587 X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Aug 2021 18:18:31.2837 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 14b77578-9773-42d5-8507-251ca2dc2b06 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR09MB5590 X-OriginatorOrg: ncbi.nlm.nih.gov X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, RCVD_IN_MSPIKE_H2, SPF_PASS, TXREP, T_SPF_HELO_PERMERROR 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 List-Id: General Cygwin discussions and problem reports List-Archive: List-Post: List-Help: List-Subscribe: , From: "Lavrentiev, Anton \(NIH/NLM/NCBI\) \[C\] via Cygwin" Reply-To: "Lavrentiev, Anton \(NIH/NLM/NCBI\) \[C\]" Cc: Corinna Vinschen Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "Cygwin" > printf ("%5d %5d %9llu sd%c (%lu, %ls)\n", > 8, (dev_name - 'a') * 16, size >> 10, dev_name, > (unsigned long) context, dbi->ObjectName.Buffer); I replaced with this instead (read_bytes added): printf ("%5d %5d %9llu sd%c (%lu, %ls, %u)\n", 8, (dev_name - 'a') * 16, size >> 10, dev_name, (unsigned long) context, dbi->ObjectName.Buffer, bytes_read); and here's the output: $ ./proc_partition major minor #blocks name win-mounts 8 0 500107608 sda (282, Harddisk0, 144) 8 1 102400 sda1 8 2 488280064 sda2 C:\ 8 16 1000204632 sdb (299, Harddisk1, 144) 8 17 1000202240 sdb1 D:\ 8 32 1000204632 sdc (300, Harddisk1, 144) 8 33 1000202240 sdc1 D:\ 8 48 1000204632 sdd (313, Harddisk2, 144) 8 49 1000202240 sdd1 G:\ 8 64 1000204632 sde (314, Harddisk2, 144) 8 65 1000202240 sde1 G:\ 8 80 1000204632 sdf (329, Harddisk3, 144) 8 81 1000202240 sdf1 I:\ 8 96 1000204632 sdg (330, Harddisk3, 144) 8 97 1000202240 sdg1 I:\ 8 112 234431064 sdh (339, Harddisk4, 144) 8 113 234428416 sdh1 F:\ 8 128 234431064 sdi (340, Harddisk4, 144) 8 129 234428416 sdi1 F:\ DeviceIoControl (Harddisk5\Partition0, IOCTL_DISK_GET_PARTITION_INFO{_EX}) 5 8 144 0 sdj (352, Harddisk5, 624) It prints the correct Harddisk names (corresponding to the duplicates), so it's consistent. I was thinking that the "context" value seems to change just by 1 when there's a duplicate coming out; otherwise, it jumps by more than 10, when it is really a new drive... The directory handle is used (indirectly) in NtOpenFile() through the attributes, and I wonder if that call somehow distorts the internal position within the handle, and so it restarts from the wrong internal position in the outer loop. Anton Lavrentiev Contractor NIH/NLM/NCBI -- 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