From patchwork Wed Jun 15 20:28:58 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Goffredo Baroncelli X-Patchwork-Id: 883492 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p5FKStFp010554 for ; Wed, 15 Jun 2011 20:28:55 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751981Ab1FOU2w (ORCPT ); Wed, 15 Jun 2011 16:28:52 -0400 Received: from smtp208.alice.it ([82.57.200.104]:33898 "EHLO smtp208.alice.it" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751555Ab1FOU2w (ORCPT ); Wed, 15 Jun 2011 16:28:52 -0400 Received: from [192.168.7.27] (87.17.216.8) by smtp208.alice.it (8.5.124.08) (authenticated as kreijack@alice.it) id 4DE64DF101632C29; Wed, 15 Jun 2011 22:28:50 +0200 Message-ID: <4DF9160A.4020102@libero.it> Date: Wed, 15 Jun 2011 22:28:58 +0200 From: Goffredo Baroncelli Reply-To: kreijack@inwind.it User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110606 Iceowl/1.0b2 Icedove/3.1.10 MIME-Version: 1.0 To: linux-btrfs@vger.kernel.org CC: Hugo Mills Subject: [RFC][BTRFS-PROG] Avoid to scan cdrom and floppy X-Enigmail-Version: 1.1.2 Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Wed, 15 Jun 2011 20:28:56 +0000 (UTC) Hi all, thanks to the last Hugo's email, I restart to work on the patch which avoid to scan cdrom and floppy during a "btrfs filesystem show" and a "btrfs device scan". Comparing to my previous patch I modified the strategy, and now the scan of the devices is based on the content of the file /proc/partitions. The old behavior may be set passing the "--all-devices" options. I resend as RFC, because this change may be incompatible with the old behavior. Frankly speaking I don't see any problem, but I think that it is better to discuss in the mailing list. You can pull the patch also from http://cassiopea.homelinux.net/git/btrfs-progs-unstable.git branch scan-proc-partitions Comment are welcome The diff is computed against the Hugo's repository btrfs.c | 4 +- btrfs_cmds.c | 47 ++++++++++++++++++++++++++++++++++++++++---- man/btrfs.8.in | 26 +++++++++++++++--------- utils.c | 58 +++++++++++++++++++++++++++++++++++++++++++++++++ utils.h | 2 + 5 files changed, 120 insertions(+), 17 deletions(-) #endif --- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/btrfs.c b/btrfs.c index 87cc680..c6ae692 100644 --- a/btrfs.c +++ b/btrfs.c @@ -104,7 +104,7 @@ static struct Command commands[] = { NULL }, { do_show_filesystem, 999, - "filesystem show", "[||