From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mailout09.t-online.de (mailout09.t-online.de [194.25.134.84]) by sourceware.org (Postfix) with ESMTPS id 8C9633858CDB for ; Tue, 2 Apr 2024 09:28:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8C9633858CDB Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=t-online.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=t-online.de ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 8C9633858CDB Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=194.25.134.84 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1712050083; cv=none; b=oM5oWeUG3IvY8MiNh/LVMMQXsgK/ITWR+TnKIVyE+emu5Jw1F5WmYrRwpgkI6FWRmiEj3mpIXEt5F9IbU7pyYSdrau/QMsvrg4p/Xf7RHSYuHk66DO+5xOLxt3qb1kOzefkkY7XcFfw+toIYbqEN+EgkdIuRZm4STTTJsmNMfUE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1712050083; c=relaxed/simple; bh=cv69h6jVXKz376cvi0FjUHPhLVpeTCBsp4hGMcSnNeA=; h=Subject:To:From:Message-ID:Date:MIME-Version; b=pWG5BXL4YwWvVAM9UE7UUUBSguFiDxK4i+n/I3XhoA/yym5UveZJ8rjwITVbLApcFXDK99NSLntXz/OJtmpMRz3wQd1uMk6q20VDaHlPpF+HYqnJg7bArlh/gLZXha3+5XW0JW/PrSKSkyhBmGGkt2rJPtIC/26RrU/QgkJGwFA= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from fwd70.aul.t-online.de (fwd70.aul.t-online.de [10.223.144.96]) by mailout09.t-online.de (Postfix) with SMTP id 3811D882D for ; Tue, 2 Apr 2024 11:27:59 +0200 (CEST) Received: from [192.168.2.101] ([79.230.172.235]) by fwd70.t-online.de with (TLSv1.3:TLS_AES_256_GCM_SHA384 encrypted) esmtp id 1rraQv-0Har0y0; Tue, 2 Apr 2024 11:27:57 +0200 Subject: Re: util-linux-2.39.3-1: libblkid returns invalid physical_sector_size To: cygwin@cygwin.com References: <0fb74540-3878-206d-b623-15437fe79b01@t-online.de> <72594c25-f142-42f0-b4cd-e2650e8044db@maxrnd.com> Reply-To: cygwin@cygwin.com From: Christian Franke Message-ID: <6ee32dd4-ce8a-ff79-9245-ced85f4d336e@t-online.de> Date: Tue, 2 Apr 2024 11:27:55 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 SeaMonkey/2.53.16 MIME-Version: 1.0 In-Reply-To: <72594c25-f142-42f0-b4cd-e2650e8044db@maxrnd.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-TOI-EXPURGATEID: 150726::1712050077-037FD89A-721E1AA0/0/0 CLEAN NORMAL X-TOI-MSGID: fe2d6887-8bf2-4ee1-bf7d-f9d20bbd65ae X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,FREEMAIL_FROM,KAM_DMARC_STATUS,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Hi Mark, Mark Geisert via Cygwin wrote: > Hi Christian, > > On 3/31/2024 1:11 AM, Christian Franke via Cygwin wrote: >> Testcase: >> >> # cygcheck -f /sbin/fdisk.exe >> util-linux-2.39.3-1 >> >> # /sbin/fdisk.exe -l /dev/sdd >> Disk /dev/sdd: 465.76 GiB, 500107862016 bytes, 976773168 sectors >> Units: sectors of 1 * 512 = 512 bytes >> Sector size (logical/physical): 512 bytes / 34359738880 bytes >> I/O size (minimum/optimal): 34359738880 bytes / 34359738880 bytes > [...valuable investigation and patch suggestion elided...] > > Your suggested patch looks fine to me.  I have added it to the patch > deck for a new util-linux 2.39.3-2, which has just been uploaded.  The > patch allows fdisk.exe to report the three correct values in my > limited testing. > Thanks for the report and the patch! You're welcome. BTW, according to the Linux kernel sources, BLKPBSZGET etc return 'unsigned int' and not 'unsigned long' since first appearance in 2.6.32-rc3 (2009?): https://elixir.bootlin.com/linux/v2.6.32-rc3/source/block/ioctl.c#L276 https://elixir.bootlin.com/linux/v2.6.32-rc3/source/block/compat_ioctl.c#L743 https://elixir.bootlin.com/linux/v6.8.2/source/block/ioctl.c#L533 So I don't understand why the mentioned code would be correct for Linux.