From patchwork Tue Mar 3 11:47:39 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Thorarensen X-Patchwork-Id: 5921851 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 5704BBF440 for ; Tue, 3 Mar 2015 12:21:19 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 12CDE202B4 for ; Tue, 3 Mar 2015 12:21:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 94CEA202A1 for ; Tue, 3 Mar 2015 12:21:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755089AbbCCMVE (ORCPT ); Tue, 3 Mar 2015 07:21:04 -0500 Received: from mxf2.bahnhof.se ([213.80.101.26]:49380 "EHLO mxf2.bahnhof.se" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754262AbbCCMVC (ORCPT ); Tue, 3 Mar 2015 07:21:02 -0500 Received: from localhost (mxf2.local [127.0.0.1]) by mxf2-reinject (Postfix) with ESMTP id 467E41D977B for ; Tue, 3 Mar 2015 12:47:48 +0100 (CET) X-Virus-Scanned: by amavisd-new using ClamAV at bahnhof.se (MXF2) X-Spam-Score: 0.306 X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from mxf2.bahnhof.se ([127.0.0.1]) by localhost (mxf2.bahnhof.se [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id LPc3hVpyPCj4 for ; Tue, 3 Mar 2015 12:47:40 +0100 (CET) Received: from miria.naju.se (h-219-91.a163.priv.bahnhof.se [85.24.219.91]) by mxf2.bahnhof.se (Postfix) with ESMTP id 231161D977D for ; Tue, 3 Mar 2015 12:47:39 +0100 (CET) Received: from sebban (helo=localhost) by miria.naju.se with local-esmtp (Exim 4.80) (envelope-from ) id 1YSlIZ-0002vn-L9 for linux-btrfs@vger.kernel.org; Tue, 03 Mar 2015 12:47:39 +0100 Date: Tue, 3 Mar 2015 12:47:39 +0100 (CET) From: Sebastian Thorarensen X-X-Sender: sebban@miria.naju.se To: linux-btrfs@vger.kernel.org Subject: [PATCH] btrfs-progs: btrfs-convert: Allow setting nodesize Message-ID: <2f1ccb99432d65ebd1500f685e53ec98bdc259e7.1425382454.git.sebth@naju.se> User-Agent: Alpine 2.02 (DEB 1266 2009-07-14) MIME-Version: 1.0 Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Allow btrfs-convert to use nodesizes other than 4096. It defaults to max(16384, pagesize), like mkfs. The constant DEFAULT_MKFS_LEAF_SIZE has been moved to utils.h and renamed to BTRFS_MKFS_DEFAULT_NODE_SIZE for consistency. convert-tests now test both 4096 and 16384 nodesizes. Signed-off-by: Sebastian Thorarensen --- Documentation/btrfs-convert.txt | 4 ++ btrfs-convert.c | 80 +++++++++++++++++++++++++++++++++++---- mkfs.c | 5 +-- tests/convert-tests.sh | 15 +++++--- utils.h | 1 + 5 files changed, 89 insertions(+), 16 deletions(-) diff --git a/Documentation/btrfs-convert.txt b/Documentation/btrfs-convert.txt index e508c34..5cf9d03 100644 --- a/Documentation/btrfs-convert.txt +++ b/Documentation/btrfs-convert.txt @@ -23,6 +23,10 @@ Disable data checksum. Ignore xattrs and ACLs. -n:: Disable packing of small files. +-N :: +Set filesystem nodesize, the tree block size in which btrfs stores data. +The default value is 16KB (16384) or the page size, whichever is bigger. +Must be a multiple of the ext2/3/4 block size, but not larger than 65536. -r:: Roll back to ext2fs. -l