Re: [PATCH 2/5] locks: new locks_mandatory_area calling convention

2015-11-30 Thread Christoph Hellwig
On Mon, Nov 30, 2015 at 05:38:30PM -0500, J. Bruce Fields wrote: > > + if (size < inode->i_size) { > > + return locks_mandatory_area(filp, size, inode->i_size - 1, > > + true); > > + } else { > > + return locks_mandatory_area(filp, inode->i_size, si

[PATCH v2 00/25] Btrfs-convert rework to support separate chunk type

2015-11-30 Thread Qu Wenruo
Here comes the 2st version of btrfs-convert rework. This time, it is rebased to co-operate with David new abstraction work for incoming reiserfs support. (Sorry David, your reiserfs support will need more modification as the abstraction facility is also modified in this patchset) Any test is welco

[PATCH v2 10/25] btrfs-progs: Introduce function to setup temporary chunk root

2015-11-30 Thread Qu Wenruo
Introduce new function, setup_temp_chunk_root(), to initialize temporary chunk root for make_btrfs_v2(). Signed-off-by: Qu Wenruo --- utils.c | 171 1 file changed, 171 insertions(+) diff --git a/utils.c b/utils.c index fa26949..4

[PATCH v2 04/25] btrfs-progs: convert: Introduce functions to read used space

2015-11-30 Thread Qu Wenruo
Before we do real convert, we need to read and build up used space cache tree for later data/meta separate chunk layout. This patch will iterate all used blocks in ext2 filesystem and record it into cctx->used cache tree, for later use. This provides the very basic of later btrfs-convert rework.

[PATCH v2 08/25] btrfs-progs: Introduce function to setup temporary superblock

2015-11-30 Thread Qu Wenruo
Introduce a new function, setup_temp_super(), to setup temporary super for make_btrfs_v2(). Signed-off-by: Qu Wenruo --- utils.c | 117 1 file changed, 117 insertions(+) diff --git a/utils.c b/utils.c index 4310964..444b3f3 100644

[PATCH v2 20/25] btrfs-progs: convert: Enhance record_file_blocks to handle reserved ranges

2015-11-30 Thread Qu Wenruo
Enhance record_file_blocks() to handle reserved ranges. Old file system can use the space in btrfs reserved ranges. So we could not use the bytenr of old filesystem directly. Thanks to previous patches, we have a full fs image in convert_root, and it has already relocated the blocks in reserved r

[PATCH v2 18/25] btrfs-progs: convert: Introduce new function to create converted image

2015-11-30 Thread Qu Wenruo
Use new function, create_convert_image_v2() to create snapshot of old filesystem. Unlike old function which is called after copying all inodes, this function need to be called before copying inodes. Signed-off-by: Qu Wenruo --- btrfs-convert.c | 184 +

[PATCH v2 11/25] btrfs-progs: Introduce function to initialize device tree

2015-11-30 Thread Qu Wenruo
Introduce new function, setup_temp_device_tree(), to setup temporary device tree for make_btrfs_v2(). Signed-off-by: Qu Wenruo --- utils.c | 56 +++- 1 file changed, 55 insertions(+), 1 deletion(-) diff --git a/utils.c b/utils.c index 47ed4f1.

[PATCH v2 21/25] btrfs-progs: convert: Introduce init_btrfs_v2 function.

2015-11-30 Thread Qu Wenruo
Introduce new init_btrfs_v2() function for later newer do_convert(). Since we have good enough chunk allocation, a lot of wired chunk hack won't ever be used. We only need to insert data chunks and create needed subvolume. Signed-off-by: Qu Wenruo --- btrfs-convert.c | 61 ++

[PATCH v2 22/25] btrfs-progs: Introduce do_convert_v2 function

2015-11-30 Thread Qu Wenruo
Introduce new function do_convert_v2() to do new convert. Signed-off-by: Qu Wenruo --- btrfs-convert.c | 177 +++- 1 file changed, 176 insertions(+), 1 deletion(-) diff --git a/btrfs-convert.c b/btrfs-convert.c index ce6c59b..17ce8ac 100644 --

[PATCH v2 23/25] btrfs-progs: Convert: Add support for rollback new convert behavior

2015-11-30 Thread Qu Wenruo
Add support to rollback new btrfs-convert. The support is quite easy unlike the new convert behavior, which in fact makes the rollback less restricted. The core is, rollback must support both old and new convert result. For old convert, all fs image extents can be covered by any chunk type. But

[PATCH v2 15/25] btrfs-progs: Introduce function to create convert data chunks

2015-11-30 Thread Qu Wenruo
Introduce new function, make_convert_data_chunks(), to build up data chunks for convert. It will call a modified verion of btrfs_alloc_data_chunk() to force data chunks to cover all known ext* data. Signed-off-by: Qu Wenruo --- btrfs-convert.c | 50 ++

[PATCH v2 17/25] btrfs-progs: extent-tree: Enhance btrfs_record_file_extent

2015-11-30 Thread Qu Wenruo
Btrfs_record_file_extent() has some small problems like: 1) Can't handle overlap extent 2) May create extent larger than BTRFS_MAX_EXTENT_SIZE So enhance it using previous added facilites. This is used for later btrfs-convert, as for new convert, we create save image first, then copy inode. Which

[PATCH v2 13/25] btrfs-progs: Introduce function to initialize csum tree

2015-11-30 Thread Qu Wenruo
Introduce new function, setup_temp_csum_tree(), to setup temporary csum tree for make_btrfs_v2(). Signed-off-by: Qu Wenruo --- utils.c | 25 + 1 file changed, 25 insertions(+) diff --git a/utils.c b/utils.c index 3251e18..43bc6cf 100644 --- a/utils.c +++ b/utils.c @@ -67

[PATCH v2 09/25] btrfs-progs: Introduce function to setup temporary tree root

2015-11-30 Thread Qu Wenruo
Introduce new function, setup_temp_tree_root(), to initialize temporary tree root for make_btrfs_v2(). The new function will setup tree root at metadata chunk and ensure data won't be written into metadata chunk. Also, new make_btrfs_v2() will have a much better code structure than old make_btrfs

[PATCH v2 14/25] btrfs-progs: Introduce function to setup temporary extent tree

2015-11-30 Thread Qu Wenruo
Introduce new function, setup_temporary_extent_tree() to build a temporary extent tree for make_btrfs_v2(). Signed-off-by: Qu Wenruo --- utils.c | 198 +++- 1 file changed, 197 insertions(+), 1 deletion(-) diff --git a/utils.c b/utils.

[PATCH v2 24/25] btrfs-progs: convert: Strictly avoid meta or system chunk allocation

2015-11-30 Thread Qu Wenruo
Before this patch, btrfs-convert only rely on large enough initial system/metadata chunk size to ensure no newer system/meta chunk will be created. But that's not safe enough. So add two new members in fs_info, avoid_sys/meta_chunk_alloc flags to prevent any newer system or meta chunks to be creat

[PATCH v2 25/25] btrfs-progs: Cleanup old btrfs-convert

2015-11-30 Thread Qu Wenruo
Cleanup all the old btrfs-convert facilities, including: 1) btrfs_convert_operations->alloc/free/test_extents* No need to do non-standard extent allocation. After init_btrfs() everything can be done by normal routine. Now only 4 functions are needed in btrfs_convert_operations. 1) open

