From patchwork Mon Sep 13 19:24:14 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Goffredo Baroncelli X-Patchwork-Id: 175392 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id o8DJL7Pk002382 for ; Mon, 13 Sep 2010 19:21:07 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754685Ab0IMTVD (ORCPT ); Mon, 13 Sep 2010 15:21:03 -0400 Received: from mail-bw0-f46.google.com ([209.85.214.46]:61059 "EHLO mail-bw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754689Ab0IMTVB (ORCPT ); Mon, 13 Sep 2010 15:21:01 -0400 Received: by mail-bw0-f46.google.com with SMTP id 11so4780380bwz.19 for ; Mon, 13 Sep 2010 12:21:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:reply-to:to:subject:date :user-agent:cc:mime-version:content-type:content-transfer-encoding :message-id; bh=kmwwByPmWg30o/VjZ/3RduhUy8USzBrbDlDoUkpUUw0=; b=CQ5yhvqdam+9Okp+yzyzijVh1YSyyB19ansW6suG3UWpSifUs2I3I64Y9UZKZUoOWy BRO4y1yPrLWLTZTC3MmHXrt9olc3A3sc1+c0DW4Vvyh4WM1J2O3UGWa0R+XqcofCWHUM Tm6O9YH+lKpoDd+aO2+l2nJ2LKQCXl/s17Z9k= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:reply-to:to:subject:date:user-agent:cc:mime-version :content-type:content-transfer-encoding:message-id; b=is1Cz8NSlYPMdSl+mft9HDPBuCjdY3Svr175dgy7igFZmGSzHaC+C/2BR5eHGdAV+F R85YSzh+v0SCYYRHd5q54ho+MvG3MIjS3n8hidOf9bNsajRFVC3OdM9ZfXbdy8dC2pny 6WlRBKtLS+kG+ipkOV/0Ni1Ukyq4wxghwYjP8= Received: by 10.204.15.148 with SMTP id k20mr3527367bka.74.1284405659411; Mon, 13 Sep 2010 12:20:59 -0700 (PDT) Received: from venice.localnet ([87.19.231.7]) by mx.google.com with ESMTPS id s34sm4973648bkk.13.2010.09.13.12.20.57 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 13 Sep 2010 12:20:58 -0700 (PDT) From: Goffredo Baroncelli Reply-To: kreijack@inwind.it To: chris.mason@oracle.com, linux-btrfs@vger.kernel.org Subject: [PATCH] Add the "btrfs filesystem label" command Date: Mon, 13 Sep 2010 21:24:14 +0200 User-Agent: KMail/1.13.5 (Linux/2.6.35-trunk-amd64; KDE/4.4.5; x86_64; ; ) Cc: Felix Blanke MIME-Version: 1.0 Message-Id: <201009132124.14402.kreijack@inwind.it> 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.3 (demeter1.kernel.org [140.211.167.41]); Mon, 13 Sep 2010 19:21:07 +0000 (UTC) diff --git a/Makefile b/Makefile index 525676e..c06e512 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ CFLAGS = -g -Werror -Os objects = ctree.o disk-io.o radix-tree.o extent-tree.o print-tree.o \ root-tree.o dir-item.o file-item.o inode-item.o \ inode-map.o crc32c.o rbtree.o extent-cache.o extent_io.o \ - volumes.o utils.o btrfs-list.o + volumes.o utils.o btrfs-list.o btrfslabel.o # CHECKFLAGS=-D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ -Wbitwise \ diff --git a/btrfs.c b/btrfs.c index ab5e57f..ab0a9da 100644 --- a/btrfs.c +++ b/btrfs.c @@ -95,6 +95,10 @@ static struct Command commands[] = { "filesystem balance", "\n" "Balance the chunks across the device." }, + { do_change_label, -1, + "filesystem label", " [