this problem. So we need
not abort the current transaction.
Reported-by: Tsutomu Itoh t-i...@jp.fujitsu.com
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
fs/btrfs/inode-map.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/fs/btrfs/inode-map.c b/fs/btrfs/inode-map.c
index d26f67a
If the type of the space we need is different with the global reserve, we
can not steal the space from the global reserve, because we can not allocate
the space from the free space cache that the global reserve points to.
Cc: Tsutomu Itoh t-i...@jp.fujitsu.com
Signed-off-by: Miao Xie mi
by ourselves.
Cc: Tsutomu Itoh t-i...@jp.fujitsu.com
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
fs/btrfs/extent-tree.c | 5 +
fs/btrfs/free-space-cache.c | 39 +++
fs/btrfs/free-space-cache.h | 2 ++
fs/btrfs/inode-map.c| 5 +++--
fs/btrfs
the global reserve and fill it.
Cc: Tsutomu Itoh t-i...@jp.fujitsu.com
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
fs/btrfs/extent-tree.c | 9 -
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index c48e1bd..c75fe11 100644
cc: Tsutomu Itoh t-i...@jp.fujitsu.com
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
fs/btrfs/extent-tree.c | 65 ++
1 file changed, 28 insertions(+), 37 deletions(-)
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index 43afa77
On tue, 7 May 2013 13:54:49 +0200, David Sterba wrote:
On Mon, May 06, 2013 at 08:41:06PM -0400, Chris Mason wrote:
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index 988b860..4de2351 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -1690,15 +1690,19 @@ static int
-s_umount in cleaner_kthread().
Cc: David Sterba dste...@suse.cz
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
fs/btrfs/disk-io.c | 40
1 file changed, 28 insertions(+), 12 deletions(-)
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index a9df562
If the fs is remounted to be R/O, it is unnecessary to call
btrfs_clean_one_deleted_snapshot(), so move the R/O check out of
this function. And besides that, it can make the check logic in the
caller more clear.
Cc: David Sterba dste...@suse.cz
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
fs
Cc: David Sterba dste...@suse.cz
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
fs/btrfs/disk-io.c | 12 +++-
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index cb2bfd1..927da1a 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk
The snapshot/subvolume deletion might spend lots of time, it would make
the remount task wait for a long time. This patch improve this problem,
we will break the deletion if the fs is remounted to be R/O. It will make
the users happy.
Cc: David Sterba dste...@suse.cz
Signed-off-by: Miao Xie mi
On tue, 14 May 2013 18:20:40 +0800, Miao Xie wrote:
In order to avoid the R/O remount, we acquired -s_umount lock during
we deleted the dead snapshots and subvolumes. But it is unnecessary,
because we have cleaner_mutex.
We use cleaner_mutex to protect the process of the dead snapshots
inode_tree_del() will move the tree root into the dead root list, and
then the tree will be destroyed by the cleaner. So if we remove the
delayed node which is cached in the inode after inode_tree_del(),
we may access a freed tree root. Fix it.
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
fs
The root node of the rb-tree may be changed, so we should get it under
the lock. Fix it.
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
fs/btrfs/inode.c | 7 +++
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 7f6e78a..bf5c399 100644
btrfs_invalidate_inodes() may sleep, so we should not invoke it in the
spin lock context. Fix it.
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
fs/btrfs/disk-io.c | 6 ++
1 file changed, 6 insertions(+)
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index 642c861..724a0da 100644
When we create a snapshot, we need flush all delalloc inodes in the
fs, just flushing the inodes in the source tree is OK. So we introduce
per-subvolume delalloc inode list.
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
fs/btrfs/ctree.h | 22 ---
fs/btrfs/dev-replace.c | 2 +-
fs
it is unnecessary to check the orphan
item again.
So cleanup it.
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
fs/btrfs/ctree.h | 6 +-
fs/btrfs/disk-io.c | 282 +
fs/btrfs/disk-io.h | 11 +-
fs/btrfs/extent-tree.c | 6 +-
fs
It is unnecessary to flush the delalloc inodes again and again because
we don't care the dirty pages which are introduced after the flush, and
they will be flush in the transaction commit.
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
fs/btrfs/transaction.c | 26 ++
1
, such as
snapshot creation, btrfs doesn't commit the transaction on its
own initiative.
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
fs/btrfs/transaction.c | 29 ++---
1 file changed, 6 insertions(+), 23 deletions(-)
diff --git a/fs/btrfs/transaction.c b/fs/btrfs
.
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
fs/btrfs/transaction.c | 55 ++
fs/btrfs/transaction.h | 31
2 files changed, 65 insertions(+), 21 deletions(-)
diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c
|
__TRANS_JOIN_NOLOCK),
}
it is very intuitionistic.
Besides that, because we remove -in_commit in transaction structure, so
the lock -commit_lock which was used to protect it is unnecessary, remove
-commit_lock.
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
fs/btrfs/ctree.h | 1 -
fs/btrfs/disk
If the transaction is removed from the transaction list, it means the
transaction has been committed successfully. So it is impossible to
call cleanup_transaction(), otherwise there is something wrong with
the code logic. Thus, we use BUG_ON() instead of the original handle.
Signed-off-by: Miao
Signed-off-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 a4807ce..f0857e0 100644
--- a/fs/btrfs/super.c
+++ b/fs/btrfs/super.c
@@ -1263,6 +1263,7 @@ static int btrfs_remount(struct super_block
just flush the delalloc inodes that
in the source trees before snapshot creation, so the transaction commit
will complete quickly.
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
fs/btrfs/ioctl.c | 6 ++
fs/btrfs/transaction.c | 10 +-
2 files changed, 7 insertions(+), 9
The reason we introduce per-subvolume ordered extent list is the same
as the per-subvolume delalloc inode list.
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
fs/btrfs/ctree.h| 25 ---
fs/btrfs/dev-replace.c | 4 +-
fs/btrfs/disk-io.c | 45 +++-
fs
a residual transaction.
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
fs/btrfs/disk-io.c | 9 +
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index 44d5a86..6bb3f3d 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -3992,7
We have checked if -node is NULL or not, so it is unnecessary to
use BUG_ON() to check again. Remove it.
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
fs/btrfs/disk-io.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index 2a9ae38..8c1e4fb 100644
is sleeping.
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
fs/btrfs/transaction.c | 8 +---
fs/btrfs/transaction.h | 2 --
2 files changed, 1 insertion(+), 9 deletions(-)
diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c
index 265db57..75e7b15 100644
--- a/fs/btrfs/transaction.c
extent list, which can reduce the flush time when we create snapshots.
- 0013-0016 improve the block time during the transaction commit by removing
the while loop at the beginning of the transaction commit.
- 0017 improves the readability of the code.
Miao Xie (17):
Btrfs: fix accessing a freed
The grab/put funtions will be used in the next patch, which need grab
the root object and ensure it is not freed. We use reference counter
instead of the srcu lock is to aovid blocking the memory reclaim task,
which invokes synchronize_srcu().
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
fs
On Thu, 16 May 2013 11:20:39 +0800, Liu Bo wrote:
On Wed, May 15, 2013 at 03:48:24PM +0800, Miao Xie wrote:
Before applying this patch, we need flush all the delalloc inodes in
the fs when we want to create a snapshot, it wastes time, and make
the transaction commit be blocked for a long time
On thu, 16 May 2013 11:36:46 +0800, Liu Bo wrote:
On Wed, May 15, 2013 at 03:48:20PM +0800, Miao Xie wrote:
The grab/put funtions will be used in the next patch, which need grab
the root object and ensure it is not freed. We use reference counter
instead of the srcu lock is to aovid blocking
On Thu, 16 May 2013 13:15:57 +0800, Liu Bo wrote:
On Thu, May 16, 2013 at 12:31:11PM +0800, Miao Xie wrote:
On thu, 16 May 2013 11:36:46 +0800, Liu Bo wrote:
On Wed, May 15, 2013 at 03:48:20PM +0800, Miao Xie wrote:
The grab/put funtions will be used in the next patch, which need grab
On thu, 16 May 2013 14:15:52 +0800, Liu Bo wrote:
On Thu, May 16, 2013 at 01:34:11PM +0800, Miao Xie wrote:
On Thu, 16 May 2013 13:15:57 +0800, Liu Bo wrote:
On Thu, May 16, 2013 at 12:31:11PM +0800, Miao Xie wrote:
On thu, 16 May 2013 11:36:46 +0800, Liu Bo wrote:
On Wed, May 15, 2013 at 03
On thu, 16 May 2013 22:57:07 +0800, Liu Bo wrote:
On Thu, May 16, 2013 at 10:34:55AM -0400, Chris Mason wrote:
Quoting Liu Bo (2013-05-16 10:31:39)
On Thu, May 16, 2013 at 07:54:17AM -0400, Chris Mason wrote:
Quoting Miao Xie (2013-05-16 03:22:37)
I must say that the patch itself looks
|
__TRANS_JOIN_NOLOCK),
}
it is very intuitionistic.
Besides that, because we remove -in_commit in transaction structure, so
the lock -commit_lock which was used to protect it is unnecessary, remove
-commit_lock.
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
Changelog v1 - v2:
- remove the misuse
block reservation for inode cache truncation)
Signed-off-by: Wei Yongjun yongjun_...@trendmicro.com.cn
Thanks for your fix.
Reviewed-by: Miao Xie mi...@cn.fujitsu.com
---
fs/btrfs/free-space-cache.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/btrfs/free-space
went up ~60%(2.9MB/s - 4.6MB/s)
on my scsi disk whose disk buffer was enabled.
Test step:
# mkfs.btrfs -f -m single disk
# mount disk mnt
# dd if=/dev/zero of=mnt/file0 bs=32K count=1024 oflag=sync
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
fs/btrfs/transaction.c | 6 +++---
fs/btrfs
On tue, 28 May 2013 14:50:25 -0400, Josef Bacik wrote:
Stefan pointed out that xfstests generic/013 was failing because the free
space
cache checker was complaining with leafsize of 16k. Turns out this is because
we were unconditionally using root-sectorsize as the free space ctl unit
On wed, 29 May 2013 10:55:11 +0900, Liu Bo wrote:
On Tue, May 28, 2013 at 09:22:11AM -0500, Kyle Gates wrote:
From: Liu Bo bo.li@oracle.com
Subject: [PATCH] Btrfs: fix broken nocow after a normal balance
[...]
Sorry for the long wait in replying.
This patch was unsuccessful in fixing
-by: Zach Brown z...@redhat.com
Reviewed-by: Miao Xie mi...@cn.fujitsu.com
---
fs/btrfs/delayed-inode.c | 5 +++--
fs/btrfs/inode.c | 17 +++--
2 files changed, 10 insertions(+), 12 deletions(-)
diff --git a/fs/btrfs/delayed-inode.c b/fs/btrfs/delayed-inode.c
index
On tue, 4 Jun 2013 16:26:57 -0700, Zach Brown wrote:
On Tue, Jun 04, 2013 at 07:16:53PM -0400, Chris Mason wrote:
Quoting Zach Brown (2013-06-04 18:17:54)
Hi gang,
I finally sat down to fix that readdir hang that has been in the back
of my mind for a while. I *hope* that the fix is
On wed, 5 Jun 2013 15:36:36 +0200, David Sterba wrote:
On Wed, Jun 05, 2013 at 10:34:08AM +0800, Miao Xie wrote:
On tue, 4 Jun 2013 16:26:57 -0700, Zach Brown wrote:
On Tue, Jun 04, 2013 at 07:16:53PM -0400, Chris Mason wrote:
Quoting Zach Brown (2013-06-04 18:17:54)
Hi gang,
I
last_snapshot safely if no one snapshoted the
source tree. We fix the above problem by this way.
Reported-by: Kyle Gates kylega...@hotmail.com
Signed-off-by: Liu Bo bo.li@oracle.com
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
fs/btrfs/relocation.c | 44
.
Signed-off-by: Naohiro Aota na...@elisp.net
Reviewed-by: Miao Xie mi...@cn.fujitsu.com
---
fs/btrfs/inode.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index af978f7..17f3064 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -8012,6
On wed, 12 Jun 2013 23:11:02 +0300, Alex Lyakas wrote:
I reviewed the code starting from:
69aef69a1bc154 Btrfs: don't wait for all the writers circularly during
the transaction commit
until
2ce7935bf4cdf3 Btrfs: remove the time check in btrfs_commit_transaction()
It looks very good. Let me
Reviewed-by: Miao Xie mi...@cn.fujitsu.com
---
fs/btrfs/backref.c | 41 -
fs/btrfs/backref.h |2 --
2 files changed, 16 insertions(+), 27 deletions(-)
diff --git a/fs/btrfs/backref.c b/fs/btrfs/backref.c
index 290e347..431ea92 100644
--- a/fs
-by: Miao Xie mi...@cn.fujitsu.com
---
fs/btrfs/ctree.c | 25 ++
fs/btrfs/ctree.h | 2 +
fs/btrfs/file-item.c | 249 ++-
3 files changed, 133 insertions(+), 143 deletions(-)
diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c
index 02fae7f
On fri, 14 Jun 2013 16:21:24 +0800, Wang Sheng-Hui wrote:
The comment is for btrfs_attach_transaction_barrier, not for
btrfs_attach_transaction. Fix the typo.
Signed-off-by: Wang Sheng-Hui shh...@gmail.com
My miss, sorry.
Acked-by: Miao Xie mi...@cn.fujitsu.com
---
fs/btrfs
On sun, 16 Jun 2013 13:38:42 +0300, Alex Lyakas wrote:
Hi Miao,
On Thu, Jun 13, 2013 at 6:08 AM, Miao Xie mi...@cn.fujitsu.com wrote:
On wed, 12 Jun 2013 23:11:02 +0300, Alex Lyakas wrote:
I reviewed the code starting from:
69aef69a1bc154 Btrfs: don't wait for all the writers
Any comments?
Thanks
Miao
On thu, 13 Jun 2013 20:22:17 +0800, Miao Xie wrote:
Before applying this patch, we search the csum item at first, and If the
new csums is adjoining to the existed csum item, we call btrfs_search_slot()
to grow this item. It is unnecessary because we can re-use
the relative checksum value, and -bytenr in each
checksum structure should point to the start of its extent, not the
start of the ordered extent. Fix it.
Signed-off-by: Josef Bacik jba...@fusionio.com
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
fs/btrfs/relocation.c | 4 +++-
1 file changed, 3
It was fixed by Wei Yongjun
http://marc.info/?l=linux-btrfsm=136910396606489w=2
Thanks
Miao
On tue, 18 Jun 2013 22:57:41 +0100, Djalal Harouni wrote:
btrfs_check_trunc_cache_free_space() tries to check if there is enough
space for cache inode truncation but it fails.
Currently this
the
performance by ~74% on my SSD (31MB/s - 54MB/s).
test command:
# dd if=/dev/zero of=/mnt/btrfs/file0 bs=1M count=1024 oflag=sync
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
Changelog v3 - v4:
- fix wrong csum clone when doing relocation.
Changelog v2 - v3:
- address the problem
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
fs/btrfs/inode.c | 10 +-
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 590c274..65ae1cb 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -7136,7 +7136,6 @@ static void
goto in the return value check of the write
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
fs/btrfs/scrub.c | 48 +++-
1 file changed, 23 insertions(+), 25 deletions(-)
diff --git a/fs/btrfs/scrub.c b/fs/btrfs/scrub.c
index c1647f8..186ea82 100644
- It makes no sense that we deal with a inode in the dead tree.
- fix the race between dio and page copy by waiting the dio completion
- avoid the page copy vs truncate/punch hole
- check if the page is in the page cache or not
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
fs/btrfs/scrub.c
...@cn.fujitsu.com
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
fs/btrfs/scrub.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/btrfs/scrub.c b/fs/btrfs/scrub.c
index 63144e4..c1647f8 100644
--- a/fs/btrfs/scrub.c
+++ b/fs/btrfs/scrub.c
@@ -3258,7 +3258,7 @@ static int
This patchset introduced chunk recover function, which was implemented by
scanning the whoel disks in the filesystem. Now, we can recover Single,
Dup, RAID1 chunks, and RAID0, RAID10, RAID5, RAID6 metadata chunks.
Miao Xie (11):
Btrfs-progs: don't close the file descriptor 0 when closing
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
list.h | 68 +-
1 file changed, 59 insertions(+), 9 deletions(-)
diff --git a/list.h b/list.h
index 50f4619..db7a58c 100644
--- a/list.h
+++ b/list.h
@@ -223,18 +223,18 @@ static
after the taskes
die.
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
btrfs-find-root.c | 21 +
disk-io.c | 30 ++
volumes.c | 3 +++
3 files changed, 6 insertions(+), 48 deletions(-)
diff --git a/btrfs-find-root.c b/btrfs-find
Because the fs/file roots are not extents, so it is better to use rb-tree
to manage them. Fix it.
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
ctree.h | 4 ++--
disk-io.c | 50 --
2 files changed, 38 insertions(+), 16 deletions(-)
diff
As we know, the file descriptor 0 is a special number, so we shouldn't
use it to initialize the file descriptor of the devices, or we might
close this special file descriptor by mistake when we close the devices.
-1 is a better choice.
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
btrfs-find
are not available.
Signed-off-by: Qu Wenruo quwen...@cn.fujitsu.com
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
btrfsck.h| 1 +
cmds-check.c | 31 ++-
cmds-chunk.c | 175 ++-
volumes.c| 11 ++--
volumes.h| 5 +-
5
recover the
raid0/radi10/
raid5/raid6 metadata chunk.
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
cmds-chunk.c | 289 ---
1 file changed, 279 insertions(+), 10 deletions(-)
diff --git a/cmds-chunk.c b/cmds-chunk.c
index 7b740a3
For the above example, csum root leaf comes into system block group which
is wrong,csum root leaf should be in metadata block group.
Signed-off-by: Wang Shilong wangsl-f...@cn.fujitsu.com
Reviewed-by: Miao Xie mi...@cn.fujitsu.com
---
mkfs.c | 56
In fact, the code of many rb-tree insert/search/delete functions is similar,
so we can abstract them, and implement common functions for rb-tree, and then
simplify them.
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
btrfs-list.c | 19 +++-
cmds-check.c | 111
named objectid
into the extent cache, and introduced some functions to make the extent cache
be suitable to manage the device extent.
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
cmds-check.c | 96 ++---
extent-cache.c | 134
This patch adds the function to check correspondence between block group,
chunk and device extent.
Original-signed-off-by: Cheng Yang chenyang.f...@cn.fujitsu.com
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
Makefile | 2 +-
btrfsck.h| 118 +
cmds-check.c | 555
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
btrfs-find-root.c | 137 +++-
disk-io.c | 473 +++---
disk-io.h | 12 ++
3 files changed, 307 insertions(+), 315 deletions(-)
diff --git a/btrfs-find-root.c b/btrfs-find
On wed, 3 Jul 2013 15:17:02 +0100, Filipe David Manana wrote:
On Wed, Jul 3, 2013 at 2:25 PM, Miao Xie mi...@cn.fujitsu.com wrote:
+++ b/disk-io.c
@@ -1270,12 +1270,13 @@ static int close_all_devices(struct btrfs_fs_info
*fs_info)
while (!list_empty(list)) {
device
On Wed, 26 Jun 2013 20:53:00 +0300, Alex Lyakas wrote:
Hi Miao,
On Mon, Jun 17, 2013 at 4:51 AM, Miao Xie mi...@cn.fujitsu.com wrote:
On sun, 16 Jun 2013 13:38:42 +0300, Alex Lyakas wrote:
Hi Miao,
On Thu, Jun 13, 2013 at 6:08 AM, Miao Xie mi...@cn.fujitsu.com wrote:
On wed, 12 Jun
not change the write offset because it is corresponding to the source
device, not the mirror device, if we change it by the offset of the mirror
device, we would get the wrong offset. Fix it.
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
fs/btrfs/scrub.c | 6 +-
1 file changed, 1 insertion(+), 5
On thu, 4 Jul 2013 16:14:23 +0200, Stefan Behrens wrote:
Miao Xie reported the following issue:
The filesystem was corrupted after we did a device replace.
Steps to reproduce:
# mkfs.btrfs -f -m single -d raid10 device0..device3
# mount device0 mnt
# btrfs replace start -rfB 1
It is unnecessary to unlock the extent by the page size, we can do it
in batches, it makes the random read be faster by ~6%.
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
fs/btrfs/extent_io.c | 70 ++--
1 file changed, 40 insertions(+), 30
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
fs/btrfs/extent_io.c | 14 +-
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index 4bfbcc5..c9b28cf 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -2503,7
contention.
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
fs/btrfs/btrfs_inode.h | 21 +
fs/btrfs/ctree.h | 4 +-
fs/btrfs/disk-io.c | 5 ++-
fs/btrfs/extent_io.c | 113 -
fs/btrfs/extent_io.h | 10 ++---
fs/btrfs/file
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
fs/btrfs/extent_io.c | 25 +++--
1 file changed, 11 insertions(+), 14 deletions(-)
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index f8586a9..4bfbcc5 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
There are only 4 patches in this patchset, not 5.
Sorry for my mistake.
Miao
On thu, 11 Jul 2013 13:25:36 +0800, Miao Xie wrote:
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
fs/btrfs/extent_io.c | 25 +++--
1 file changed, 11 insertions(+), 14 deletions(-)
diff
On thu, 18 Jul 2013 23:46:10 -0700, Filipe David Borba Manana wrote:
Signed-off-by: Filipe David Borba Manana fdman...@gmail.com
---
extent-tree.c |2 ++
1 file changed, 2 insertions(+)
diff --git a/extent-tree.c b/extent-tree.c
index f597e16..8e93bab 100644
--- a/extent-tree.c
+++
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
fs/btrfs/raid56.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/fs/btrfs/raid56.c b/fs/btrfs/raid56.c
index 0db856c..d0ecfbd 100644
--- a/fs/btrfs/raid56.c
+++ b/fs/btrfs/raid56.c
@@ -1540,8 +1540,10 @@ static int
errors occur though, so I
have added some more calls to kfree().
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
From the viewpoint of the readability, it is better to free raid_map and bbio
in the caller, I think. But it is up to you.
Reviewed-by: Miao Xie mi...@cn.fujitsu.com
diff
it.
So reset it to 0 right after the search so we don't leak this and get
uneccessary warnings. Thanks,
Signed-off-by: Josef Bacik jba...@fusionio.com
Reviewed-by: Miao Xie mi...@cn.fujitsu.com
---
fs/btrfs/inode.c |3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git
in two cases anyway so just move the drop up so that we don't have duplicate
code. Thanks,
Signed-off-by: Josef Bacik jba...@fusionio.com
Reviewed-by: Miao Xie mi...@cn.fujitsu.com
---
fs/btrfs/tree-log.c |5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/fs/btrfs
Before applying this patch, we set the uptodate flag and unlock the extent
by the page size, it is unnecessary, we can do it in batches, it can reduce
the lock contention of the extent state tree.
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
Changelog v1 - v2:
- Fix wrong check
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
Changelog v1 - v2:
- None
---
fs/btrfs/extent_io.c | 26 +++---
1 file changed, 11 insertions(+), 15 deletions(-)
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index f8586a9..a722235 100644
--- a/fs/btrfs/extent_io.c
-by: Miao Xie mi...@cn.fujitsu.com
---
Changelog v1 - v2:
- New patch
---
fs/btrfs/extent_io.c | 57 ++--
1 file changed, 46 insertions(+), 11 deletions(-)
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index 53a1828..2e6dfeb 100644
--- a/fs/btrfs
into the bio object, so
it is unnecessary to do the extent state operations by the block size, we
can do it in batches, in this way, we can reduce the lock contention of
the extent state tree.
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
Changelog v1 - v2:
- New patch
---
fs/btrfs/extent_io.c
contention.
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
Changelog v1 - v2:
- Fix uninitialized function pointer in the btrfs_io_bio
---
fs/btrfs/btrfs_inode.h | 21 +
fs/btrfs/ctree.h | 4 +-
fs/btrfs/disk-io.c | 5 +-
fs/btrfs/extent_io.c | 125
map tree. Patch 6 does this work.
I tested this patchset by sysbench on my SSD, it makes the performance of
the random read be faster by ~7%. The lock contention is reduced by ~97%.
Miao Xie (6):
Btrfs: remove unnecessary argument of bio_readpage_error()
Btrfs: add branch prediction hints
.
*/
The other code is OK.
Reviewed-by: Miao Xie mi...@cn.fujitsu.com
key.objectid = BTRFS_DEV_ITEMS_OBJECTID;
key.offset = 0;
key.type = 0;
-again:
ret = btrfs_search_slot(NULL, root, key, path, 0, 0);
if (ret 0)
goto error;
@@ -5699,17 +5698,13 @@ again
On mon, 29 Jul 2013 23:37:19 +0100, Filipe David Borba Manana wrote:
Also remove unused path in extent-tree.c:finish_current_insert().
Signed-off-by: Filipe David Borba Manana fdman...@gmail.com
---
V2: added 1 more path alloc check and removed unnecessary path
allocation in
---
V2: Simplified logic inside the loop
(suggested by Josef Bacik on irc).
The comment is the same to the kernel side(Coding style problem of the comment).
Reviewed-by: Miao Xie mi...@cn.fujitsu.com
volumes.c | 28 +---
1 file changed, 9 insertions(+), 19
;
}
but from the viewpoint of the readability, this way is not so good.
Reviewed-by: Miao Xie mi...@cn.fujitsu.com
--
1.7.10.4
--
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
...@fusionio.com
Reviewed-by: Miao Xie mi...@cn.fujitsu.com
---
fs/btrfs/extent_io.c | 32 ---
fs/btrfs/extent_io.h | 21 +++
fs/btrfs/inode.c | 162
--
3 files changed, 85 insertions(+), 130 deletions(-)
diff --git a/fs/btrfs
release function in cow_file_range_inline() as
I said above,
we should add EXTENT_DO_ACCOUNTING here.
I will send a patch to fix the problem I said above soon, please wait a moment
The other code is OK.
Reviewed-by: Miao Xie mi...@cn.fujitsu.com
--
To unsubscribe from this list: send the line
.
Reviewed-by: Miao Xie mi...@cn.fujitsu.com
fs/btrfs/volumes.c | 30 +++---
1 file changed, 11 insertions(+), 19 deletions(-)
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index 090f57c..125a60e 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
---
V2: Simplified logic inside the loop
(suggested by Josef Bacik on irc).
V3: Updated comment to comply with kernel coding style.
Reviewed-by: Miao Xie mi...@cn.fujitsu.com
volumes.c | 28 ++--
1 file changed, 10 insertions(+), 18 deletions(-)
diff
in extent-tree.c:finish_current_insert().
V3: added missing path alloc checks to dir-item.c, file-item.c
and btrfs-corrupt-block.c too.
V4: added missing patch alloc checks to cmd-checks.c and
root-tree.c.
Reviewed-by: Miao Xie mi...@cn.fujitsu.com
btrfs-corrupt-block.c |2 ++
cmds
to relink_is_mergable() directly?
The other code is OK.
Reviewed-by: Miao Xie mi...@cn.fujitsu.com
btrfs_set_file_extent_num_bytes(leaf, fi,
extent_len + len);
btrfs_mark_buffer_dirty(leaf
Hi, Josef
On Tue, 30 Jul 2013 14:27:40 +0800, Miao Xie wrote:
extent_clear_unlock_delalloc(inode, start, end, NULL,
- EXTENT_DIRTY |
- EXTENT_DELALLOC
1 - 100 of 1023 matches
Mail list logo