[PATCH v2 19/25] btrfs-progs: convert: Introduce function to migrate reserved ranges

2015-11-30 Thread Qu Wenruo
Introduce new function, migrate_reserved_ranges() to migrate used fs data in btrfs reserved space. Unlike old implement, which will need to relocate all the complicated csum and reference relocation, previous patches already ensure such reserved ranges won't be allocated. So here we only need copy

[PATCH v2 16/25] btrfs-progs: extent-tree: Introduce function to find the first overlap extent.

2015-11-30 Thread Qu Wenruo
Introduce a new function, btrfs_search_overlap_extent() to find the first overlap extent. It's useful for later btrfs-convert rework. Signed-off-by: Qu Wenruo --- ctree.c | 24 +++ ctree.h | 2 ++ extent-tree.c | 63 ++

[PATCH v2 03/25] btrfs-progs: Introduce new members for btrfs_convert_context

2015-11-30 Thread Qu Wenruo
Introduce 3 new members for btrfs_convert_context: 1) struct cache_tree used Records accurate byte ranges which are used by old filesystem. This will be used to create old filesystem image. 2) struct cache_tree data_chunks Records batched ranges which must be covered by data chunks. The bytenr ra

[PATCH v2 06/25] btrfs-progs: convert: Introduce function to calculate the available space

