-by: Dongsheng Yang yangds.f...@cn.fujitsu.com
Good catch!
Reviewed-by: Miao Xie miao...@huawei.com
---
fs/btrfs/delayed-inode.c | 2 ++
fs/btrfs/inode.c | 21 -
2 files changed, 14 insertions(+), 9 deletions(-)
diff --git a/fs/btrfs/delayed-inode.c b/fs/btrfs
there
| is sb_want_write() waiting)
So Alice can't thaw the fs since there is no mount point for it now.
2) Don't allow any umount of the sb if there is sb_want_write().
More aggressive one, purpose by Miao Xie.
Can't resolve problem 1.1) but will solve problem 1.2).
This is one of the two methods that I told
On Fri, 30 Jan 2015 20:17:49 +0100, David Sterba wrote:
On Fri, Jan 30, 2015 at 05:20:45PM +0800, Qu Wenruo wrote:
[Use VFS protect for sysfs change]
The 6th patch will introduce a new help function sb_want_write() to
claim write permission to a superblock.
With this, we are able to do write
On Fri, 30 Jan 2015 09:33:17 +0800, Qu Wenruo wrote:
Original Message
Subject: Re: [PATCH RESEND v4 2/8] btrfs: Make btrfs_parse_options() parse
mount
option in a atomic way
From: Miao Xie miao...@huawei.com
To: Qu Wenruo quwen...@cn.fujitsu.com, linux-btrfs
On Thu, 29 Jan 2015 10:24:35 +0800, Qu Wenruo wrote:
Current btrfs_parse_options() is not atomic, which can set and clear a
bit, especially for nospace_cache case.
For example, if a fs is mounted with nospace_cache,
btrfs_parse_options() will set SPACE_CACHE bit first(since
cache_generation
On Fri, 30 Jan 2015 10:51:52 +0800, Qu Wenruo wrote:
Original Message
Subject: Re: [PATCH RESEND v4 2/8] btrfs: Make btrfs_parse_options() parse
mount
option in a atomic way
From: Miao Xie miao...@huawei.com
To: Qu Wenruo quwen...@cn.fujitsu.com, linux-btrfs
On Fri, 30 Jan 2015 04:37:14 +, Al Viro wrote:
On Fri, Jan 30, 2015 at 12:14:24PM +0800, Miao Xie wrote:
On Fri, 30 Jan 2015 02:14:45 +, Al Viro wrote:
On Fri, Jan 30, 2015 at 09:44:03AM +0800, Qu Wenruo wrote:
This shouldn't happen. If someone is ro, the whole fs should be ro, right
On Fri, 30 Jan 2015 10:02:26 +0800, Qu Wenruo wrote:
Original Message
Subject: Re: [PATCH RESEND v4 6/8] vfs: Add get_vfsmount_sb() function to get
vfsmount from a given sb.
From: Qu Wenruo quwen...@cn.fujitsu.com
To: Miao Xie miao...@huawei.com, linux-btrfs
On Fri, 30 Jan 2015 02:14:45 +, Al Viro wrote:
On Fri, Jan 30, 2015 at 09:44:03AM +0800, Qu Wenruo wrote:
This shouldn't happen. If someone is ro, the whole fs should be ro, right?
Wrong. Individual vfsmounts over an r/w superblock might very well be r/o.
As for that trylock... What
On Thu, 29 Jan 2015 10:24:39 +0800, Qu Wenruo wrote:
There are sysfs interfaces in some fs, only btrfs yet, which will modify
on-disk data.
Unlike normal file operation routine we can use mnt_want_write_file() to
protect the operation, change through sysfs won't to be binded to any file
in
On Fri, 23 Jan 2015 17:59:49 +0100, David Sterba wrote:
On Wed, Jan 21, 2015 at 03:04:02PM +0800, Miao Xie wrote:
Pending changes are *not* only mount options. Feature change and label
change
are also pending changes if using sysfs.
My miss, I don't notice feature and label change by sysfs
On Wed, 21 Jan 2015 15:47:54 +0800, Qu Wenruo wrote:
On Wed, 21 Jan 2015 11:53:34 +0800, Qu Wenruo wrote:
[snipped]
This will cause another problem, nobody can ensure there will be next
transaction and the change may
never to written into disk.
First, the pending changes is mount option,
On Tue, 20 Jan 2015 20:10:56 -0500, Chris Mason wrote:
On Tue, Jan 20, 2015 at 8:09 PM, Qu Wenruo quwen...@cn.fujitsu.com wrote:
Original Message
Subject: Re: [PATCH] btrfs: Don't call btrfs_start_transaction() on frozen fs
to avoid deadlock.
From: Chris Mason c...@fb.com
On Wed, 21 Jan 2015 11:53:34 +0800, Qu Wenruo wrote:
+/*
+ * Test if the fs is frozen, or start_trasaction
+ * will deadlock on itself.
+ */
+if (__sb_start_write(sb, SB_FREEZE_FS, false))
+__sb_end_write(sb,
On Mon, 19 Jan 2015 15:42:41 +0800, Qu Wenruo wrote:
Commit 6b5fe46dfa52 (btrfs: do commit in sync_fs if there are pending
changes) will call btrfs_start_transaction() in sync_fs(), to handle
some operations needed to be done in next transaction.
However this can cause deadlock if the
);
+ btrfs_free_path(path);
My bad. Thanks to fix it.
Reviewed-by: Miao Xie miao...@huawei.com
return -ENOMEM;
}
--
To unsubscribe from this list: send the line unsubscribe linux-btrfs in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org
On Thu, 08 Jan 2015 13:23:13 -0800, Shaohua Li wrote:
Below test will fail currently:
mkfs.ext4 -F /dev/sda
btrfs-convert /dev/sda
mount /dev/sda /mnt
btrfs device add -f /dev/sdb /mnt
btrfs balance start -v -dconvert=raid1 -mconvert=raid1 /mnt
The reason is there are some block
On Thu, 08 Jan 2015 18:06:50 -0800, Shaohua Li wrote:
On Fri, Jan 09, 2015 at 09:01:57AM +0800, Miao Xie wrote:
On Thu, 08 Jan 2015 13:23:13 -0800, Shaohua Li wrote:
Below test will fail currently:
mkfs.ext4 -F /dev/sda
btrfs-convert /dev/sda
mount /dev/sda /mnt
btrfs device add -f
Because we will reuse bbio and raid_map during the scrub later, it is
better that we don't change any variant of bbio and don't free it at
the end of IO request. So we introduced similar variants into the raid
bio, and don't access those bbio's variants any more.
Signed-off-by: Miao Xie mi
From: Zhao Lei zhao...@cn.fujitsu.com
bbio_ret in this condition is always !NULL because previous code
already have a check-and-skip:
4908 if (!bbio_ret)
4909 goto out;
Signed-off-by: Zhao Lei zhao...@cn.fujitsu.com
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
Reviewed-by: David Sterba dste
the rbio merge.
Changelog v1 - v2:
- Change some function names in raid56.c to make them fit the code style
of the raid56.
Thanks
Miao
Miao Xie (7):
Btrfs, raid56: don't change bbio and raid_map
Btrfs, scrub: repair the common data on RAID5/6 if it is corrupted
Btrfs, raid56: use a variant
, at this time, we will find the relative replace target stripes
and wirte the relative data into it.
Note: The function that copying old data on the source device to
the target device was implemented in the past, it is similar to
the other RAID type.
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
a variant to record the operation type.
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
Changelog v1 - v4:
- None.
---
fs/btrfs/raid56.c | 31 +--
1 file changed, 17 insertions(+), 14 deletions(-)
diff --git a/fs/btrfs/raid56.c b/fs/btrfs/raid56.c
index c954537..4924388
ends.
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
Changelog v3 - v4:
- None.
Changelog v2 - v3:
- New patch to fix undealt use-after-free problem of the source device
in the final device replace procedure.
Changelog v1 - v2:
- None.
---
fs/btrfs/ctree.h | 7 ++-
fs/btrfs/dev
From: Zhao Lei zhao...@cn.fujitsu.com
Signed-off-by: Zhao Lei zhao...@cn.fujitsu.com
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
Changelog v1 - v4:
- None.
---
fs/btrfs/dev-replace.c | 5 -
1 file changed, 5 deletions(-)
diff --git a/fs/btrfs/dev-replace.c b/fs/btrfs/dev-replace.c
This patch implement the RAID5/6 common data repair function, the
implementation is similar to the scrub on the other RAID such as
RAID1, the differentia is that we don't read the data from the
mirror, we use the data repair function of RAID5/6.
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
From: Zhao Lei zhao...@cn.fujitsu.com
stripe_index's value was set again in latter line:
stripe_index = 0;
Signed-off-by: Zhao Lei zhao...@cn.fujitsu.com
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
Reviewed-by: David Sterba dste...@suse.cz
---
Changelog v1 - v4:
- None.
---
fs/btrfs/volumes.c
hi, Chris
On Fri, 28 Nov 2014 16:32:03 -0500, Chris Mason wrote:
On Wed, Nov 26, 2014 at 10:00 PM, Miao Xie mi...@cn.fujitsu.com wrote:
On Thu, 27 Nov 2014 09:39:56 +0800, Miao Xie wrote:
On Wed, 26 Nov 2014 10:02:23 -0500, Chris Mason wrote:
On Wed, Nov 26, 2014 at 8:04 AM, Miao Xie mi
On Tue, 2 Dec 2014 08:28:22 -0500, Chris Mason wrote:
On Tue, Dec 2, 2014 at 7:39 AM, Miao Xie mi...@cn.fujitsu.com wrote:
This patchset implement the device scrub/replace function for RAID56, the
most implementation of the common data is similar to the other RAID type.
The differentia
On Tue, 2 Dec 2014 08:28:22 -0500, Chris Mason wrote:
On Tue, Dec 2, 2014 at 7:39 AM, Miao Xie mi...@cn.fujitsu.com wrote:
This patchset implement the device scrub/replace function for RAID56, the
most implementation of the common data is similar to the other RAID type.
The differentia
If we failed to reading out the checksum, we would free all the checksums
in the list. But the current code accessed the list head, not the entry
in the list. Fix it.
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
fs/btrfs/file-item.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion
Please ignore this patch, Chris has fixed this problem.
Thanks
Miao
On Mon, 1 Dec 2014 18:04:13 +0800, Miao Xie wrote:
If we failed to reading out the checksum, we would free all the checksums
in the list. But the current code accessed the list head, not the entry
in the list. Fix
a variant to record the operation type.
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
Changelog v1 - v3:
- None.
---
fs/btrfs/raid56.c | 30 +-
1 file changed, 17 insertions(+), 13 deletions(-)
diff --git a/fs/btrfs/raid56.c b/fs/btrfs/raid56.c
index 6013d88..bfc406d
that is used to avoid the rbio merge.
Changelog v1 - v2:
- Change some function names in raid56.c to make them fit the code style
of the raid56.
Thanks
Miao
Miao Xie (8):
Btrfs, raid56: don't change bbio and raid_map
Btrfs, scrub: repair the common data on RAID5/6 if it is corrupted
Btrfs
This function reused the code of parity scrub, and we just write
the right parity or corrected parity into the target device before
the parity scrub end.
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
Changelog v1 - v3:
- None.
---
fs/btrfs/raid56.c | 23 +++
fs/btrfs
From: Zhao Lei zhao...@cn.fujitsu.com
bbio_ret in this condition is always !NULL because previous code
already have a check-and-skip:
4908 if (!bbio_ret)
4909 goto out;
Signed-off-by: Zhao Lei zhao...@cn.fujitsu.com
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
Reviewed-by: David Sterba dste
From: Zhao Lei zhao...@cn.fujitsu.com
stripe_index's value was set again in latter line:
stripe_index = 0;
Signed-off-by: Zhao Lei zhao...@cn.fujitsu.com
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
Reviewed-by: David Sterba dste...@suse.cz
---
Changelog v1 - v3:
- None.
---
fs/btrfs/volumes.c
Because we will reuse bbio and raid_map during the scrub later, it is
better that we don't change any variant of bbio and don't free it at
the end of IO request. So we introduced similar variants into the raid
bio, and don't access those bbio's variants any more.
Signed-off-by: Miao Xie mi
introduce a bitmap. If there is some data on the horizontal sub-stripe,
we will the relative bit to 1, and when we check and repair the
parity, we will skip those horizontal sub-stripes that the relative
bits is 0.
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
Changelog v2 - v3:
- Fix wrong
From: Zhao Lei zhao...@cn.fujitsu.com
Signed-off-by: Zhao Lei zhao...@cn.fujitsu.com
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
Changelog v1 - v3:
- None.
---
fs/btrfs/dev-replace.c | 5 -
1 file changed, 5 deletions(-)
diff --git a/fs/btrfs/dev-replace.c b/fs/btrfs/dev-replace.c
-by: Miao Xie mi...@cn.fujitsu.com
---
Changelog v2 - v3:
- New patch to fix possible deadlock caused by the pending bios in the
plug list when the io submitters were going to sleep.
Changelog v1 - v2:
- None.
---
fs/btrfs/dev-replace.c | 15 +++
1 file changed, 11 insertions(+), 4
, at this time, we will find the relative replace target stripes
and wirte the relative data into it.
Note: The function that copying old data on the source device to
the target device was implemented in the past, it is similar to
the other RAID type.
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
This patch implement the RAID5/6 common data repair function, the
implementation is similar to the scrub on the other RAID such as
RAID1, the differentia is that we don't read the data from the
mirror, we use the data repair function of RAID5/6.
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
On Thu, 27 Nov 2014 09:39:56 +0800, Miao Xie wrote:
On Wed, 26 Nov 2014 10:02:23 -0500, Chris Mason wrote:
On Wed, Nov 26, 2014 at 8:04 AM, Miao Xie mi...@cn.fujitsu.com wrote:
The increase/decrease of bio counter is on the I/O path, so we should
use io_schedule() instead of schedule
This patch implement the RAID5/6 common data repair function, the
implementation is similar to the scrub on the other RAID such as
RAID1, the differentia is that we don't read the data from the
mirror, we use the data repair function of RAID5/6.
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
On Thu, 6 Nov 2014 10:19:54 -0500, Josef Bacik wrote:
If we have two fsync()'s race on different subvols one will do all of its work
to get into the log_tree, wait on it's outstanding IO, and then allow the
log_tree to finish it's commit. The problem is we were just free'ing that
subvols
are interesting to use it or test it, you can pull
the patchset from
https://github.com/miaoxie/linux-btrfs.git raid56-scrub-replace
Thanks
Miao
Miao Xie (6):
Btrfs, raid56: don't change bbio and raid_map
Btrfs, scrub: repair the common data on RAID5/6 if it is corrupted
Btrfs,raid56: use a variant
introduce a bitmap. If there is some data on the horizontal sub-stripe,
we will the relative bit to 1, and when we check and repair the
parity, we will skip those horizontal sub-stripes that the relative
bits is 0.
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
fs/btrfs/raid56.c | 500
From: Zhao Lei zhao...@cn.fujitsu.com
bbio_ret in this condition is always !NULL because previous code
already have a check-and-skip:
4908 if (!bbio_ret)
4909 goto out;
Signed-off-by: Zhao Lei zhao...@cn.fujitsu.com
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
fs/btrfs/volumes.c | 3
a variant to record the operation type.
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
fs/btrfs/raid56.c | 30 +-
1 file changed, 17 insertions(+), 13 deletions(-)
diff --git a/fs/btrfs/raid56.c b/fs/btrfs/raid56.c
index b3e9c76..d550e9b 100644
--- a/fs/btrfs/raid56.c
This patch implement the RAID5/6 common data repair function, the
implementation is similar to the scrub on the other RAID such as
RAID1, the differentia is that we don't read the data from the
mirror, we use the data repair function of RAID5/6.
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
From: Zhao Lei zhao...@cn.fujitsu.com
Signed-off-by: Zhao Lei zhao...@cn.fujitsu.com
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
fs/btrfs/dev-replace.c | 5 -
1 file changed, 5 deletions(-)
diff --git a/fs/btrfs/dev-replace.c b/fs/btrfs/dev-replace.c
index 6f662b3..6aa835c 100644
From: Zhao Lei zhao...@cn.fujitsu.com
stripe_index's value was set again in latter line:
stripe_index = 0;
Signed-off-by: Zhao Lei zhao...@cn.fujitsu.com
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
fs/btrfs/volumes.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/fs
This function reused the code of parity scrub, and we just write
the right parity or corrected parity into the target device before
the parity scrub end.
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
fs/btrfs/raid56.c | 23 +++
fs/btrfs/scrub.c | 2 +-
2 files changed
, at this time, we will find the relative replace target stripes
and wirte the relative data into it.
Note: The function that copying old data on the source device to
the target device was implemented in the past, it is similar to
the other RAID type.
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
fs
Because we will reuse bbio and raid_map during the scrub later, it is
better that we don't change any variant of bbio and don't free it at
the end of IO request. So we introduced similar variants into the raid
bio, and don't access those bbio's variants any more.
Signed-off-by: Miao Xie mi
before compression, if it is a
small write(=blocksize), we bail out and fall into nocompression directly.
Signed-off-by: Wang Shilong wangshilong1...@gmail.com
Looks good.
Reviewed-by: Miao Xie mi...@cn.fujitsu.com
---
fs/btrfs/inode.c | 16
1 file changed, 8 insertions
On Thu, 6 Nov 2014 09:39:19 -0500, Josef Bacik wrote:
On 10/23/2014 04:44 AM, Miao Xie wrote:
On Thu, 18 Sep 2014 11:27:17 -0400, Josef Bacik wrote:
Trying to reproduce a log enospc bug I hit a panic in the async reclaim code
during log replay. This is because we use fs_info-fs_root as our
On Mon, 3 Nov 2014 08:56:50 -0500, Josef Bacik wrote:
Our gluster boxes get several thousand statfs() calls per second, which begins
to suck hardcore with all of the lock contention on the chunk mutex and dev
list
mutex. We don't really need to hold these things, if we have transient
Ping..
On Thu, 23 Oct 2014 16:44:54 +0800, Miao Xie wrote:
On Thu, 18 Sep 2014 11:27:17 -0400, Josef Bacik wrote:
Trying to reproduce a log enospc bug I hit a panic in the async reclaim code
during log replay. This is because we use fs_info-fs_root as our root for
shrinking
On Wed, 29 Oct 2014 08:21:12 +, Filipe Manana wrote:
If right after starting the snapshot creation ioctl we perform a write
against a
file followed by a truncate, with both operations increasing the file's size,
we
can get a snapshot tree that reflects a state of the source subvolume's
On Mon, 27 Oct 2014 09:16:55 +, Filipe Manana wrote:
If we couldn't find our extent item, we accessed the current slot
(path-slots[0]) to check if it corresponds to an equivalent skinny
metadata item. However this slot could be beyond our last item in the
leaf (i.e. path-slots[0] =
On Mon, 27 Oct 2014 09:19:52 +, Filipe Manana wrote:
We have a race that can lead us to miss skinny extent items in the function
btrfs_lookup_extent_info() when the skinny metadata feature is enabled.
So basically the sequence of steps is:
1) We search in the extent tree for the skinny
On Mon, 27 Oct 2014 13:44:22 +, Filipe David Manana wrote:
On Mon, Oct 27, 2014 at 12:11 PM, Filipe David Manana
fdman...@gmail.com wrote:
On Mon, Oct 27, 2014 at 11:08 AM, Miao Xie mi...@cn.fujitsu.com wrote:
On Mon, 27 Oct 2014 09:19:52 +, Filipe Manana wrote:
We have a race
-by: Miao Xie mi...@cn.fujitsu.com
---
fs/btrfs/super.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
index b83ef15..c1d020f 100644
--- a/fs/btrfs/super.c
+++ b/fs/btrfs/super.c
@@ -2151,6 +2151,7 @@ static void __exit exit_btrfs_fs(void
On Thu, 18 Sep 2014 11:27:17 -0400, Josef Bacik wrote:
Trying to reproduce a log enospc bug I hit a panic in the async reclaim code
during log replay. This is because we use fs_info-fs_root as our root for
shrinking and such. Technically we can use whatever root we want, but let's
just not
On Wed, 22 Oct 2014 14:40:47 +0200, Piotr Pawłow wrote:
On 22.10.2014 03:43, Chris Murphy wrote:
On Oct 21, 2014, at 4:14 PM, Piotr Pawłowp...@siedziba.pl wrote:
Looks normal to me. Last time I started a balance after adding 6th device
to my FS, it took 4 days to move 25GBs of data.
It's
On Thu, 16 Oct 2014 17:48:49 +0200, Stefan Behrens wrote:
The xfstest btrfs/014 which tests the balance operation caused that the
check_int module complained that known blocks changed their physical
location. Since this is not an error in this case, only print such
message if the verbose mode
Guan
On Sat, 11 Oct 2014 14:45:29 +0800, Eryu Guan wrote:
device replace could fail due to another running scrub process, but this
failure doesn't get returned to userspace.
The following steps could reproduce this issue
mkfs -t btrfs -f /dev/sdb1 /dev/sdb2
mount /dev/sdb1 /mnt/btrfs
On Fri, 10 Oct 2014 15:13:31 +0800, Eryu Guan wrote:
On Thu, Sep 25, 2014 at 06:28:14PM +0800, Eryu Guan wrote:
device replace could fail due to another running scrub process, but this
failure doesn't get returned to userspace.
The following steps could reproduce this issue
mkfs -t
It has been fixed by
https://patchwork.kernel.org/patch/4747961/
Thanks
Miao
On Sun, 21 Sep 2014 12:41:49 +0800, Eryu Guan wrote:
btrfs_map_bio() first calls btrfs_bio_counter_inc_blocked() which checks
fs state and increase bio_counter, then calls __btrfs_map_block() which
will take the
This patch and the previous one(The following patch) also fixed a oops, which
can be reproduced
by LTP stress test(ltpstress.sh + fsstress).
[PATCH] btrfs: Fix and enhance merge_extent_mapping() to insert best fitted
extent map
Thanks
Miao
On Mon, 22 Sep 2014 09:13:03 +0800, Qu Wenruo wrote:
Chris
On Fri, 19 Sep 2014 09:45:17 +0800, Qu Wenruo wrote:
Hi Chris,
I'm sorry that the commit 'btrfs: Fix and enhance merge_extent_mapping() to
insert best fitted extent map'
has a V2 patch, so the one in tree is not up-to-data.
Although the v2 change is quite small and it's
the warning which was triggered by __GFP_ZERO in the 2nd patch
Miao Xie (11):
Btrfs: load checksum data once when submitting a direct read io
Btrfs: cleanup similar code of the buffered data data check and dio
read data check
Btrfs: do file data check by sub-bio's self
Btrfs: fix missing
of the direct io data repair implementation.
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
Changelog v1 - v4:
- None
---
fs/btrfs/btrfs_inode.h | 9 +
fs/btrfs/extent_io.c | 2 +-
fs/btrfs/inode.c | 100 -
fs/btrfs/volumes.h | 5
structure. In order to implement direct read data repair, we need modify
repair_io_failure and pass all filesystem data it need by function
parameters.
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
Changelog v1 - v4:
- None
---
fs/btrfs/extent_io.c | 8 +---
fs/btrfs/extent_io.h | 2 +-
fs
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
Changelog v1 - v4:
- None
---
fs/btrfs/extent_io.c | 26 ++
1 file changed, 10 insertions(+), 16 deletions(-)
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index f8dda46..154cb8e 100644
--- a/fs/btrfs/extent_io.c
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
Changelog v1 - v4:
- None
---
fs/btrfs/inode.c | 102 +--
1 file changed, 47 insertions(+), 55 deletions(-)
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index af304e1..e8139c6 100644
--- a/fs
We forgot to free failure record and bio after submitting re-read bio failed,
fix it.
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
Changelog v1 - v4:
- None
---
fs/btrfs/extent_io.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index
on the new mirror is still corrupted, we will try next
mirror until we read right data or all the mirrors are traversed.
- After the above work, we set the uptodate flag according to the result.
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
Changelog v3 - v4:
- Use a dedicated btrfs workqueue
improves this problem by loading the data at once.
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
Changelog v3 - v4:
- None
Changelog v2 - v3:
- Fix the wrong return value of btrfs_bio_clone
Changelog v1 - v2:
- Remove the __GFP_ZERO flag in btrfs_submit_direct because it would trigger
the failure records will be left
in the tree, we need free them when we free the inode or the memory leak
happens.
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
Changelog v1 - v4:
- None
---
fs/btrfs/extent_io.c | 34 ++
fs/btrfs/extent_io.h | 1 +
fs/btrfs/inode.c
The data repair function of direct read will be implemented later, and some code
in bio_readpage_error will be reused, so split bio_readpage_error into
several functions which will be used in direct read repair later.
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
Changelog v1 - v4:
- None
We need real mirror number for RAID0/5/6 when reading data, or if read error
happens, we would pass 0 as the number of the mirror on which the io error
happens. It is wrong and would cause the filesystem read the data from the
corrupted mirror again.
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
All the metadata in the seed devices has the same fsid as the fsid
of the seed filesystem which is on the seed device, so we should check
them by the current filesystem. Fix it.
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
Reviewed-by: David Sterba dste...@suse.cz
---
Changelog v1 - v2:
- Use
it.
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
Changelog v1 - v2:
- Change the variant name and make some cleanup by David's comment
---
fs/btrfs/volumes.c | 8 ++--
fs/btrfs/volumes.h | 16
2 files changed, 18 insertions(+), 6 deletions(-)
diff --git a/fs/btrfs
On Tue, 2 Sep 2014 09:05:15 -0400, Chris Mason wrote:
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index 08e65e9..56b1546 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -698,7 +719,12 @@ static void end_workqueue_bio(struct bio *bio, int
err)
fs_info =
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
fs/btrfs/dev-replace.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/fs/btrfs/dev-replace.c b/fs/btrfs/dev-replace.c
index a85b5f5..10dfb41 100644
--- a/fs/btrfs/dev-replace.c
+++ b/fs/btrfs/dev-replace.c
@@ -550,7 +550,6 @@ static int
During removing a device, we have modified free_chunk_space when we
shrink the device, so we needn't assign a new value to it after
the device shrink. Fix it.
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
fs/btrfs/volumes.c | 5 -
1 file changed, 5 deletions(-)
diff --git a/fs/btrfs
The member variants - num_can_discard - of fs_devices structure
are set, but no one use them to do anything. so remove them.
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
fs/btrfs/volumes.c | 16 ++--
fs/btrfs/volumes.h | 1 -
2 files changed, 2 insertions(+), 15 deletions
Some code in btrfs_get_bdev_and_sb will be re-used by the other function later,
so restructure btrfs_get_bdev_and_sb and pick up those code to make a new
function.
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
fs/btrfs/volumes.c | 66 +-
1
.
And there is another merit that we can check if the target device is suitable
more early.
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
fs/btrfs/dev-replace.c | 32
fs/btrfs/volumes.c | 23 +++
fs/btrfs/volumes.h | 1 +
3 files changed
Some code in btrfs_scan_one_device will be re-used by the other function later,
so restructure btrfs_scan_one_device and pick up those code to make a new
function.
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
fs/btrfs/volumes.c | 57 +++---
1
When we open a seed filesystem, if the degraded mount option is set, we
continue to
mount the fs if we don't find some devices in the seed filesystem. But we
should stop
mounting if other errors happen. Fix it
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
fs/btrfs/volumes.c | 2 +-
1 file
this problem by locking uuid_mutex during destroying source device or
target device, just like the device remove operation.
It is a temporary solution, we can fix this problem and make the code more
clear by atomic counter in the future.
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
fs/btrfs
has be allocated as free space, and would use it to do overcommit reservation.
Fix it.
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
fs/btrfs/volumes.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index 45e0b5d..d8e4a3d
We will implement the function that the filesystem scan all the devices
in the system and build the device set for btrfs. In this case, we needn't
get btrfs_fs_devices when adding a device into list. This patch changes
device_add_list and implement this feature.
Signed-off-by: Miao Xie mi
We didn't protect the system chunk array when we added a new
system chunk into it, it would cause the array be corrupted
if someone remove/add some system chunk into array at the same
time. Fix it by chunk lock.
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
fs/btrfs/volumes.c | 7 ++-
1
device list.
---
Miao Xie (5):
block: export disk_class and disk_type for btrfs
Btrfs: don't return btrfs_fs_devices if the caller doesn't want it
Btrfs: restructure btrfs_scan_one_device
Btrfs: restructure btrfs_get_bdev_and_sb and pick up some code used
later
Btrfs: scan all
When we get the fs information, we forgot to acquire the mutex of device list,
it might cause the problem we might access a device that was removed. Fix
it by acquiring the device list mutex.
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
fs/btrfs/super.c | 8 +++-
1 file changed, 7
1 - 100 of 1023 matches
Mail list logo