From patchwork Thu Sep 1 08:52:23 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "jeff.liu" X-Patchwork-Id: 1118472 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p818qfrm010497 for ; Thu, 1 Sep 2011 08:52:45 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756484Ab1IAIwi (ORCPT ); Thu, 1 Sep 2011 04:52:38 -0400 Received: from acsinet15.oracle.com ([141.146.126.227]:60349 "EHLO acsinet15.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756429Ab1IAIwh (ORCPT ); Thu, 1 Sep 2011 04:52:37 -0400 Received: from acsinet22.oracle.com (acsinet22.oracle.com [141.146.126.238]) by acsinet15.oracle.com (Switch-3.4.4/Switch-3.4.4) with ESMTP id p818qZZF010590 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 1 Sep 2011 08:52:37 GMT Received: from acsmt358.oracle.com (acsmt358.oracle.com [141.146.40.158]) by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id p818qZYR016199 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 1 Sep 2011 08:52:35 GMT Received: from abhmt107.oracle.com (abhmt107.oracle.com [141.146.116.59]) by acsmt358.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id p818qTgR001253 for ; Thu, 1 Sep 2011 03:52:29 -0500 Received: from [192.168.1.103] (/221.223.117.210) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 01 Sep 2011 01:52:29 -0700 Message-ID: <4E5F47C7.3030803@oracle.com> Date: Thu, 01 Sep 2011 16:52:23 +0800 From: Jeff Liu Reply-To: jeff.liu@oracle.com Organization: Oracle User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.18) Gecko/20110617 Thunderbird/3.1.11 MIME-Version: 1.0 To: linux-btrfs@vger.kernel.org CC: chris.mason@oracle.com Subject: [PATCH] Btrfs-progs: added btrfs filesystem label [label] [path] support X-Source-IP: acsinet22.oracle.com [141.146.126.238] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090202.4E5F47D5.00CA:SCFMA922111, ss=1, re=-4.000, fgs=0 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 (demeter1.kernel.org [140.211.167.41]); Thu, 01 Sep 2011 08:52:45 +0000 (UTC) Hello, This patch make use of the new ioctl(2) to set Btrfs label via `btrfs filesystem label` command. Signed-off-by: Jie Liu --- btrfs.c | 7 +++---- btrfs_cmds.c | 27 +++++++++++++++++++++++++++ btrfs_cmds.h | 1 + ctree.h | 6 ++++++ ioctl.h | 2 ++ mkfs.c | 19 ------------------- utils.c | 18 ++++++++++++++++++ utils.h | 1 + 8 files changed, 58 insertions(+), 23 deletions(-) diff --git a/btrfs.c b/btrfs.c index 46314cf..6d414f1 100644 --- a/btrfs.c +++ b/btrfs.c @@ -108,11 +108,10 @@ static struct Command commands[] = { "device delete", " [..] \n" "Remove a device from a filesystem." }, - /* coming soon - { 2, "filesystem label", "