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
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
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
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.
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
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
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 +
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.
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 ++
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
--
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
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 ++
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
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
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
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.
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
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
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
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 ++
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
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
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,
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
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 ++
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
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
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
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:
"""
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
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
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
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:
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 --
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
>
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
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
-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
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
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
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
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
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
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
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
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
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
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
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
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.
> >
> >
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
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
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
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
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
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
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
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
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 ++
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 +++
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 ++
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 +
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 ++
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 +++
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
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 +++
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
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
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_
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 +++-
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(+),
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(+
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 +-
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..
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
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
(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
77 matches
Mail list logo