2015-11-30 Thread Qu Wenruo
Introduce a new function, calculate_available_space() to get available space cache_tree data_chunks cache_tree. Unlike old implement, this function will do the new work: 1) batch used ext* data space. To ensure data chunks will recovery them all. And restore the result into mkfs_cfg->convert

[PATCH v2 02/25] btrfs-progs: extent-tree: Add add_merge_cache_extent function

2015-11-30 Thread Qu Wenruo
This add_merge_cache_extent() function will try to merge adjusted cache_extent. This is used for later btrfs-convert ext2 free space cache. Signed-off-by: Qu Wenruo --- extent-cache.c | 57 + extent-cache.h | 8 2 files changed,

[PATCH v2 07/25] btrfs-progs: utils: Introduce new function for convert

2015-11-30 Thread Qu Wenruo
Introduce new function make_convert_btrfs() for convert. This new function will have the following features: 1) Alloc temporary sb/metadata/system chunk, avoiding old used data 2) More structurizd functions No more over 1000 lines function, better function split and code reuse This will fin

[PATCH v2 05/25] btrfs-progs: convert: Introduce new function to remove reserved ranges

2015-11-30 Thread Qu Wenruo
Introduce functions to remove reserved ranges for later btrfs-convert rework. The reserved ranges includes: 1. [0,1M) 2. [btrfs_sb_offset(1), +BTRFS_STRIP_LEN) 3. [btrfs_sb_offset(2), +BTRFS_STRIP_LEN) Signed-off-by: Qu Wenruo --- btrfs-convert.c | 117 ++

[PATCH v2 12/25] btrfs-progs: Introduce function to initialize fs tree

2015-11-30 Thread Qu Wenruo
Introudce new function, setup_temp_fs_tree(), to setup temporary fs tree for make_btrfs_v2(). Signed-off-by: Qu Wenruo --- utils.c | 26 ++ 1 file changed, 26 insertions(+) diff --git a/utils.c b/utils.c index 4861caa..3251e18 100644 --- a/utils.c +++ b/utils.c @@ -652,6

[PATCH v2 01/25] btrfs-progs: extent-cache: Add comments for search/lookup functions

2015-11-30 Thread Qu Wenruo
There are quite a lot search/lookup functions with different behavior, add comments for them, as it will take extra time to view source to understand the behavior difference. Signed-off-by: Qu Wenruo --- extent-cache.h | 31 +++ 1 file changed, 31 insertions(+) diff

Re: Bug/regression: Read-only mount not read-only

2015-11-30 Thread Qu Wenruo
Chris Mason wrote on 2015/11/30 11:48 -0500: On Sat, Nov 28, 2015 at 01:46:34PM +, Hugo Mills wrote: We've just had someone on IRC with a problem mounting their FS. The main problem is that they've got a corrupt log tree. That isn't the subject of this email, though. The issue I'd

Re: BUG: failure at fs/btrfs/ctree.h:337/btrfs_chunk_item_size()!

