Hubert Kario
2012-May-01 12:38 UTC
[PATCH v2 0/5] Allow for quick removing of btrfs signature from block device
If there is a btrfs created on a raw block device (raw disk) and later there are created partitions and btrfs file systems created on partitions, subsequent `btrfs device scan` won''t remove the btrfs signature from the raw block device. This patch series adds `btrfs device zero super <dev>` command to remove the btrfs signature from the device as well as fix few minor problems in btrfs_prepare_device function. This obsoletes my previous patch "btrfs: add command to zero out superblock". V1->V2 changes: better error reporting when there are problems with only one of the devices passed as parameters. Hubert Kario (5): btrfs: add command to zero out superblock handle null pointers in btrfs_prepare_device Remove unused option in btrfs_prepare_device better error handling in btrfs_prepare_device() btrfs: remove unused variables btrfs-vol.c | 2 +- cmds-device.c | 45 ++++++++++++++++++++++++++++++++++++++++++++- man/btrfs.8.in | 7 +++++++ mkfs.c | 12 ++++++------ utils.c | 41 ++++++++++++++++++++++++----------------- utils.h | 4 ++-- 6 files changed, 84 insertions(+), 27 deletions(-) -- 1.7.10 -- 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
Tomasz Torcz
2012-May-01 12:43 UTC
Re: [PATCH v2 0/5] Allow for quick removing of btrfs signature from block device
On Tue, May 01, 2012 at 02:38:01PM +0200, Hubert Kario wrote:> This patch series adds `btrfs device zero super <dev>` command to remove the > btrfs signature from the device as well as fix few minor problems in > btrfs_prepare_device function.Shouldn''t you rather extend “wipefs” from util-linux? -- Tomasz Torcz 72->| 80->| xmpp: zdzichubg@chrome.pl 72->| 80->| -- 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
Hubert Kario
2012-May-01 13:37 UTC
Re: [PATCH v2 0/5] Allow for quick removing of btrfs signature from block device
On Tuesday 01 of May 2012 14:43:37 Tomasz Torcz wrote:> On Tue, May 01, 2012 at 02:38:01PM +0200, Hubert Kario wrote: > > This patch series adds `btrfs device zero super <dev>` command to remove > > the btrfs signature from the device as well as fix few minor problems in > > btrfs_prepare_device function. > > Shouldn''t you rather extend “wipefs” from util-linux?wipefs v.2.21.1 does detect btrfs so there''s no need to. I''d guess that most people will be thinking about btrfs RAID management in LVM or MD terms, so the zero-superblock option should be available in the btrfs tool proper (as similar option is avaiable in mdadm). Adding it is trivial (look at my V1 patch) and does not introduce special code. What''s more, wipefs demages only the first superblock (so the fs is still mountable using btrfs-select-super -s 1 <dev>), while btrfs device zero- superblock removes all superblocks. Regards, -- Hubert Kario QBS - Quality Business Software 02-656 Warszawa, ul. Ksawerów 30/85 tel. +48 (22) 646-61-51, 646-74-24 www.qbs.com.pl -- 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