-total_bytes,-disk_total_bytes,-bytes_used is protected by chunk
lock when we change them, but sometimes we read them without any lock,
and we might get unexpected value. We fix this problem like inode's
i_size.
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
fs/btrfs/dev-replace.c | 15
. But at
most place, we acquire chunk_mutex at first and then acquire device list
mutex. We need change the lock order.
- Some place we needn't acquire chunk_mutex. For example we needn't get
chunk_mutex when we free a empty seed fs_devices structure.
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
in the previous transaction to check if the super block is
beyond the boundary of the device. Fix it.
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
fs/btrfs/check-integrity.c | 2 +-
fs/btrfs/dev-replace.c | 18 ++
fs/btrfs/disk-io.c | 5 +++--
fs/btrfs/scrub.c
We should update device-bytes_used in the lock context of
chunk_mutex, or we would get wrong data.
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
fs/btrfs/volumes.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index 1524b3f
the size in the previous
transaction to check if the super block is beyond the boundary
of the device.
Though it is not big problem because we don't use it now, but anyway
it is better that we make it be consistent with the common metadata,
maybe we will use it in the future.
Signed-off-by: Miao
rw_devices counter is often used to tune the profile when doing chunk
allocation,
so we should modify it under the chunk_mutex context to avoid getting wrong
chunk profile.
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
fs/btrfs/volumes.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions
which was being changed when we clone the fs devices.
Fix it.
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
fs/btrfs/volumes.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index 357f911..f0173b1 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs
register the disk
into btrfs in time, the filesystem would report that can not open some device
when mounting the filesystem, it was uncomfortable, this patch fixes this
problem
by scanning all the devices if we find the number of devices is not right when
we mount the filesystem.
Signed-off-by: Miao
not mount the filesystem. So I want btrfs scan the system
and find all the devices by itself in the kernel. In order to implement
it, we need disk_class and disk_type, so export them.
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
block/genhd.c | 7 +--
include/linux/genhd.h | 1 +
2
For a missing device, we don't know it belong to which fs before we read its
fsid from the chunk tree. So we add them into the current fs device list at
first.
When we get its fsid, we should move them to their own fs device list.
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
fs/btrfs
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
fs/btrfs/dev-replace.c | 3 +--
fs/btrfs/volumes.c | 19 +++
2 files changed, 8 insertions(+), 14 deletions(-)
diff --git a/fs/btrfs/dev-replace.c b/fs/btrfs/dev-replace.c
index e9cbbdb..6f662b3 100644
--- a/fs/btrfs/dev
On Fri, 29 Aug 2014 14:31:48 -0400, Chris Mason wrote:
On 07/29/2014 05:24 AM, Miao Xie wrote:
This patch implement data repair function when direct read fails.
The detail of the implementation is:
- When we find the data is not right, we try to read the data from the other
mirror
On Tue, 19 Aug 2014 10:58:09 -0400, Chris Mason wrote:
On 08/19/2014 10:23 AM, David Sterba wrote:
On Tue, Aug 19, 2014 at 07:58:20PM +0800, Fengguang Wu wrote:
We noticed an xfstests failure on commit
8d875f95da43c6a8f18f77869f2ef26e9594fecc (btrfs: disable strict file
flushes for renames
On Mon, 18 Aug 2014 17:38:17 +, Ming Lei wrote:
Hi,
I ran the fs_mark test on a single empty hard drive. After the test, the df
-h results are:
/dev/sdk1 917G 39G 832G 5% /ext4
/dev/sdj1 932G 53G 850G 6% /btrfs
The test result for btrfs shows it
On Fri, 15 Aug 2014 23:36:53 +0800, Liu Bo wrote:
This has been reported and discussed for a long time, and this hang occurs in
both 3.15 and 3.16.
Btrfs now migrates to use kernel workqueue, but it introduces this hang
problem.
Btrfs has a kind of work queued as an ordered way, which
like btrfs_rm_device?
The other is OK.
Reviewed-by: Miao Xie mi...@cn.fujitsu.com
+ }
call_rcu(srcdev-rcu, free_device);
}
--
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
it will point to the seed's local fs_devices. In short
+ * srcdev will have its correct fs_devices in both the cases.
+ */
+ fs_devices = srcdev-fs_devices;
Reviewed-by: Miao Xie mi...@cn.fujitsu.com
list_del_rcu(srcdev-dev_list);
list_del_rcu(srcdev
On Mon, 11 Aug 2014 17:42:55 +0800, Anand Jain wrote:
reproducer:
reproducer:
mount /dev/sdb /btrfs
btrfs dev add /dev/sdc /btrfs
btrfs rep start -B /dev/sdb /dev/sdd /btrfs
umount /btrfs
WARNING: CPU: 0 PID: 3882 at fs/btrfs/volumes.c:892
Reviewed-by: Miao Xie mi...@cn.fujitsu.com
--
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/majordomo-info.html
On Sun, 10 Aug 2014 22:55:44 +0800, Liu Bo wrote:
This part of the trace is relatively new because Liu Bo's patch made us
redirty the pages, making it more likely that we'd try to write them
during commit.
But, at the end of the day we have a fundamental deadlock with
committing a
On Fri, 8 Aug 2014 01:32:00 +0100, Filipe David Manana wrote:
On Tue, Jul 29, 2014 at 10:24 AM, Miao Xie mi...@cn.fujitsu.com wrote:
The current code would load checksum data for several times when we split
a whole direct read io because of the limit of the raid stripe, it would
make us search
improves this problem by loading the data at once.
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
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
a WARNing. It is reported
On Thu, 7 Aug 2014 15:50:30 +0800, Liu Bo wrote:
[90496.156016] kworker/u8:14 D 880044e38540 0 21050 2
0x
[90496.157683] Workqueue: btrfs-delalloc normal_work_helper [btrfs]
[90496.159320] 88022880f990 0002 880407f649b0
88022880ffd8
On Fri, 25 Jul 2014 20:33:34 +0800, Anand Jain wrote:
After the seed device has been replaced the new target device
is no more a seed device. So we need to bring that state in
the fs_devices.
reproducer:
mount /dev/sdb /btrfs
btrfs dev add /dev/sdc /btrfs
btrfs rep start -B /dev/sdb
-by: Miao Xie mi...@cn.fujitsu.com
---
Changelog v1-v2:
- None
---
fs/btrfs/extent_io.c | 31 +++
fs/btrfs/extent_io.h | 6 +++---
fs/btrfs/scrub.c | 3 +--
3 files changed, 19 insertions(+), 21 deletions(-)
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
https://github.com/miaoxie/linux-btrfs.git for-Chris
Thanks
Miao
---
Miao Xie (12):
Btrfs: fix put dio bio twice when we submit dio bio fail
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
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
Changelog v1-v2:
- 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 fd88126..2e261b1 100644
--- a/fs
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-v2:
- None
---
fs/btrfs/extent_io.c | 8 +---
fs/btrfs/extent_io.h | 2 +-
fs/btrfs
The caller of btrfs_submit_direct_hook() will put the original dio bio
when btrfs_submit_direct_hook() return a error number, so we needn't
put the original bio in btrfs_submit_direct_hook().
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
Changelog v1-v2:
- None
---
fs/btrfs/inode.c | 5
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 v1-v2:
- None
---
fs/btrfs/btrfs_inode.h | 2 +-
fs/btrfs
improves this problem by loading the data at once.
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
Changelog v1 - v2:
- Remove the __GFP_ZERO flag in btrfs_submit_direct because it would trigger
a WARNing. It is reported by Filipe David Manana, Thanks.
---
fs/btrfs/btrfs_inode.h | 1 -
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-v2:
- 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
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-v2:
- None
---
fs/btrfs/extent_io.c | 34 ++
fs/btrfs/extent_io.h | 1 +
fs/btrfs/inode.c
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
Changelog v1-v2:
- 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 fb00736..f71b34f 100644
--- a/fs/btrfs/extent_io.c
of the direct io data repair implementation.
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
Changelog v1-v2:
- None
---
fs/btrfs/btrfs_inode.h | 9 +
fs/btrfs/extent_io.c | 2 +-
fs/btrfs/inode.c | 100 -
fs/btrfs/volumes.h | 5
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-v2:
- None
On Mon, 28 Jul 2014 18:24:47 +0100, Filipe David Manana wrote:
On Sat, Jun 28, 2014 at 12:34 PM, Miao Xie mi...@cn.fujitsu.com wrote:
The current code would load checksum data for several times when we split
a whole direct read io because of the limit of the raid stripe, it would
make us
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
---
fs/btrfs/scrub.c | 18 +-
1 file changed, 13
that
on-disk metadata of the devices was not consistent. We should use the other
variant named disk_total_bytes to update the on-disk metadata of device,
because that variant is updated only when the resize operation is successful.
Fix it.
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
fs/btrfs/disk
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
fs/btrfs/volumes.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/btrfs/volumes.h b/fs/btrfs/volumes.h
index 0defd23..90d4fa8 100644
--- a/fs/btrfs/volumes.h
+++ b/fs/btrfs/volumes.h
@@ -64,10 +64,10 @@ struct
We should not write data into a readonly device especially seed device when
doing scrub, skip those devices.
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
fs/btrfs/scrub.c | 11 +++
1 file changed, 11 insertions(+)
diff --git a/fs/btrfs/scrub.c b/fs/btrfs/scrub.c
index b6d198f
on the seed devices, Fix it.
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
fs/btrfs/scrub.c | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/fs/btrfs/scrub.c b/fs/btrfs/scrub.c
index 9a81874e..98b9f8e 100644
--- a/fs/btrfs/scrub.c
+++ b/fs/btrfs/scrub.c
@@ -2835,7
erase the super block on the seed device. It is wrong,
we should not change anything on the seed device.
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
fs/btrfs/volumes.c | 8 ++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index
, and want to allocate new chunks
with higher RAID level, we will fail becaue we don't have enough writable
device. Fix it by ignoring the number of missing devices when allocating
new chunks.
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
fs/btrfs/extent-tree.c | 16 ++--
1 file changed
The lock in btrfs_device structure was far away from its protected data, it
would
make CPU load the cache line twice when we accessed them, move them together.
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
fs/btrfs/volumes.h | 25 -
1 file changed, 12 insertions
it.
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
fs/btrfs/volumes.c | 7 +--
fs/btrfs/volumes.h | 19 +++
2 files changed, 20 insertions(+), 6 deletions(-)
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index 19188df..0d37746 100644
--- a/fs/btrfs/volumes.c
+++ b/fs
The member variants - latest_devid and latest_trans - 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 | 42 +++---
fs/btrfs/volumes.h | 3 ---
2 files
,
+ ordered-file_offset,
+ ordered-file_offset + ordered-len - 1);
I can use bytes_left to filter the ordered extents that have been written out.
The other is OK.
Reviewed-by: Miao Xie mi...@cn.fujitsu.com
+
wait_event(ordered-wait, test_bit
should decrease the counter of its own fs device.
Fix it.
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
This patch is against:
[PATCH 8/9] Btrfs: fix unzeroed members in fs_devices when creating a fs from
seed fs
---
fs/btrfs/volumes.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff
The total device counters of all the descendant filesystem account the seed
device, so after removing a seed device, we need decrease all those counters.
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
fs/btrfs/volumes.c | 12
1 file changed, 8 insertions(+), 4 deletions(-)
diff
On Thu, 17 Jul 2014 10:37:57 +0800, Liu Bo wrote:
On Wed, Jul 16, 2014 at 06:38:01PM +0800, Miao Xie wrote:
The missing devices are accounted by its own fs device, for example
the missing devices in seed filesystem will be accounted by the fs device
of the seed filesystem, not by the new
Please ignore this patch, the fix is not right.
Thanks
Miao
On Wed, 16 Jul 2014 18:38:37 +0800, Miao Xie wrote:
The total device counters of all the descendant filesystem account the seed
device, so after removing a seed device, we need decrease all those counters.
Signed-off-by: Miao Xie
On Tue, 15 Jul 2014 17:31:14 +0800, Liu Bo wrote:
xfstests generic/127 detected this problem.
With commit 7fc34a62ca4434a79c68e23e70ed26111b7a4cf8, now fsync will only
flush
data within the passed range. This is the cause of the above problem,
-- btrfs's fsync has a stage called 'sync
Takeuchi-san
On Thu, 10 Jul 2014 16:33:23 +0900, Satoru Takeuchi wrote:
(2014/07/10 12:05), Qu Wenruo wrote:
Before this patch, find_mount_root() and the caller both output error
message, which sometimes make the output duplicated and hard to judge
what the problem is.
This pathh will
On Mon, 7 Jul 2014 17:56:13 +0800, Anand Jain wrote:
On 07/07/2014 12:22, Miao Xie wrote:
On Mon, 7 Jul 2014 12:04:09 +0800, Anand Jain wrote:
when one of the device path is missing btrfs_device name is null. So this
patch will check for that.
stack:
BUG: unable to handle kernel NULL
On Tue, 8 Jul 2014 02:38:37 +0800, Anand Jain wrote:
(for review comments pls).
btrfs_scan_one_device() needs SB, instead of doing it from scratch could
use btrfs_get_bdev_and_sb()
Signed-off-by: Anand Jain anand.j...@oracle.com
---
fs/btrfs/volumes.c | 51
On Tue, 8 Jul 2014 12:08:19 +0800, Liu Bo wrote:
On Tue, Jul 08, 2014 at 02:38:37AM +0800, Anand Jain wrote:
(for review comments pls).
btrfs_scan_one_device() needs SB, instead of doing it from scratch could
use btrfs_get_bdev_and_sb()
Signed-off-by: Anand Jain anand.j...@oracle.com
---
, Miao Xie wrote:
On Mon, 30 Jun 2014 23:06:54 +0800, Anand Jain wrote:
The primary reason of this problem is that we didn't scan the system
and
find all the devices in the filesystem, if we scan the system, we can
mount the filesystem successfully, needn't mount it with degraded
option.
so I
Signed-off-by: Anand Jain anand.j...@oracle.com
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
Changelog v1-v2:
- Fix the problem that we forgot to set the missing flag for the cloned
device
---
fs/btrfs/volumes.c | 25 -
1 file changed, 16 insertions(+), 9
f5
[25405.18] RIP [a03570ca] assfail.constprop.88+0x1e/0x20
[btrfs]
Signed-off-by: Filipe David Borba Manana fdman...@gmail.com
---
V2: Removed test for current-journal_info == NULL. At this point it's
always expected to be NULL.
Reviewed-by: Miao Xie mi
] github.com/anajain/devmgt.git
Signed-off-by: Anand Jain anand.j...@oracle.com
Signed-off-by: Wang Shilong wangsl.f...@cn.fujitsu.com
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
Changelog v3-v4:
- Fix the over-80-charactor problem
---
fs/btrfs/volumes.c | 27 +++
1
setting.
Signed-off-by: Wang Shilong wangsl.f...@cn.fujitsu.com
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
fs/btrfs/btrfs_inode.h | 6 ++
fs/btrfs/inode.c | 39 ---
2 files changed, 42 insertions(+), 3 deletions(-)
diff --git a/fs/btrfs
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
---
fs/btrfs/extent_io.c | 34 ++
fs/btrfs/extent_io.h | 1 +
fs/btrfs/inode.c | 6 ++
3 files changed
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
---
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 23398ad..3a64354 100644
--- a/fs
-off-by: Miao Xie mi...@cn.fujitsu.com
---
fs/btrfs/volumes.c | 52
1 file changed, 36 insertions(+), 16 deletions(-)
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index 73a82e5..daecfa5 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs
The caller of btrfs_submit_direct_hook() will put the original dio bio
when btrfs_submit_direct_hook() return a error number, so we needn't
put the original bio in btrfs_submit_direct_hook().
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
fs/btrfs/inode.c | 5 ++---
1 file changed, 2
...@oracle.com
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
Changelog v1-v2:
- Fix the problem that we forgot to set the missing flag for the cloned device
---
fs/btrfs/volumes.c | 25 -
1 file changed, 16 insertions(+), 9 deletions(-)
diff --git a/fs/btrfs/volumes.c b/fs
We forgot to zero some members in fs_devices when we create new fs_devices
from the one of the seed fs. It would cause the problem that we got wrong
chunk profile when allocating chunks. Fix it.
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
fs/btrfs/volumes.c | 3 +++
1 file changed, 3
wangsl.f...@cn.fujitsu.com
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
Changelog v1-v2:
- Fix the over-80-charactor problem and unreasonable error number
---
fs/btrfs/volumes.c | 22 +-
1 file changed, 21 insertions(+), 1 deletion(-)
diff --git a/fs/btrfs/volumes.c b/fs/btrfs
On Thu, 3 Jul 2014 19:32:18 +0900, Satoru Takeuchi wrote:
(2014/07/03 17:30), Miao Xie wrote:
On Tue, 24 Jun 2014 17:46:58 +0100, Filipe David Borba Manana wrote:
Often when starting a transaction we commit the currently running
transaction,
which can end up writing block group caches when
CC Anand Jain
Sorry, please ignore this patch.
Anand wrote the same patch several days ago, so this bug fix belongs to Anand
though he NACKed his patch at that time.
Thanks
Miao
On Wed, 2 Jul 2014 17:03:54 +0800, Miao Xie wrote:
block_device's bd_disk points to the disk, not the object which
block_device's bd_disk points to the disk, not the object which block_device
is actually corresponding to(the whole disk or a partition), so we would send
uevent to the wrong target. Fix it.
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
fs/btrfs/volumes.c | 2 +-
1 file changed, 1 insertion
in btrfs_check_data_free_space.
v3: Really account the percpu pinned number when unpin, instead of zeroing
it out, as we set transaction with UNBLOCKED before 'unpin', zeroing it
out may end up with messing percpu pinned number(suggested by Miao).
v2: Add missing brakets for if statement
Reviewed-by: Miao
On Wed, 2 Jul 2014 08:41:54 +0900, Satoru Takeuchi wrote:
Hi Chris,
(2014/07/01 23:30), Chris Mason wrote:
On 07/01/2014 01:43 AM, Satoru Takeuchi wrote:
Hi Chris,
FYI, today I failed to build mason/for-linus tree as follows.
You were building for 3.15?
I just run the following
On Tue, 1 Jul 2014 17:28:46 +0800, Liu Bo wrote:
This percpu counter @total_bytes_pinned is introduced to skip unnecessary
operations of 'commit transaction', it accounts for those space we may free
but are stuck in delayed refs.
And we zero out @space_info-total_bytes_pinned every
On Mon, 30 Jun 2014 23:06:54 +0800, Anand Jain wrote:
The primary reason of this problem is that we didn't scan the system and
find all the devices in the filesystem, if we scan the system, we can
mount the filesystem successfully, needn't mount it with degraded option.
so I think the right
On Mon, 30 Jun 2014 17:12:47 +0800, Anand Jain wrote:
when one of the device path is missing btrfs_device name is null. So this
patch will check for that.
stack:
BUG: unable to handle kernel NULL pointer dereference at 0010
IP: [812e18c0] strlen+0x0/0x30
On Mon, 30 Jun 2014 18:46:07 +0800, Liu Bo wrote:
This percpu counter @total_bytes_pinned is introduced to skip unnecessary
operations of 'commit transaction', it accounts for those space we may free
but are stuck in delayed refs.
And we zero out @space_info-total_bytes_pinned every
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
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 969fb22..962defb 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
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 c49c1e1..b6b391e 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
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
---
fs/btrfs/extent_io.c | 34 ++
fs/btrfs/extent_io.h | 1 +
fs/btrfs/inode.c | 6 ++
3 files changed
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
---
fs/btrfs/btrfs_inode.h | 2 +-
fs/btrfs/disk-io.c | 43
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
---
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 5ac43b4..c49c1e1 100644
--- a/fs
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
---
fs/btrfs/extent_io.c | 8 +---
fs/btrfs/extent_io.h | 2 +-
fs/btrfs/scrub.c | 1 +
3 files
improves this problem by loading the data at once.
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
fs/btrfs/btrfs_inode.h | 1 -
fs/btrfs/ctree.h | 3 +--
fs/btrfs/file-item.c | 14 ++
fs/btrfs/inode.c | 40 ++--
4 files changed, 25
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
---
fs/btrfs/extent_io.c | 159
block not processed during the first iteration of the loop to the
end of the loop, which allows to kill the locked variable,
Signed-off-by: Geert Uytterhoeven ge...@linux-m68k.org
Looks good to me.
Reviewed-and-Tested-by: Miao Xie mi...@cn.fujitsu.com
---
Please review, compile tested
Thanks
Miao
---
Miao Xie (5):
Btrfs: make free space cache write out functions more readable
Btrfs: fix broken free space cache after the system crashed
Btrfs: use bio_endio_nodec instead of open code
Btrfs: fix deadlock when mounting a degraded fs
Btrfs: fix wrong error handle when
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
fs/btrfs/volumes.c | 9 +
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index 19c298a..31f9036 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -5399,12 +5399,6 @@ static
This patch makes the free space cache write out functions more readable,
and beisdes that, it also reduces the stack space that the function --
__btrfs_write_out_cache uses from 194bytes to 144bytes.
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
fs/btrfs/free-space-cache.c | 159
, -ENOENT will be returned.
However, there is no need to stop scrubbing since other chunks may be
scrubbed without problem.
So this patch changes the behavior to skip removed chunks and continue
to scrub the rest.
Signed-off-by: Qu Wenruo quwen...@cn.fujitsu.com
Signed-off-by: Miao Xie mi
will set the flag, and we increase bi_remaining counter,
or we don't.
Though there is another way to fix it -- decrease bi_remaining counter of the
original bio when we make sure the original bio is not submitted, this method
need add more check and is easy to make mistake.
Signed-off-by: Miao Xie
The original bio might be submitted, so we shoud increase bi_remaining to
account for it when we deal with the error that the device is missing or
is not writeable, or we would skip the endio handle.
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
fs/btrfs/volumes.c | 22
the size of that allocated space. Besides that, we also introduce
a per-block-group read-write semaphore to avoid the race between
the allocation and the free space cache write out.
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
Changelog v2 - v3:
- Fix memory leak of the block group because we grab
count.
Reported-by: Qu Wenruo quwen...@cn.fujitsu.com
Signed-off-by: Wang Shilong wangsl.f...@cn.fujitsu.com
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
fs/btrfs/extent_map.c | 2 ++
fs/btrfs/extent_map.h | 1 +
fs/btrfs/volumes.c| 10 +++---
3 files changed, 6 insertions(+), 7
On Mon, 10 Mar 2014 09:35:13 -0400, Josef Bacik wrote:
On 03/06/2014 12:55 AM, Miao Xie wrote:
Before applying this patch, the task had to reclaim the metadata
space by itself if the metadata space was not enough. And When the
task started the space reclamation, all the other tasks which
avg 5.29 seconds (user 0.34s sys 4.34s)
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
Changelog v2 - v3:
- change the condition that the background reclaimation starts.
---
fs/btrfs/ctree.h | 6 +++
fs/btrfs/disk-io.c | 3 ++
fs/btrfs/extent-tree.c | 105
If we fail to load a free space cache, we can rebuild it from the extent tree,
so it is not a serious error, we should not output a error message that
would make the users uncomfortable. This patch uses warning message instead
of it.
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
Changelog v1
the size of that allocated space. Besides that, we also introduce
a per-block-group read-write semaphore to avoid the race between
the allocation and the free space cache write out.
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
Changelog v1 - v2
- use the other method to fix the problem.
---
fs
On Fri, 7 Mar 2014 19:00:08 -0500, Josef Bacik wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 02/20/2014 05:08 AM, Miao Xie wrote:
Signed-off-by: Miao Xie mi...@cn.fujitsu.com --- fs/btrfs/ctree.c
| 25 ++--- fs/btrfs/ctree.h | 39
101 - 200 of 1023 matches
Mail list logo