2015-11-30 Thread Qu Wenruo
Vegard Nossum wrote on 2015/11/30 23:05 +0100: On 11/30/2015 05:34 PM, David Sterba wrote: On Mon, Nov 30, 2015 at 02:48:51PM +0100, David Sterba wrote: On Sun, Nov 15, 2015 at 07:21:17PM +0100, Vegard Nossum wrote: With the attached btrfs image, I get the following splat when mounting: """

Re: [RFC] Btrfs device and pool management (wip)

2015-11-30 Thread Qu Wenruo
Austin S Hemmelgarn wrote on 2015/11/30 09:51 -0500: On 2015-11-30 02:59, Anand Jain wrote: Data center systems are generally aligned with the RAS (Reliability, Availability and Serviceability) attributes. When it comes to Storage, RAS applies even more because its matter of trust. In this c

Re: vfs: move btrfs clone ioctls to common code

2015-11-30 Thread J. Bruce Fields
On Thu, Nov 26, 2015 at 07:50:54PM +0100, Christoph Hellwig wrote: > This patch set moves the existing btrfs clone ioctls that other file > system have started to implement to common code, and allows the NFS > server to export this functionality to remote systems. > > This work is based originally

Re: [PATCH 2/5] locks: new locks_mandatory_area calling convention

2015-11-30 Thread J. Bruce Fields
On Thu, Nov 26, 2015 at 07:50:56PM +0100, Christoph Hellwig wrote: > Pass a loff_t end for the last byte instead of the 32-bit count > parameter to allow full file clones even on 32-bit architectures. > While we're at it also drop the pointless inode argument and simplify > the read/write selection

Re: BUG: failure at fs/btrfs/ctree.h:337/btrfs_chunk_item_size()!

2015-11-30 Thread Vegard Nossum
On 11/30/2015 05:34 PM, David Sterba wrote: On Mon, Nov 30, 2015 at 02:48:51PM +0100, David Sterba wrote: On Sun, Nov 15, 2015 at 07:21:17PM +0100, Vegard Nossum wrote: With the attached btrfs image, I get the following splat when mounting: """ # mount -o loop -t btrfs ./btrfs.0 /mnt/0/ BTRFS:

[PATCH 05/10] btrfs: Use xattr handler infrastructure

2015-11-30 Thread Andreas Gruenbacher
Use the VFS xattr handler infrastructure and get rid of similar code in the filesystem. Signed-off-by: Andreas Gruenbacher Cc: Chris Mason Cc: Josef Bacik Cc: David Sterba Cc: linux-btrfs@vger.kernel.org --- fs/btrfs/inode.c | 8 +-- fs/btrfs/xattr.c | 166 --

Re: [RFC] Btrfs device and pool management (wip)

2015-11-30 Thread Chris Murphy
On Mon, Nov 30, 2015 at 1:37 PM, Austin S Hemmelgarn wrote: > I've had multiple cases of disks that got one write error then were fine for > more than a year before any further issues. My thought is add an option to > retry that single write after some short delay (1-2s maybe), and if it still >

Re: [RFC] Btrfs device and pool management (wip)

2015-11-30 Thread Austin S Hemmelgarn
On 2015-11-30 15:17, Chris Murphy wrote: On Mon, Nov 30, 2015 at 7:51 AM, Austin S Hemmelgarn wrote: General thoughts on this: 1. If there's a write error, we fail unconditionally right now. It would be nice to have a configurable number of retries before failing. I'm unconvinced. I pretty

Re: [RFC] Btrfs device and pool management (wip)

2015-11-30 Thread Chris Murphy
On Mon, Nov 30, 2015 at 7:51 AM, Austin S Hemmelgarn wrote: > General thoughts on this: > 1. If there's a write error, we fail unconditionally right now. It would be > nice to have a configurable number of retries before failing. I'm unconvinced. I pretty much immediately do not trust a block d

Re: shall distros run btrfsck on boot?

2015-11-30 Thread Jeff Mahoney
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 11/29/15 8:59 PM, Qu Wenruo wrote: > > > Jeff Mahoney wrote on 2015/11/28 11:52 -0500: On 11/23/15 11:02 > PM, Christoph Anton Mitterer wrote: Hey. Short question since that came up on debian-devel. Now that btrfs check

Re: slowness when cp respectively send/receiving on top of dm-crypt

