From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 25 10:57:33 2017 Received: (at submit) by debbugs.gnu.org; 25 Oct 2017 14:57:33 +0000 Received: from localhost ([127.0.0.1]:33460 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e7N7d-0002In-DU for submit@debbugs.gnu.org; Wed, 25 Oct 2017 10:57:33 -0400 Received: from eggs.gnu.org ([208.118.235.92]:34095) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e7N7a-0002Ia-NE for submit@debbugs.gnu.org; Wed, 25 Oct 2017 10:57:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e7N7U-0004rc-Hi for submit@debbugs.gnu.org; Wed, 25 Oct 2017 10:57:25 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:39005) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1e7N7U-0004rF-DU for submit@debbugs.gnu.org; Wed, 25 Oct 2017 10:57:24 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53280) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e7N7T-0001u7-3j for bug-coreutils@gnu.org; Wed, 25 Oct 2017 10:57:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e7N7P-0004ki-Tv for bug-coreutils@gnu.org; Wed, 25 Oct 2017 10:57:23 -0400 Received: from mail-wr0-x22b.google.com ([2a00:1450:400c:c0c::22b]:50047) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e7N7P-0004jQ-NG for bug-coreutils@gnu.org; Wed, 25 Oct 2017 10:57:19 -0400 Received: by mail-wr0-x22b.google.com with SMTP id g90so281531wrd.6 for ; Wed, 25 Oct 2017 07:57:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:subject:message-id:mime-version:content-disposition :user-agent; bh=oZJhfkjOvWFkYOpj71LsBffwlSDPU9RlRftd2Y57+3g=; b=YdheHOZz5yskkEHfizaHcvMFkcoXRCoqwKTmGLg4EuAC41xVuR2wEWvDl1fMchqUlz aFN/2eOQw2zptQo5xUQUuemAyTW7Q9SdOv6hM+LGjB5focrBDGzN3wPk75ZcImwCeAW/ zR3IUm7UwL1QAORH0ktJ+E/QkUNt0abFyfwuGREVzll2lJMmdM7n4v1d71CTqzQEsfRh n8LoiWBHFbM7pFDhYfRtyza9QfBvKEQVzgcmJFlSLKDdoLQ/r7CFURZyeyaylU5YcbzX T96cwHg4mm8QDQyGd61KPLj0O7vkoSyrZ8AJ4cm4c2kzloMHwIOn8iR4tsM4bq0Q2b5V u9qQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:mime-version :content-disposition:user-agent; bh=oZJhfkjOvWFkYOpj71LsBffwlSDPU9RlRftd2Y57+3g=; b=Vq2Zrpndt++svCSQ1e6UyAN64e/ltYDB++gC7kGGZpXA0/FIOn2sGxY90Td7eUDi9S sNWJmC7vRCp32v6g6RyCTPs1y4bC745YTG7KqIGCGcEIgE2yXpv0v1YbRRLySgogXEXr OvTjm/IzPKUq/D0McxQqUKFN8L7AstR6kjiZBqtdTPgcab95kJI+xHglxs3mJDAzlRXm c44LJwdtML5WIlsJqHSz8sa6UZr3ooP7kSrshLE3xtNg4yspTbQYGVYu5c7vl7drnuWF HHsineN08hPme7wYRXg44nqp2f9Kv3gZ7Iydukn1gXRuy/3dL9XyCw3XvmgWhO229PZy Tlxg== X-Gm-Message-State: AMCzsaU2XOtlvKLViKTCAKo8PzTvlqtJpe0jCvo9TOVCyoKFC//O9gIh 7Vi17uGiLmfM/MzDoGdNhVZvYQ== X-Google-Smtp-Source: ABhQp+S2J0jbj6fQKT7cVyiG26b+HHyFdn+BUjBQi4yTYCZ/rGofuLNVDTEbqe+rM+3o5xN4sdPQOQ== X-Received: by 10.223.160.161 with SMTP id m30mr2498144wrm.27.1508943437841; Wed, 25 Oct 2017 07:57:17 -0700 (PDT) Received: from chaz.gmail.com ([90.198.158.87]) by smtp.gmail.com with ESMTPSA id c3sm2609016wrd.44.2017.10.25.07.57.15 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 25 Oct 2017 07:57:16 -0700 (PDT) Date: Wed, 25 Oct 2017 15:57:15 +0100 From: Stephane Chazelas To: bug-coreutils@gnu.org Subject: df: wrong output when a FS masks another one Message-ID: <20171025145715.GE5071@chaz.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) Test case: /tmp$ mkdir -p 1/2 /tmp$ sudo mount -o size=1M -t tmpfs x 1/2 /tmp$ sudo mount -o size=2M -t tmpfs y 1 /tmp$ mkdir 1/2 /tmp$ df -h 1/2 Filesystem Size Used Avail Use% Mounted on x 2.0M 0 2.0M 0% /tmp/1/2 The Size is correct as that's obtained from statfs() on the file. But when it comes to finding the corresponding mount source and mountpoint, it fails. /tmp$ grep /tmp/ /proc/mounts x /tmp/1/2 tmpfs rw,relatime,size=1024k 0 0 y /tmp/1 tmpfs rw,relatime,size=2048k 0 0 df should walk /proc/self/mounts or /etc/mtab from the bottom up until it finds the first mount point that is a parent of the realpath of the file. /tmp$ df --version df (GNU coreutils) 8.28 (on Debian testing amd64) Related: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=15955 That's just been discussed on the austin group mailing list: https://www.mail-archive.com/austin-group-l@opengroup.org/msg01715.html https://www.mail-archive.com/austin-group-l@opengroup.org/msg01720.html Not critical as that could be considered as a pathological test case. -- Stephane From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 26 00:48:14 2017 Received: (at 28991) by debbugs.gnu.org; 26 Oct 2017 04:48:14 +0000 Received: from localhost ([127.0.0.1]:33831 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e7a5W-00016s-LK for submit@debbugs.gnu.org; Thu, 26 Oct 2017 00:48:14 -0400 Received: from mail.magicbluesmoke.com ([82.195.144.49]:35058) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e7a5U-00016d-SL; Thu, 26 Oct 2017 00:48:13 -0400 Received: from localhost.localdomain (c-73-158-116-184.hsd1.ca.comcast.net [73.158.116.184]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.magicbluesmoke.com (Postfix) with ESMTPSA id 80ADD9C32; Thu, 26 Oct 2017 05:48:11 +0100 (IST) Subject: Re: bug#28991: df: wrong output when a FS masks another one To: Stephane Chazelas , 28991@debbugs.gnu.org, 28670@debbugs.gnu.org References: <20171025145715.GE5071@chaz.gmail.com> From: =?UTF-8?Q?P=c3=a1draig_Brady?= Message-ID: <35fc7d85-351d-f496-644b-0c78af40e105@draigBrady.com> Date: Wed, 25 Oct 2017 21:48:09 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <20171025145715.GE5071@chaz.gmail.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 28991 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) On 25/10/17 07:57, Stephane Chazelas wrote: > Test case: > > /tmp$ mkdir -p 1/2 > /tmp$ sudo mount -o size=1M -t tmpfs x 1/2 > /tmp$ sudo mount -o size=2M -t tmpfs y 1 > /tmp$ mkdir 1/2 > /tmp$ df -h 1/2 > Filesystem Size Used Avail Use% Mounted on > x 2.0M 0 2.0M 0% /tmp/1/2 > > The Size is correct as that's obtained from statfs() on the > file. But when it comes to finding the corresponding mount > source and mountpoint, it fails. > > /tmp$ grep /tmp/ /proc/mounts > x /tmp/1/2 tmpfs rw,relatime,size=1024k 0 0 > y /tmp/1 tmpfs rw,relatime,size=2048k 0 0 > > df should walk /proc/self/mounts or /etc/mtab from the bottom up > until it finds the first mount point that is a parent of the > realpath of the file. > > /tmp$ df --version > df (GNU coreutils) 8.28 > > (on Debian testing amd64) > > > Related: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=15955 > > That's just been discussed on the austin group mailing list: > https://www.mail-archive.com/austin-group-l@opengroup.org/msg01715.html > https://www.mail-archive.com/austin-group-l@opengroup.org/msg01720.html > > Not critical as that could be considered as a pathological test > case. > Yes it would be nice to behave more consistently here. Also related is https://bugs.gnu.org/28670 cheers, Pádraig From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 29 21:42:00 2018 Received: (at control) by debbugs.gnu.org; 30 Oct 2018 01:42:00 +0000 Received: from localhost ([127.0.0.1]:52478 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gHJ2d-0004jm-UY for submit@debbugs.gnu.org; Mon, 29 Oct 2018 21:42:00 -0400 Received: from mail-pg1-f172.google.com ([209.85.215.172]:45599) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gHJ2b-0004jZ-Vw for control@debbugs.gnu.org; Mon, 29 Oct 2018 21:41:58 -0400 Received: by mail-pg1-f172.google.com with SMTP id s3-v6so4780629pga.12 for ; Mon, 29 Oct 2018 18:41:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=to:from:message-id:date:user-agent:mime-version:content-language :content-transfer-encoding; bh=+XaGwNQX1XJNLvHfiCmcc0/0Z1H/3Jm16JeKswb2wa0=; b=gvwjZb9m1L5ap0biib5gjG31YHIYrl3mjeZnxE9fTjDzXNCS41ObJq4mAkdfsbRH3j NdnpOJQwqhOr9lusZbPCqMcCDyxeQVRL09XIBhZjcx6NoqKX8cU84BGGB8kufntVPwdZ pb5o37gmV7rEL7JEYunLD01fGVdgVAlUYDF8zH/jhcSh26QMBbReF6ft9cTx2NFxQ8xM 7b2iJj4hEKA3b8Mh5oJeqqnUO3L8nTSWiz3kQlScsz5UpFwKmR+PqylKcHs4VkChibxw uqE50nAuaOypDWIIzbGvSZuImwiQe5wYB2PBXPSOd8s7NCLED7WFYp7yLqNTsSrr63ML yavg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:from:message-id:date:user-agent:mime-version :content-language:content-transfer-encoding; bh=+XaGwNQX1XJNLvHfiCmcc0/0Z1H/3Jm16JeKswb2wa0=; b=hi2wwoKrroh01fMjKQq0VPi8nXcSsrjPYOxvfHGcmrPr4Wz31iXqT4e2pHEMGUZPTJ z2C8W5qkLd0Eht8Ua2f3bOseXQrHKEZ0h11Rxz8Z9x3JVwoY6cUkAxVZTlovDAUHy8J4 2xoNzTOkzTIJ68y/Ma2mdFjJCHgsFfHDibQ+tJdq00K7hqpj9KIi9KXY0qvi1G3CHpV9 LxB8GDJbOOh2QdoJ3Z6cvEUA7BYeBOsAO8EH6ocKw4Z57crjoJaKJXmKtVGMWGGS0o2y WWwlqYXEhAkTQVeksZmcCL58disAqVCMI+8Fkv0vN3tj670KZP/UqyDhLFTEVgrnLSMe BpWA== X-Gm-Message-State: AGRZ1gIbM5m+j/t3YR8uIWFC9Am2Ve7JG+b4cFo4hMxUBwVc2+Hk5p3u 4H83k80BNJSRMGp5AS1rQ4Ojm+xZ/yk= X-Google-Smtp-Source: AJdET5dMHDfzKQe6R5SEiaYYyL3R1j7/ACgRkyw+7Au5aHrnvaBiVZUJyISojBim4WWJvUc3O06YBQ== X-Received: by 2002:a63:314c:: with SMTP id x73mr16252198pgx.323.1540863711500; Mon, 29 Oct 2018 18:41:51 -0700 (PDT) Received: from tomato.housegordon.com (moose.housegordon.com. [184.68.105.38]) by smtp.googlemail.com with ESMTPSA id u7-v6sm24002238pfl.34.2018.10.29.18.41.49 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 29 Oct 2018 18:41:50 -0700 (PDT) To: control@debbugs.gnu.org From: Assaf Gordon Message-ID: <8d1a87b4-32c7-6098-42c7-7684080fcff7@gmail.com> Date: Mon, 29 Oct 2018 19:41:49 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 2.0 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: severity 28991 wishlist merge 28991 28670 [...] Content analysis details: (2.0 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (assafgordon[at]gmail.com) -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [209.85.215.172 listed in list.dnswl.org] 1.8 MISSING_SUBJECT Missing Subject: header 0.2 NO_SUBJECT Extra score for no subject X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) severity 28991 wishlist merge 28991 28670