From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from userp1040.oracle.com ([156.151.31.81]:41171 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752136Ab3EJLAL (ORCPT ); Fri, 10 May 2013 07:00:11 -0400 Received: from acsinet21.oracle.com (acsinet21.oracle.com [141.146.126.237]) by userp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id r4AB09mq029066 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 10 May 2013 11:00:10 GMT Received: from aserz7021.oracle.com (aserz7021.oracle.com [141.146.126.230]) by acsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r4AB09W4026738 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for ; Fri, 10 May 2013 11:00:09 GMT Received: from abhmt119.oracle.com (abhmt119.oracle.com [141.146.116.71]) by aserz7021.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r4AB093k026724 for ; Fri, 10 May 2013 11:00:09 GMT From: Anand Jain To: linux-btrfs@vger.kernel.org Subject: [PATCH] filesystem show need to read from the kernel Date: Fri, 10 May 2013 19:02:42 +0800 Message-Id: <1368183764-7865-1-git-send-email-anand.jain@oracle.com> Sender: linux-btrfs-owner@vger.kernel.org List-ID: (This is a review patch to seek comments and review, not yet ready for the integration). The motivation to write this patch is that 'btrfs fi show' shows the stale information after the dev del. So this adds two ioctls to read fsinfo and devinfo from the kernel and report to the user. This is done by providing option -k (which reports only mounted fs and disks) and -K (which reports both mounted/ unmounted-stale fs) from the kernel as shown below. ------ usage: btrfs filesystem show [-k|K] [--all-devices] [|