X-Loop: help-debbugs@HIDDEN Subject: bug#9472: rm --no-traverse-mount-points [Re: stop rm at same-dev bind mounts Resent-From: Jim Meyering <jim@HIDDEN> Original-Sender: debbugs-submit-bounces <at> debbugs.gnu.org Resent-To: owner <at> debbugs.gnu.org Resent-CC: bug-coreutils@HIDDEN Resent-Date: Sat, 10 Sep 2011 20:03:01 +0000 Resent-Message-ID: <handler.9472.B.131568496521613 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: report 9472 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: devel@HIDDEN Cc: 9472 <at> debbugs.gnu.org X-Debbugs-Original-Cc: bug-coreutils@HIDDEN Received: via spool by submit <at> debbugs.gnu.org id=B.131568496521613 (code B ref -1); Sat, 10 Sep 2011 20:03:01 +0000 Received: (at submit) by debbugs.gnu.org; 10 Sep 2011 20:02:45 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1R2TlE-0005cY-Rs for submit <at> debbugs.gnu.org; Sat, 10 Sep 2011 16:02:45 -0400 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from <jim@HIDDEN>) id 1R2TlB-0005cP-Ab for submit <at> debbugs.gnu.org; Sat, 10 Sep 2011 16:02:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <jim@HIDDEN>) id 1R2Th6-0000aG-VA for submit <at> debbugs.gnu.org; Sat, 10 Sep 2011 15:58:29 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([140.186.70.17]:39396) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <jim@HIDDEN>) id 1R2Th6-0000aC-Tl for submit <at> debbugs.gnu.org; Sat, 10 Sep 2011 15:58:28 -0400 Received: from eggs.gnu.org ([140.186.70.92]:59226) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <jim@HIDDEN>) id 1R2Th5-00028b-UI for bug-coreutils@HIDDEN; Sat, 10 Sep 2011 15:58:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <jim@HIDDEN>) id 1R2Th4-0000Zq-Ot for bug-coreutils@HIDDEN; Sat, 10 Sep 2011 15:58:27 -0400 Received: from mx1.redhat.com ([209.132.183.28]:8899) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <jim@HIDDEN>) id 1R2Th4-0000Zj-Hu for bug-coreutils@HIDDEN; Sat, 10 Sep 2011 15:58:26 -0400 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p8AJwOxH028372 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 10 Sep 2011 15:58:24 -0400 Received: from mx.meyering.net (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p8AJwNCT011625; Sat, 10 Sep 2011 15:58:23 -0400 Received: from rho.meyering.net (localhost.localdomain [127.0.0.1]) by rho.meyering.net (Acme Bit-Twister) with ESMTP id DD3A46004E; Sat, 10 Sep 2011 21:58:22 +0200 (CEST) From: Jim Meyering <jim@HIDDEN> In-Reply-To: <CAGZbLYk9AiAs1N68uRu6+mcEpunppPYDXyUX4Lo4_SW1Tmj2Sw@HIDDEN> (Thomas Moschny's message of "Sat, 10 Sep 2011 15:35:40 +0200") References: <CAGZbLYk9AiAs1N68uRu6+mcEpunppPYDXyUX4Lo4_SW1Tmj2Sw@HIDDEN> Date: Sat, 10 Sep 2011 21:58:22 +0200 Message-ID: <87mxec9nkx.fsf@HIDDEN> Lines: 42 MIME-Version: 1.0 Content-Type: text/plain X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25 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 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -8.5 (--------) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Sender: debbugs-submit-bounces <at> debbugs.gnu.org Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org X-Spam-Score: -8.4 (--------) Thomas Moschny wrote: > having a rm command accidentally removing 3/4 of my system yesterday, > I am starting to wonder whether it is possible to have rm reliably > stop at bind mounts. I know there is a --one-file-system option, but > it is not working when the bind mount points to the same device: > > % cd /tmp > % mkdir -p a/b c/d ; touch c/d/file ; mount --bind c a/b > % find a > a > a/b > a/b/d > a/b/d/file > % rm -rf --one-file-system a > rm: cannot remove `a/b': Device or resource busy > % find a > a > a/b > > `file' has been removed. Imho the name of the --one-file-system option > is misleading as it only compares st_dev fields. Thanks for the example, but I don't see how that option name is misleading. A "file system" is the thing you create with "mkfs". Even though normally there is only one mount point per file system, the fact that with bind mounts there can be many doesn't change the name of the thing occupying the underlying device: a file system. I think you want a new option, say --no-traverse-mount-points. > Besides filing a > bug/enhancement ticket for coreutils, does someone know a reliable way > to stop rm in such cases? It would tell rm -r not to cross any mount point. Rm would have to be able to read at start-up the set of all mount points, or maybe only the mount points for a given device the first time a new device is encountered. Then, it could easily and efficiently test whether each directory processed is in that set. I've Cc'd bug-coreutils, so this message will create a ticket in the issue tracker: http://debbugs.gnu.org/coreutils.
Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.427 (Entity 5.427) Content-Type: text/plain; charset=utf-8 X-Loop: help-debbugs@HIDDEN From: help-debbugs@HIDDEN (GNU bug Tracking System) To: Jim Meyering <jim@HIDDEN> Subject: bug#9472: Acknowledgement (rm --no-traverse-mount-points [Re: stop rm at same-dev bind mounts) Message-ID: <handler.9472.B.131568496521613.ack <at> debbugs.gnu.org> References: <87mxec9nkx.fsf@HIDDEN> X-Gnu-PR-Message: ack 9472 X-Gnu-PR-Package: coreutils Reply-To: 9472 <at> debbugs.gnu.org Date: Sat, 10 Sep 2011 20:03:01 +0000 Thank you for filing a new bug report with GNU. This is an automatically generated reply to let you know your message has been received. Your message is being forwarded to the package maintainers and other interested parties for their attention; they will reply in due course. Your message has been sent to the package maintainer(s): bug-coreutils@HIDDEN If you wish to submit further information on this problem, please send it to 9472 <at> debbugs.gnu.org. Please do not send mail to help-debbugs@HIDDEN unless you wish to report a problem with the Bug-tracking system. --=20 9472: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D9472 GNU Bug Tracking System Contact help-debbugs@HIDDEN with problems
Received: (at control) by debbugs.gnu.org; 15 Oct 2018 14:06:07 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Mon Oct 15 10:06:07 2018 Received: from localhost ([127.0.0.1]:50838 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1gC3VX-0006u9-Ec for submit <at> debbugs.gnu.org; Mon, 15 Oct 2018 10:06:07 -0400 Received: from mail-pf1-f181.google.com ([209.85.210.181]:45055) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <assafgordon@HIDDEN>) id 1gC3VV-0006tg-UX for control <at> debbugs.gnu.org; Mon, 15 Oct 2018 10:06:06 -0400 Received: by mail-pf1-f181.google.com with SMTP id r9-v6so9729297pff.11 for <control <at> debbugs.gnu.org>; Mon, 15 Oct 2018 07:06:05 -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=tslEaETexaL5Plma/unGTsX6EP4DKD4xeOJEPvCMxto=; b=IgYFBuphZeO6ufK2R0ThohvlgQjuhoNFWS1LlcCSo1fBUKysCs/zlabxiMQtbAEcv9 5lGZ2r6pLOmV6xqrPS+qDt2TeNf9PdqM87PuEWn/4x620EkidrGhTUDmK8QpzgVQzVAQ EbQlLs3N5jp0ConLqnjfIhq7aDCn8Xl50ynhkCdy0fANLzrY2EvRmD3m7uMjb5jb+xqH xS/hKhgbCyjDaI3jvxizDo6EABMqsRi+3b0sr7dxdtRTv6KUKh7gQ5PU0nHQE8YeQONT P9HPFS0vFx2QnpJxGkZmXHf+3XGL8HKXvVuDTlSNkqF/qZTLVqCRMbMCWIvHt6+ZEs5y n3hw== 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=tslEaETexaL5Plma/unGTsX6EP4DKD4xeOJEPvCMxto=; b=BN3r7OXN8tmVFFClh/JaAHUbBcnAdSXiJ67IUn+im2fR1JlCkyNstmy7CewveTl3rI vnSXQ19OdA6Qp1kJFBuaGcoNBRzwMYw41tD8vZGNs6p+KVkRqseq9FvSPMt0jSjTDPMX mTl7/OUUicxSa42ymRGVWKwy+eldyLKFF2WgL6mhMSZZXaqgQHErZbsyshfA9Tm1AP9n m5S7nzWYoRABBjQeUfpMZUOTVocTfC2NLLWQ7t3voQlPJH4k+FeCZC+MqQN/p+8OPxzU kFK3LSse0N4xr5hs4MNgeUfpxgSUlJWXlkBAjD74LRDzK9UzaXZnfGEpez1iMWr9MNLu oS0A== X-Gm-Message-State: ABuFfogF5FahDcLajf6++HIxsfi3VRUE8JU/09QQUb42o/IqgSydVRRq 3Vo6uKUbR8M+YV87LQ8Js2Dg6zzjDqI= X-Google-Smtp-Source: ACcGV630bCAJkl8c383Nvxde4mlHBbauHW61q0zd37Y2dEOjIhXh0u6sXrtKgN3rwQfCYT0iTqNkyg== X-Received: by 2002:a62:67c3:: with SMTP id t64-v6mr10225425pfj.76.1539612359472; Mon, 15 Oct 2018 07:05:59 -0700 (PDT) Received: from tomato.housegordon.com (moose.housegordon.com. [184.68.105.38]) by smtp.googlemail.com with ESMTPSA id h77-v6sm21227916pfh.13.2018.10.15.07.05.57 for <control <at> debbugs.gnu.org> (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 15 Oct 2018 07:05:57 -0700 (PDT) To: control <at> debbugs.gnu.org From: Assaf Gordon <assafgordon@HIDDEN> Message-ID: <b1e0e40e-d722-270a-27d8-972ceaf1ec2b@HIDDEN> Date: Mon, 15 Oct 2018 08:05:56 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.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 9365 wishlist retitle 9365 multibyte: tr: TR operates on bytes, not characters retitle 9446 cp: acl preservation problem on FreeBSD 8.1 severity 9472 wishlist [...] Content analysis details: (2.0 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (assafgordon[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.210.181 listed in wl.mailspike.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [209.85.210.181 listed in list.dnswl.org] 1.8 MISSING_SUBJECT Missing Subject: header 0.2 NO_SUBJECT Extra score for no subject 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: 1.0 (+) severity 9365 wishlist retitle 9365 multibyte: tr: TR operates on bytes, not characters retitle 9446 cp: acl preservation problem on FreeBSD 8.1 severity 9472 wishlist
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.