.
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 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
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
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 v2 - v3:
- address the problem that the csums was inserted into the wrong range, this bug
was reported
On tue, 23 Apr 2013 16:54:35 -0400, Josef Bacik wrote:
On Wed, Apr 03, 2013 at 03:14:56AM -0600, Miao Xie wrote:
Using the structure btrfs_sector_sum to keep the checksum value is
unnecessary, because the extents that btrfs_sector_sum points to are
continuous, we can find out the expected
On Fri, 26 Apr 2013 16:58:18 +0800, Miao Xie wrote:
On tue, 23 Apr 2013 16:54:35 -0400, Josef Bacik wrote:
On Wed, Apr 03, 2013 at 03:14:56AM -0600, Miao Xie wrote:
Using the structure btrfs_sector_sum to keep the checksum value is
unnecessary, because the extents that btrfs_sector_sum points
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
fs/btrfs/extent-tree.c | 19 +++
1 file changed, 11 insertions(+), 8 deletions(-)
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index 0d84787..4976f93 100644
--- a/fs/btrfs/extent-tree.c
+++ b/fs/btrfs/extent-tree.c
On Mon, 15 Apr 2013 19:20:51 +0200, David Sterba wrote:
On Fri, Apr 12, 2013 at 12:01:19PM -0500, Eric Sandeen wrote:
On 4/11/13 5:35 AM, Miao Xie wrote:
Now, we set incompat flag EXTEND_IREF when we actually need insert a
extend inode reference, not when making a fs. But some users may hope
On thu, 18 Apr 2013 00:17:11 +0200, David Sterba wrote:
On Thu, Apr 11, 2013 at 06:30:16PM +0800, Miao Xie wrote:
In order to avoid this problem, we introduce a lock named super_lock into
the btrfs_fs_info structure. If we want to update incompat/compat flags
of the super block, we must
On Fri, 12 Apr 2013 09:02:34 +0200, Jan Schmidt wrote:
+static int btrfs_close_extend_iref(struct btrfs_fs_info *fs_info,
+ unsigned long old_opts)
The name irritated me, it's more like unset instead of close, isn't it?
Maybe btrfs_set_no_extend_iref() is better,
The new mount option is set after parsing the remount arguments,
so it is wrong that checking the autodefrag is close or not at
btrfs_remount_prepare(). Fix it.
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
fs/btrfs/super.c | 10 +++---
1 file changed, 7 insertions(+), 3 deletions
into
the btrfs_fs_info structure. If we want to update incompat/compat flags
of the super block, we must hold it.
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
fs/btrfs/ctree.h | 22 --
fs/btrfs/disk-io.c | 5 +
fs/btrfs/volumes.c | 10 +-
3 files changed, 26 insertions(+), 11
.
This patchset is against:
[PATCH 1/2] Btrfs: fix unblocked autodefraggers when remount
[PATCH 2/2] Btrfs: use a lock to protect incompat/compat flag of the super block
Miao Xie (2):
Btrfs: set the INCOMPAT_EXTENDED_IREF when the extended iref is inserted
Btrfs: introduce noextiref mount option
fs
We needn't set the INCOMAT_EXTENDED_IREF when making a new fs, just
do it after we insert a extended iref successfully. Otherwise, we
can not mount the fs in which there is no extended iref in fact on
the old kernel, it is not so flexible for the users.
Signed-off-by: Miao Xie mi
this function.
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
Cc: Mark Fasheh mfas...@suse.de
---
fs/btrfs/ctree.h | 1 +
fs/btrfs/disk-io.c| 9 +
fs/btrfs/inode-item.c | 2 +-
fs/btrfs/super.c | 41 -
4 files changed, 51 insertions(+), 2
There is no extended irefs in the new fs, and we can mount it on
the old kernel without extended iref function safely. So we needn't
set INCOMPAT_EXTENDED_IREF flag when making a new fs, and just set
it when we actually insert a extended iref.
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
Cc: Mark
On Thu, 11 Apr 2013 16:28:11 +0200, Jan Schmidt wrote:
On Thu, April 11, 2013 at 12:28 (+0200), Miao Xie wrote:
There is no extended irefs in the new fs, and we can mount it on
the old kernel without extended iref function safely. So we needn't
set INCOMPAT_EXTENDED_IREF flag when making a new
On thu, 11 Apr 2013 16:29:48 +0200, Jan Schmidt wrote:
On Thu, April 11, 2013 at 12:35 (+0200), Miao Xie wrote:
Now, we set incompat flag EXTEND_IREF when we actually need insert a
extend inode reference, not when making a fs. But some users may hope
that the fs still can be mounted
, 2013 at 3:51 AM, Miao Xie mi...@cn.fujitsu.com wrote:
On Sun, 24 Mar 2013 13:13:22 +0200, Alex Lyakas wrote:
Hi Miao,
I am seeing another issue. Your fix prevents from TRANS_START to get
in the way of a committing transaction. But it does not prevent from
TRANS_JOIN. On the other hand
On mon, 8 Apr 2013 22:16:26 +0800, Liu Bo wrote:
On Mon, Apr 08, 2013 at 08:54:50AM -0400, Josef Bacik wrote:
On Sun, Apr 07, 2013 at 07:12:48AM -0600, Liu Bo wrote:
(NOTE: This leads to a FORMAT CHANGE, DO NOT use it on real data.)
This introduce the online data deduplication feature
On mon, 8 Apr 2013 15:47:27 +0200, David Sterba wrote:
On Sun, Apr 07, 2013 at 09:12:48PM +0800, Liu Bo wrote:
(2) WHAT is deduplication?
Two key ways for practical deduplication implementations,
* When the data is deduplicated
(inband vs background)
* The
- 217us).
# dd if=mnt/file of=/dev/null bs=1M count=1024
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
Changelog v2 - v3:
- address the problem that the logical offset of the pages in the same bio is
not contiguous.
Changelog v1 - v2:
- fix 64bit division problem on i386 machine
---
fs/btrfs
- 217us).
# dd if=mnt/file of=/dev/null bs=1M count=1024
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
Changelog v1 - v2:
- fix 64bit division problem on i386 machine
---
fs/btrfs/extent_io.c| 31 +++
fs/btrfs/extent_io.h| 2 ++
fs/btrfs/file-item.c| 45
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
Reviewed-by: Liu Bo bo.li@oracle.com
---
Changelog v1 - v2:
- modify the changelog and the title which can not explain
- btrfs_csum_file_blocks() didn't differentiate between these
two types of the cases, fix it.
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
fs/btrfs/file-item.c | 2 --
fs/btrfs/inode.c | 2 ++
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/btrfs/file-item.c b/fs/btrfs
- 217us).
# dd if=mnt/file of=/dev/null bs=1M count=1024
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
fs/btrfs/extent_io.c| 31 +++
fs/btrfs/extent_io.h| 2 ++
fs/btrfs/file-item.c| 45 ++---
fs/btrfs/ordered-data.c
the checksums
one by one. Now, we can get several checksum value at one time. By this
way, the performance of write is improved 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
---
fs
If we don't find the expected csum item, but find a csum item which is
adjacent to the specified extent, we should return -EFBIG, or we should
return -ENOENT. But btrfs_lookup_csum() return -EFBIG even the csum item
is not adjacent to the specified extent. Fix it.
Signed-off-by: Miao Xie mi
the checksums
one by one. Now, we can get several checksum value at one time. By this
way, the performance of write is improved 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
On Thu, 28 Mar 2013 22:41:50 +0800, Liu Bo wrote:
On Thu, Mar 28, 2013 at 10:38:34PM +0800, Liu Bo wrote:
On Thu, Mar 28, 2013 at 04:11:38PM +0800, Miao Xie wrote:
bytenr in btrfs_sector_sum is unnecessary, because the extents that
btrfs_sector_sum points to are continuous,we can find out
TRANS_JOIN here.
(I am dealing with the problem you said above by adding a new type of
TRANS_* now)
Thanks
Miao
Thanks,
Alex.
On Mon, Feb 25, 2013 at 12:20 PM, Miao Xie mi...@cn.fujitsu.com wrote:
On sun, 24 Feb 2013 21:49:55 +0200, Alex Lyakas wrote:
Hi Miao,
can you please explain
On wed, 6 Mar 2013 09:53:28 -0500, Chris Mason wrote:
On Tue, Mar 05, 2013 at 07:45:34PM -0700, Miao Xie wrote:
We re-queue the node just when there are some delayed items in the current
node.
But if the node still has delayed items after we deal with it, that is to say
someone
On wed, 6 Mar 2013 09:53:28 -0500, Chris Mason wrote:
[SNIP]
static int btrfs_wq_run_delayed_node(struct btrfs_delayed_root *delayed_root,
- struct btrfs_root *root, int all)
+ struct btrfs_root *root, int nr)
{
- struct
On wed, 6 Mar 2013 22:06:50 -0500, Chris Mason wrote:
On Wed, Mar 06, 2013 at 06:39:30PM -0700, Miao Xie wrote:
On wed, 6 Mar 2013 09:53:28 -0500, Chris Mason wrote:
[SNIP]
+ async_work-delayed_root = delayed_root;
+ async_work-work.func = btrfs_async_run_delayed_root
On tue, 5 Mar 2013 10:40:17 -0500, Chris Mason wrote:
diff --git a/fs/btrfs/delayed-inode.c b/fs/btrfs/delayed-inode.c
index 0b278b1..460d1a8 100644
--- a/fs/btrfs/delayed-inode.c
+++ b/fs/btrfs/delayed-inode.c
@@ -22,8 +22,8 @@
#include disk-io.h
#include transaction.h
-#define
- the transaction committer doesn't free the pending snapshots,
just assigns the error number and evicts them before we unblock
the transaction.
Reported-by: Dan Carpenter dan.carpen...@oracle.com
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
fs/btrfs/disk-io.c | 16 +---
fs/btrfs
-by: Miao Xie mi...@cn.fujitsu.com
---
fs/btrfs/ioctl.c |4
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index 94c0e42..3fdfabc 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -527,6 +527,8 @@ fail:
if (async_transid
On Mon, 4 Mar 2013 18:54:02 +0800, Liu Bo wrote:
On Mon, Mar 04, 2013 at 05:44:29PM +0800, Miao Xie wrote:
There are several bugs at error path of create_snapshot() when the
transaction commitment failed.
- access the freed transaction handler. At the end of the
transaction commitment
to fix the parent dentry
and get the dir inode.
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
fs/btrfs/ioctl.c | 10 ++
fs/btrfs/transaction.c |5 +
fs/btrfs/transaction.h |1 +
3 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs
, we need reserve space only
for 3 items.
So we implement new metadata reservation functions for the
snapshot/subvolume creation.
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
fs/btrfs/ctree.h |9 +-
fs/btrfs/extent-tree.c | 65
When deleting a snapshot/subvolume, we need remove root ref/backref,
dir entries and update the dir inode, so we must reserve free space
for those operations.
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
fs/btrfs/ioctl.c | 21 +++--
1 files changed, 19 insertions(+), 2
On sun, 24 Feb 2013 21:49:55 +0200, Alex Lyakas wrote:
Hi Miao,
can you please explain your solution a bit more.
On Wed, Feb 20, 2013 at 11:16 AM, Miao Xie mi...@cn.fujitsu.com wrote:
Now btrfs_commit_transaction() does this
ret = btrfs_run_ordered_operations(root, 0)
which async flushes
On mon, 25 Feb 2013 11:50:01 +0800, Liu Bo wrote:
On Fri, Feb 22, 2013 at 11:04:40PM +0100, David Sterba wrote:
On Fri, Feb 22, 2013 at 05:34:47PM +0800, Miao Xie wrote:
On fri, 22 Feb 2013 16:40:35 +0800, Liu Bo wrote:
On Fri, Feb 22, 2013 at 03:32:50AM -0500, Marios Titas wrote:
Sorry
need to set trans handle to indicate that we have space
now.
Signed-off-by: Liu Bo bo.li@oracle.com
Reviewed-by: Miao Xie mi...@cn.fujitsu.com
---
fs/btrfs/transaction.c |2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/fs/btrfs/transaction.c b/fs/btrfs
Harder mitch.har...@sabayonlinux.org
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
fs/btrfs/inode.c | 20 +---
1 file changed, 9 insertions(+), 11 deletions(-)
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index b009fb5..9a1cc04 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs
hi,
On wed, 20 Feb 2013 23:35:36 -0600, Mitch Harder wrote:
I'm getting a series of kernel WARNING messages when testing Josef's
btrfs-next and Chris' next branch running xfstests 083 when mounted
with compress-force=lzo.
I'm not seeing any other indications of problems other than the
In start_transactio(), we will try to join the transaction again after
the current transaction is committed, so we should not release the
reserved space of the qgroup. Fix it.
Cc: Arne Jansen sensi...@gmx.net
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
fs/btrfs/transaction.c |3 ++-
1
. In this way, there is another benefit: there is no new
transaction handle to block the transaction which is on the way of commit,
once we set -in_commit.
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
fs/btrfs/transaction.c | 17 -
1 files changed, 16 insertions(+), 1
, even they are not
running, we can use this function.
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
fs/btrfs/ioctl.c |2 +-
fs/btrfs/super.c |4 ++--
fs/btrfs/transaction.c | 32
fs/btrfs/transaction.h |2 ++
4 files changed, 37
If we remount the fs to close the auto defragment or make the fs R/O,
we should stop the auto defragment.
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
Changelog v1 - v2:
- don't use -s_umount to avoid R/W-R/O remounting during the defragment.
Instead We add a new state that tell
(Sorry for the late reply, I was on my vacation of the Spring Festival last
week.)
On Tue, 12 Feb 2013 13:56:32 +0100, David Sterba wrote:
On Mon, Feb 11, 2013 at 03:35:37PM -0500, Josef Bacik wrote:
or something like that. Me and kdave reproduced by running 274 in a loop, it
happpened
On wed, 13 Feb 2013 11:13:22 -0500, Josef Bacik wrote:
Miao made the ordered operations stuff run async, which introduced a
deadlock where we could get somebody (sync) racing in and committing the
transaction while a commit was already happening. The new committer would
try and flush ordered
On Thu, 07 Feb 2013 09:43:47 +0100, Arne Jansen wrote:
On 02/07/13 07:02, Miao Xie wrote:
The argument inherit of btrfs_ioctl_snap_create_transid() was assigned
to NULL during we created the snapshots, so we didn't free it though we
called kfree() in the caller.
But since we are sure
, and it
is likely to break contiguous requests, and introduce performance regression
for the other filesystems.
So we have to choose the 2nd way.
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
Cc: Josef Bacik jba...@fusionio.com
---
fs/btrfs/extent-tree.c |3 +-
fs/btrfs/inode.c | 81
if someone has committed the transaction,
it is unnecessary to join it and commit it, wait is the best choice
for it. In this way, we can fix the above problem.
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
fs/btrfs/transaction.c |8
1 files changed, 8 insertions(+), 0 deletions
the race between write
DIO and truncation. By that time, we have to introduce
btrfs_inode_{block, resume}_nolock_dio()
again. That is we have to implement this patch again, so I choose the 2nd
way to fix the problem.
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
Changlog v1 - v2:
- Rebase
24726
nolock 24962 30866 32101
== result (iops) ==
write 1 2 4
lock623461846181
nolock 624077168025
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
Changelog v1 - v2:
- don't do nolocked DIO write if it is beyond the EOF
---
fs/btrfs/inode.c | 35
(6f72c7e20dbaea5) it was still
there, in transaction.c. It has been removed in 6fa9700e734:
commit 6fa9700e734275de2acbcb0e99414bd7ddfc60f1
Author: Miao Xie mi...@cn.fujitsu.com
Date: Thu Sep 6 04:00:32 2012 -0600
Btrfs: fix error path in create_pending_snapshot()
This patch fixes
-by: Miao Xie mi...@cn.fujitsu.com
---
fs/btrfs/disk-io.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index 0c31d07..d8fd711 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -2728,13 +2728,13 @@ fail_cleaner
, it is safe that we don't
assign the pointer inherit to NULL, and just free it in the caller of
btrfs_ioctl_snap_create_transid(). In this way, the code can become more
readable.
Reported-by: Alex Lyakas alex.bt...@zadarastorage.com
Cc: Arne Jansen sensi...@gmx.net
Signed-off-by: Miao Xie mi
Hi, Eric
I want to send out my fix patch, but Could I add your Signed-off-by?
because you found the key to solving the problem.
Thanks
Miao
On Fri, 01 Feb 2013 14:53:09 +0900, Tsutomu Itoh wrote:
Can you please explain similar problems, Miao?
Before missing device check, there are several
()
#alloc truncated blocks
#to other inode
-submit_io()
#INFORMATION LEAK
In order to avoid this problem, we must serialize unlocked dio reads with
truncate by inode_dio_wait().
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
fs
nolock 624077168025
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
fs/btrfs/inode.c | 24 +---
1 file changed, 13 insertions(+), 11 deletions(-)
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index d17a04b..091593a 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs
On Fri, 01 Feb 2013 09:31:33 +0900, Tsutomu Itoh wrote:
Hi,
On 2013/01/31 16:58, Miao Xie wrote:
On wed, 30 Jan 2013 23:55:34 -0600, Eric Sandeen wrote:
if you move the fail_block_groups: target above the comment, does that fix
it?
(although I don't know yet what started IO . . . )
like
On fri, 1 Feb 2013 10:53:30 +0800, Liu Bo wrote:
On Thu, Jan 31, 2013 at 05:39:03PM +0800, Miao Xie wrote:
This idea is from ext4. By this patch, we can make the dio write parallel,
and improve the performance.
Interesting, AFAIK, ext4 can only do nolock dio write on some
conditions
On Thu, 31 Jan 2013 11:40:41 -0500, Josef Bacik wrote:
On Thu, Jan 31, 2013 at 02:23:19AM -0700, Miao Xie wrote:
Currently, we can do unlocked dio reads, but the following race
is possible:
dio_read_tasktruncate_task
-btrfs_setattr
On fri, 01 Feb 2013 12:08:25 +0800, Miao Xie wrote:
Onfri, 1 Feb 2013 10:53:30 +0800, Liu Bo wrote:
On Thu, Jan 31, 2013 at 05:39:03PM +0800, Miao Xie wrote:
This idea is from ext4. By this patch, we can make the dio write parallel,
and improve the performance.
Interesting, AFAIK
Any comments about this patch?
Thanks
Miao
On mon, 26 Nov 2012 17:28:13 +0800, Miao Xie wrote:
If we remount the fs to close the auto defragment or make the fs R/O, we
should
stop the auto defragment.
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
fs/btrfs/ctree.h | 1 +
fs/btrfs
On thu, 31 Jan 2013 12:37:49 +0900, Tsutomu Itoh wrote:
Hi,
In kernel 3.8-rc5, the following panics occurred when the mount was done
by the degraded option.
# btrfs fi sh /dev/sdc8
Label: none uuid: fc63cd80-5ae2-4fbe-8795-2d526c937a56
Total devices 3 FS bytes used 20.98GB
On Thu, 31 Jan 2013 01:19:41 -0500 (est), Eric Sandeen wrote:
On Jan 31, 2013, at 12:13 AM, Miao Xie mi...@cn.fujitsu.com wrote:
On thu, 31 Jan 2013 12:37:49 +0900, Tsutomu Itoh wrote:
Hi,
In kernel 3.8-rc5, the following panics occurred when the mount was done
by the degraded option
On wed, 30 Jan 2013 23:55:34 -0600, Eric Sandeen wrote:
===
[ 7913.075890] btrfs: allowing degraded mounts
[ 7913.075893] btrfs: disk space caching is enabled
[ 7913.092031] Btrfs: too many missing devices,
On wed, 30 Jan 2013 23:55:34 -0600, Eric Sandeen wrote:
if you move the fail_block_groups: target above the comment, does that fix it?
(although I don't know yet what started IO . . . )
like this:
From: Eric Sandeen sand...@redhat.com
Make sure that we are always done with the
load high 32 bits
set high 32 bits
The task will get 0, it is a wrong number.
We fix this problem by the atomic operation.
Signed-off-by: Zhao Lei zhao...@cn.fujitsu.com
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
Changelog v1 - v2:
- modify the changelog and make it more clear
set high 32 bits
The task will get 0, it is a wrong number.
We fix this problem by the atomic operation.
Signed-off-by: Zhao Lei zhao...@cn.fujitsu.com
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
Changelog v1 - v2:
- modify the changelog and make it more clear and stringency
high 32 bits
set high 32 bits
The task will get 0, it is a wrong number.
We fix this problem by the atomic operation.
Signed-off-by: Zhao Lei zhao...@cn.fujitsu.com
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
Changelog v1 - v2:
- modify the changelog and make it more clear
Though -max_inline is a 64bit variant, and may be accessed by
multi-task, but it is just suggestive number, so we needn't add
anything to protect fs_info-max_inline, just add a comment to
explain wny we don't use a lock to protect it.
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
Changelog v1
of these two locks, and on
the write side, we must lock all of them.
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
Changelog v1 - v2:
- modify the changelog and make it more clear and stringency.
---
fs/btrfs/ctree.h | 10 ++
fs/btrfs/super.c | 4
2 files changed, 14 insertions
.
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
---
Changelog v1 - v2:
- modify the changelog and make it more clear and stringency.
---
fs/btrfs/ctree.h | 9
fs/btrfs/disk-io.c | 64
fs/btrfs/extent_io.c | 9 +++-
3 files
401 - 500 of 1023 matches
Mail list logo