2015-11-30 Thread Henk Slager
On Mon, Nov 30, 2015 at 6:02 AM, Duncan <1i5t5.dun...@cox.net> wrote: >>> What are you using to tell you it has 1018391 extents? If you're using >>> filefrag, it's known not to understand btrfs compression, which uses >>> 128 KiB (pre-compression size, I believe, tho I'm not absolutely >>> positiv

Re: "disk full" on a 5 GB btrfs filesystem, FAQ outdated?

2015-11-30 Thread Marc Haber
On Mon, Nov 30, 2015 at 05:44:23AM +, Duncan wrote: > Yes, you can get dup metadata back, but because data and metadata > are now combined in the same blockgroups (aka chunks), they must > both be the same replication type. Thanks for this explanation, it's perfectly clear to me now. Greeting

Re: Bug/regression: Read-only mount not read-only

2015-11-30 Thread Austin S Hemmelgarn
On 2015-11-30 11:48, Chris Mason wrote: On Sat, Nov 28, 2015 at 01:46:34PM +, Hugo Mills wrote: We've just had someone on IRC with a problem mounting their FS. The main problem is that they've got a corrupt log tree. That isn't the subject of this email, though. The issue I'd like t

Re: Bug/regression: Read-only mount not read-only

2015-11-30 Thread Hugo Mills
On Mon, Nov 30, 2015 at 11:48:01AM -0500, Chris Mason wrote: > On Sat, Nov 28, 2015 at 01:46:34PM +, Hugo Mills wrote: > >We've just had someone on IRC with a problem mounting their FS. The > > main problem is that they've got a corrupt log tree. That isn't the > > subject of this email, th

Re: Bug/regression: Read-only mount not read-only

2015-11-30 Thread Chris Mason
On Sat, Nov 28, 2015 at 01:46:34PM +, Hugo Mills wrote: >We've just had someone on IRC with a problem mounting their FS. The > main problem is that they've got a corrupt log tree. That isn't the > subject of this email, though. > >The issue I'd like to raise is that even with -oro as a

Re: BUG: failure at fs/btrfs/ctree.h:337/btrfs_chunk_item_size()!

2015-11-30 Thread David Sterba
On Mon, Nov 30, 2015 at 02:48:51PM +0100, David Sterba wrote: > On Sun, Nov 15, 2015 at 07:21:17PM +0100, Vegard Nossum wrote: > > With the attached btrfs image, I get the following splat when mounting: > > > > """ > > # mount -o loop -t btrfs ./btrfs.0 /mnt/0/ > > BTRFS: device fsid 9006933e-2a9a

[PATCH 2/2] btrfs: verbose error when we find an unexpected item in sys_array

2015-11-30 Thread David Sterba
Signed-off-by: David Sterba --- fs/btrfs/volumes.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index b5d6c53d2441..e73e4a1aef91 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c @@ -6530,6 +6530,9 @@ int btrfs_read_sys_array(struct btrfs_r

[PATCH 1/2] btrfs: handle invalid num_stripes in sys_array

2015-11-30 Thread David Sterba
We can handle the special case of num_stripes == 0 directly inside btrfs_read_sys_array. The BUG_ON in btrfs_chunk_item_size is there to catch other unhandled cases where we fail to validate external data. A crafted or corrupted image crashes at mount time: BTRFS: device fsid 9006933e-2a9a-44f0-9

[PATCH 0/2] Add more sys_array error handling

2015-11-30 Thread David Sterba
Fix for Vegard Nossum's report [1]. I found an older report in our bugzilla, so there goes also Jiri's reported-by. [1] http://article.gmane.org/gmane.comp.file-systems.btrfs/50230 David Sterba (2): btrfs: handle invalid num_stripes in sys_array btrfs: verbose error when we find an unexpected

Re: Bug/regression: Read-only mount not read-only

2015-11-30 Thread Austin S Hemmelgarn
On 2015-11-30 10:28, Hugo Mills wrote: On Mon, Nov 30, 2015 at 09:59:40AM -0500, Austin S Hemmelgarn wrote: On 2015-11-28 08:46, Hugo Mills wrote: We've just had someone on IRC with a problem mounting their FS. The main problem is that they've got a corrupt log tree. That isn't the subject

[PATCH] btrfs: better packing of btrfs_delayed_extent_op

2015-11-30 Thread David Sterba
btrfs_delayed_extent_op can be packed in a better way, it's 40 bytes now and has 8 unused bytes. Reducing the level type to u8 makes it possible to squeeze it to the padding byte after key. The bitfields were switched to bool as there's space to store the full byte without increasing the whole stru

Re: Bug/regression: Read-only mount not read-only

2015-11-30 Thread Hugo Mills
On Mon, Nov 30, 2015 at 09:59:40AM -0500, Austin S Hemmelgarn wrote: > On 2015-11-28 08:46, Hugo Mills wrote: > >We've just had someone on IRC with a problem mounting their FS. The > >main problem is that they've got a corrupt log tree. That isn't the > >subject of this email, though. > > > >

Re: shall distros run btrfsck on boot?

2015-11-30 Thread Austin S Hemmelgarn
On 2015-11-28 11:52, Jeff Mahoney wrote: On 11/23/15 11:02 PM, Christoph Anton Mitterer wrote: Hey. Short question since that came up on debian-devel. Now that btrfs check get's more and more useful, are the developers going to recommend running it periodically on boot (of course that wouldn't

Re: Bug/regression: Read-only mount not read-only

2015-11-30 Thread Austin S Hemmelgarn
On 2015-11-28 08:46, Hugo Mills wrote: We've just had someone on IRC with a problem mounting their FS. The main problem is that they've got a corrupt log tree. That isn't the subject of this email, though. The issue I'd like to raise is that even with -oro as a point option, the FS is tr

Re: [RFC] Btrfs device and pool management (wip)

2015-11-30 Thread Austin S Hemmelgarn
On 2015-11-30 02:59, Anand Jain wrote: Data center systems are generally aligned with the RAS (Reliability, Availability and Serviceability) attributes. When it comes to Storage, RAS applies even more because its matter of trust. In this context, one of the primary area that a typical volume ma

Re: How to detect / notify when a raid drive fails?

2015-11-30 Thread Anand Jain
On 11/28/2015 01:19 AM, Christoph Anton Mitterer wrote: On Fri, 2015-11-27 at 17:16 +0800, Anand Jain wrote: I understand as a user, a full md/lvm set of features are important to begin operations using btrfs and we don't have it yet. I have to blame it on the priority list. What's

Re: BUG: failure at fs/btrfs/ctree.h:337/btrfs_chunk_item_size()!

2015-11-30 Thread David Sterba
On Sun, Nov 15, 2015 at 07:21:17PM +0100, Vegard Nossum wrote: > With the attached btrfs image, I get the following splat when mounting: > > """ > # mount -o loop -t btrfs ./btrfs.0 /mnt/0/ > BTRFS: device fsid 9006933e-2a9a-44f0-917f-514252aeec2c devid 1 transid > 7 /dev/loop0 > BTRFS info (devi

Re: [RFC] Btrfs device and pool management (wip)

2015-11-30 Thread Qu Wenruo
On 11/30/2015 03:59 PM, Anand Jain wrote: (fixed alignment) Data center systems are generally aligned with the RAS (Reliability, Availability and Serviceability) attributes. When it comes to Storage, RAS applies even more because its matter of trust. In this context, one of the

Re: [PATCH v2 1/5] btrfs-progs: introduce framework to check kernel supported features

2015-11-30 Thread Austin S Hemmelgarn
On 2015-11-26 12:38, David Sterba wrote: On Tue, Nov 24, 2015 at 03:21:19PM -0500, Austin S Hemmelgarn wrote: I think you mean 2.6.37 here. 67377734fd24c3 "Btrfs: add support for mixed data+metadata block groups" This brings up a rather important question: Should compat-X.Y mean features that w

Re: [PATCH] btrfs-progs: mkfs-tests: Check sectorsize and nodesize combination

2015-11-30 Thread Qu Wenruo
On 11/30/2015 06:00 PM, David Sterba wrote: On Mon, Nov 30, 2015 at 09:39:30AM +0800, Qu Wenruo wrote: Add mkfs selftest for invalid and valid sectorsize/nodesize combination. Signed-off-by: Qu Wenruo Applied with some changes, thanks. +image_size=1g +image=image If you need a single i

[PATCH 5/8] Fix btrfs/097 to work on non-4k block sized filesystems

2015-11-30 Thread Chandan Rajendra
This commit makes use of the new _filter_xfs_io_blocks_modified filtering function to print information in terms of file blocks rather than file offset. Signed-off-by: Chandan Rajendra --- tests/btrfs/097 | 41 - tests/btrfs/097.out | 23 ++

[PATCH V2 3/5] Fix btrfs/055 to work on non-4k block sized filesystems

2015-11-30 Thread Chandan Rajendra
This commit makes use of the new _filter_xfs_io_blocks_modified and _filter_od filtering functions to print information in terms of file blocks rather than file offset. Signed-off-by: Chandan Rajendra --- tests/btrfs/055 | 128 ++ tests/btrfs/055.out | 378 +++

[PATCH 3/8] Fix btrfs/094 to work on non-4k block sized filesystems

2015-11-30 Thread Chandan Rajendra
This commit makes use of the new _filter_xfs_io_blocks_modified filtering function to print information in terms of file blocks rather than file offset. Signed-off-by: Chandan Rajendra --- tests/btrfs/094 | 75 ++--- tests/btrfs/094.out | 71 ++

[PATCH 4/8] Fix btrfs/095 to work on non-4k block sized filesystems

2015-11-30 Thread Chandan Rajendra
This commit makes use of the new _filter_xfs_io_blocks_modified filtering function to print information in terms of file blocks rather than file offset. Signed-off-by: Chandan Rajendra --- tests/btrfs/095 | 110 +--- tests/btrfs/095.out | 42 +

[PATCH 6/8] Fix btrfs/098 to work on non-4k block sized filesystems

2015-11-30 Thread Chandan Rajendra
This commit makes use of the new _filter_xfs_io_blocks_modified filtering function to print information in terms of file blocks rather than file offset. Signed-off-by: Chandan Rajendra --- tests/btrfs/098 | 67 + tests/btrfs/098.out | 27 ++

[PATCH V2 4/5] Fix btrfs/056 to work on non-4k block sized filesystems

2015-11-30 Thread Chandan Rajendra
This commit makes use of the new _filter_xfs_io_blocks_modified and _filter_od filtering functions to print information in terms of file blocks rather than file offset. Signed-off-by: Chandan Rajendra --- tests/btrfs/056 | 51 ++ tests/btrfs/056.out | 152 +++

[PATCH 1/8] Filter xfs_io's output in units of page size

2015-11-30 Thread Chandan Rajendra
The helpers introduced in this commit will be used to make btrfs tests that assume 4k as the page size to work on non-4k page-sized systems as well. Signed-off-by: Chandan Rajendra --- common/filter | 8 common/rc | 6 ++ 2 files changed, 14 insertions(+) diff --git a/common/fi

[PATCH 7/8] Fix btrfs/103 to work on non-4k block sized filesystems

2015-11-30 Thread Chandan Rajendra
This commit makes use of the new _filter_xfs_io_blocks_modified filtering function to print information in terms of file blocks rather than file offset. Signed-off-by: Chandan Rajendra --- tests/btrfs/103 | 44 +++--- tests/btrfs/103.out | 132 +++

[PATCH V2 0/5] Fix Btrfs tests to work on non-4k block sized fs instances

2015-11-30 Thread Chandan Rajendra
This patchset fixes Btrfs tests to work on variable block size. This is based off the RFC patch sent during March of this year (https://www.marc.info/?l=linux-btrfs&m=142736088310300&w=2). Currently, some of the tests are written with the assumption that 4k is the block size of the filesystem inst

[PATCH 8/8] Fix btrfs/106 to work on non-4k page sized machines

2015-11-30 Thread Chandan Rajendra
This commit makes use of the new _filter_xfs_io_pages_modified filtering function to print information in terms of page size units rather than file offset. Signed-off-by: Chandan Rajendra --- tests/btrfs/106 | 36 tests/btrfs/106.out | 30

[PATCH 0/8] PART 2: Fix Btrfs tests to work on non-4k block sized fs instances

2015-11-30 Thread Chandan Rajendra
This represents the second part of the patchset to fix Btrfs specific tests to work on variable block size. These patches now use the output of "od" utility to verify the contents of the test files instead of the md5sum utility. The patchset also introduces the new filter function, _filter_xfs_io_

[PATCH 2/8] Fix btrfs/052 to work on non-4k block sized filesystems

2015-11-30 Thread Chandan Rajendra
This commit makes use of the new _filter_xfs_io_blocks_modified filtering function to print information in terms of file blocks rather than file offset. Signed-off-by: Chandan Rajendra --- tests/btrfs/052 | 122 + tests/btrfs/052.out | 744 +++-

[PATCH V2 2/5] Fix btrfs/017 to work on non-4k block sized filesystems

2015-11-30 Thread Chandan Rajendra
This commit makes use of the new _filter_xfs_io_blocks_modified filtering function to print information in terms of file blocks rather than file offset. Signed-off-by: Chandan Rajendra --- tests/btrfs/017 | 16 tests/btrfs/017.out | 3 +-- 2 files changed, 13 insertions(+),

[PATCH V2 1/5] Filter xfs_io and od's output in units of FS block size

2015-11-30 Thread Chandan Rajendra
The helpers introduced in this commit will be used to make btrfs tests that assume 4k as the block size to work on non-4k blocksized filesystem instances as well. Signed-off-by: Chandan Rajendra --- common/filter | 45 + 1 file changed, 45 insertions(+

[PATCH V2 5/5] Fix btrfs/096 to work on non-4k block sized filesystems

2015-11-30 Thread Chandan Rajendra
This commit makes use of the new _filter_xfs_io_blocks_modified filtering function to print information in terms of file blocks rather than file offset. Signed-off-by: Chandan Rajendra --- tests/btrfs/096 | 45 + tests/btrfs/096.out | 15 +-

[PATCH] btrfs: cleanup, remove stray return statements

2015-11-30 Thread David Sterba
Signed-off-by: David Sterba --- fs/btrfs/disk-io.c | 1 - fs/btrfs/inode.c | 1 - fs/btrfs/locking.c | 2 -- fs/btrfs/raid56.c | 2 -- fs/btrfs/scrub.c | 2 -- fs/btrfs/volumes.c | 1 - 6 files changed, 9 deletions(-) diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 974be09e7556..

Re: [PATCH] btrfs-progs: mkfs-tests: Check sectorsize and nodesize combination

2015-11-30 Thread David Sterba
On Mon, Nov 30, 2015 at 09:39:30AM +0800, Qu Wenruo wrote: > Add mkfs selftest for invalid and valid sectorsize/nodesize > combination. > > Signed-off-by: Qu Wenruo Applied with some changes, thanks. > +image_size=1g > +image=image If you need a single image, just use prepare_test_dev and $TES

[PATCH] btrfs-progs: install to /usr/local by default again

2015-11-30 Thread David Sterba
The conversion to autotools changed the default prefix to /usr. There's no reason to diverge. Distributions builds set prefix the /usr path and local builds are supposed to go to /usr/local . Reference: https://bugzilla.kernel.org/show_bug.cgi?id=108571 Reported-by: Karl Richter Signed-off-by: Da

[RFC] Btrfs device and pool management (wip)

2015-11-30 Thread Anand Jain
(fixed alignment) Data center systems are generally aligned with the RAS (Reliability, Availability and Serviceability) attributes. When it comes to Storage, RAS applies even more because its matter of trust. In this context, one of the primary area that a typical volume manager sh