Any Comment?
On Thu, 08 Sep 2011 16:18:09 +0800, Miao Xie wrote:
> This patch introduce free space cluster for each node in the b+tree. And
> we also simplify the fill method and the space allocation of the cluster:
> - Allocate free space cluster for each node
> - Allocate the free
On tue, 1 Nov 2011 12:04:40 -0400, Chris Mason wrote:
> On Tue, Nov 01, 2011 at 03:39:11PM +0800, Miao Xie wrote:
>> Any Comment?
>
> This is definitely interesting, in terms of trying to avoid btree
> fragmentation and improve the performance of the allocator.
>
> Bu
task, which called btrfs_orphan_cleanup(), to unlock the extent buffer,
but that task waited the commit task to end the transaction commit, and
the deadlock happened. Fix it.
Signed-ff-by: Miao Xie
---
fs/btrfs/inode.c |3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/fs
btrfs_block_rsv_add{, _noflush}() have similar code, so abstract that code.
Signed-off-by: Miao Xie
---
fs/btrfs/extent-tree.c | 28
1 files changed, 12 insertions(+), 16 deletions(-)
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index 1311beb
space for inode cache.
Note: If we can not reserve the enough space for inode cache, we will
give up writing out it.
Signed-off-by: Miao Xie
---
fs/btrfs/inode-map.c | 28
1 files changed, 24 insertions(+), 4 deletions(-)
diff --git a/fs/btrfs/inode-map.c b/fs/btrfs
We can not do flushable reservation for the relocation when we create snapshot,
because it may make the transaction commit task and the flush task wait for
each other and the deadlock happens.
Signed-off-by: Miao Xie
---
fs/btrfs/transaction.c |4 ++--
1 files changed, 2 insertions(+), 2
ed-off-by: Miao Xie
---
fs/btrfs/relocation.c |2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c
index 162af18..1db3771 100644
--- a/fs/btrfs/relocation.c
+++ b/fs/btrfs/relocation.c
@@ -1174,6 +1174,8 @@ static int clone_bac
btrfs_previous_item() just search the b+ tree, do not COW the nodes or leaves,
if we modify the result of it, the meta-data will be broken. fix it.
Signed-off-by: Miao Xie
---
fs/btrfs/volumes.c |5 -
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/fs/btrfs/volumes.c b/fs
orphan back-ref nodes.
NOTE: This patchset is based on the danger branch.
Miao Xie (6):
Btrfs: Abstract similar code for btrfs_block_rsv_add{, _noflush}()
Btrfs: fix no reserved space for writing out inode cache
Btrfs: fix unreleased path in btrfs_orphan_cleanup()
Btrfs: fix nocow when
pping the flush step when evicting inode.
Signed-off-by: Miao Xie
---
fs/btrfs/ctree.h |3 +++
fs/btrfs/extent-tree.c | 22 ++
fs/btrfs/inode.c |2 +-
3 files changed, 22 insertions(+), 5 deletions(-)
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
inde
On sun, 27 Nov 2011 13:45:22 +0100, source wrote:
> before sending this mail, i tried to track down previous messages from
> the archive and found no similar entry. so either something went wrong
> on my machine only or maybe there are too less testers around.
>
> about the real problem/bug :
>
>
fix wrong inaccurate available space on raid0 profile
When we use raid0 as the data profile, df command may show us a very
inaccurate value of the available space, which may be much less than the
real one. It may make the users puzzled. Fix it by changing the calculation
of the available space, and m
On mon, 28 Nov 2011 06:11:06 -0600, Jonathan Nieder wrote:
> Hi,
>
> Andy Whitcroft wrote:
>
>> When we mount a btrfs filesystem from read-only media there will be no
>> read/write devices; for example mounting an SD card with its lock enabled.
>> This triggers an immediate BUG during mount:
>>
>
7):
> Btrfs: fix meta data raid-repair merge problem
>
> Dan Carpenter (1) commits (+5/-0):
> btrfs scrub: handle -ENOMEM from init_ipath()
>
> Mike Fleetwood (1) commits (+1/-1):
> Btrfs: Don't error on resizing FS to same size
>
> Miao Xie (1) comm
On mon, 05 Dec 2011 14:49:16 +0100, Jan Schmidt wrote:
> While running xfstest 013 with Chris' for-linus on an ssd I hit this the
> following bug. Before, the system was freshly bootet and all I did was
> insmod and starting "./check" in the xfstests directory. I cannot
> reproduce it so far:
>
>
On Mon, 5 Dec 2011 08:14:13 -0500, Chris Mason wrote:
> On Mon, Dec 05, 2011 at 04:10:49PM +0800, Miao Xie wrote:
>> Hi, Chris and Oliva
>>
>> On thu, 1 Dec 2011 10:39:55 -0500, Chris Mason wrote:
>>> git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs.
writeback_in_progress() is very simple, and we will use writeback_in_progress()
in the module, so make it inline.
Signed-off-by: Miao Xie
---
fs/fs-writeback.c | 12
include/linux/backing-dev.h | 12 +++-
2 files changed, 11 insertions(+), 13 deletions
>s_umount, if _trylock_ fails, it means the fs
is on remounting or umounting. At this time, we will use the sync function of
btrfs to sync all the delalloc file. It may waste lots of time, but as a
corner case, we needn't care.
Reported-by: Tsutomu Itoh
Signed-off-by: Miao Xie
---
fs/btrf
cc Fengguang
cc Linux-kernel
On tue, 06 Dec 2011 13:35:45 +0800, Miao Xie wrote:
> writeback_in_progress() is very simple, and we will use
> writeback_in_progress()
> in the module, so make it inline.
>
> Signed-off-by: Miao Xie
> ---
> fs/fs-writeba
On tue, 6 Dec 2011 05:49:06 +, Al Viro wrote:
>
>> +void btrfs_writeback_inodes_sb_nr(struct btrfs_root *root,
>> + unsigned long nr_pages)
>> +{
>> +struct super_block *sb = root->fs_info->sb;
>> +
>> +if (writeback_in_progress(sb->s_bdi))
>> +
On tue, 6 Dec 2011 04:59:23 -0500, Christoph Hellwig wrote:
> On Tue, Dec 06, 2011 at 01:35:47PM +0800, Miao Xie wrote:
>> The reason the deadlock is that:
>> Task Btrfs-cleaner
>> umount()
>> down_write(&s->s_umount)
On tue, 6 Dec 2011 16:36:11 -0500, Chris Mason wrote:
> On Tue, Dec 06, 2011 at 06:23:23AM -0500, Christoph Hellwig wrote:
>> On Tue, Dec 06, 2011 at 07:06:40PM +0800, Miao Xie wrote:
>>>> I can't see why you need the writeout when the trylocks fails. Umount
>>>
On Wed, 7 Dec 2011 13:11:58 +0200, Ilya Dryomov wrote:
> On Wed, Dec 07, 2011 at 10:31:35AM +0800, Miao Xie wrote:
>> On tue, 6 Dec 2011 16:36:11 -0500, Chris Mason wrote:
>>> On Tue, Dec 06, 2011 at 06:23:23AM -0500, Christoph Hellwig wrote:
>>>> On Tue, Dec 06, 2011
beyond the end of the files.
When we want to expand those files, we will drop those file extents, and
put in dummy file extents, and then we should update the i-node. But btrfs
forgets to do it.
This patch adds the forgotten i-node update.
Signed-off-by: Miao Xie
---
fs/btrfs/inode.c |5
enough space in the file system, so we found a wrong i_size.
This patch fixes this bug by updating the i_size just when we pass the file
expanding and get enough space to update i-node.
Signed-off-by: Miao Xie
---
fs/btrfs/inode.c | 18 --
1 files changed, 12 insertions(+), 6
.
Signed-off-by: Miao Xie
---
common.rc | 54 ++
1 files changed, 54 insertions(+), 0 deletions(-)
diff --git a/common.rc b/common.rc
index cab0b64..b42e46d 100644
--- a/common.rc
+++ b/common.rc
@@ -1299,6 +1299,54 @@ _check_xfs_test_fs
.
Signed-off-by: Miao Xie
---
fs/btrfs/super.c | 19 +--
1 files changed, 13 insertions(+), 6 deletions(-)
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
index 8bd9d6d..01de53a 100644
--- a/fs/btrfs/super.c
+++ b/fs/btrfs/super.c
@@ -1079,7 +1079,7 @@ static int
On wed, 14 Dec 2011 10:07:39 +0800, WuBo wrote:
> On 12/14/2011 03:09 AM, Josef Bacik wrote:
>> On Tue, Dec 13, 2011 at 02:03:14PM -0500, Phillip Susi wrote:
>>> On 12/13/2011 12:55 PM, Josef Bacik wrote:
I've been hitting this BUG_ON() in btrfs_orphan_add when running xfstest
269 i
On wed, 14 Dec 2011 10:34:45 -0500, Josef Bacik wrote:
> On Wed, Dec 14, 2011 at 10:14:13AM -0500, Phillip Susi wrote:
>> On 12/14/2011 9:58 AM, Josef Bacik wrote:
>>> There is no "underlying bug", there is a shitty situation, the shitty
>>> situation
>>
>> Maybe my assumptions are wrong some
On Wed, 14 Dec 2011 11:51:47 -0500, Chris Mason wrote:
> On Wed, Dec 14, 2011 at 03:15:53PM +0800, Miao Xie wrote:
>> Btrfsck report error 100 after the 83th case of xfstests was run, it means
>> the i_size of the file is wrong.
>>
>> The reason of this bug is that:
&
enough space in the file system, so we found a wrong i_size.
This patch fixes this bug by updating the i_size just when we pass the file
expanding.
Signed-off-by: Miao Xie
---
Changes v1 -> v2:
- make i_size be accurate before truncate_pagecache() is called
(use truncate_setsize())
---
fs/bt
bytes of the dropped range from i_blocks/i_bytes of i-node or not.
When we truncate a compressed extent, btrfs substracts the bytes of the whole
extent, it's wrong. We should substract the real size that we truncate, no
matter it is a compressed extent or not. Fix it.
Signed-off-by: Miao Xie
--
As the title said, this patch just make the functions of the truncation
more readable.
Signed-off-by: Miao Xie
---
fs/btrfs/inode.c | 289 ++
1 files changed, 159 insertions(+), 130 deletions(-)
diff --git a/fs/btrfs/inode.c b/fs/btrfs
disadvantage of this patch. (Maybe I'm overcautious, we needn't
hold that data.)
Signed-off-by: Miao Xie
---
fs/btrfs/inode.c | 159 +-
1 files changed, 49 insertions(+), 110 deletions(-)
diff --git a/fs/btrfs/inode.c b/fs/b
On thu, 5 Jan 2012 10:11:43 -0500, Josef Bacik wrote:
>> +extent_start = btrfs_file_extent_disk_bytenr(leaf, fi);
>> +if (offset < new_size) {
>> +/*
>> + * If the new size is in the extent:
>> + * +--+
>> + * |
On thu, 5 Jan 2012 10:15:50 -0500, Josef Bacik wrote:
>> +trans = btrfs_start_transaction(root, 2);
>> +if (IS_ERR(trans))
>> +return PTR_ERR(trans);
>>
>> /*
>> * setattr is responsible for setting the ordered_data_close flag,
>> @@ -6621,26 +6585,12 @@ static int
On Fri, 6 Jan 2012 09:50:31 -0500, Josef Bacik wrote:
> On Fri, Jan 06, 2012 at 11:51:16AM +0800, Miao Xie wrote:
>> On thu, 5 Jan 2012 10:15:50 -0500, Josef Bacik wrote:
>>>> + trans = btrfs_start_transaction(root, 2);
>>>> + if (IS_ERR(trans))
>
On Sun, 8 Jan 2012 22:45:14 -0600, Mitch Harder wrote:
> 2012/1/5 Miao Xie :
>> Reproduce steps:
>> # mkfs.btrfs /dev/sdb5
>> # mount /dev/sdb5 -o compress=lzo /mnt
>> # dd if=/dev/zero of=/mnt/tmpfile bs=128K count=1
>> # sync
>> # truncate -s 64K /mnt/
ff-by: Miao Xie
---
Changes v1 -> v2:
- None.
---
fs/btrfs/inode.c |8 +---
1 files changed, 1 insertions(+), 7 deletions(-)
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 13b0542..85e2312 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -3009,7 +3009,
As the title said, this patch just make the functions of the truncation
more readable.
Signed-off-by: Miao Xie
---
Changes v1 -> v2:
- move return sentence out of if...else..., make the logic of the code more
clear.
---
fs/btrfs/inode.c |
within the range
, because the user may take it for granted
that the data in that extent is not lost. In order to implement it, we just
write out all the dirty pages which are beyond the expected size of the file.
Signed-off-by: Miao Xie
---
Changes v1 -> v2:
- None.
---
fs/b
fix it by changing
the value of CHUNK_ALLOC_LIMITED and CHUNK_ALLOC_FORCE, and make
CHUNK_ALLOC_FORCE greater than CHUNK_ALLOC_LIMITED since CHUNK_ALLOC_FORCE has
higher priority. And if the value which is passed in by the caller is greater
than ->force_alloc, use the passed value.
Signed-off-by
rule:
RAID10 -> RAID1 -> DUP
RAID0 -> SINGLE
Signed-off-by: Miao Xie
---
fs/btrfs/extent-tree.c | 43 +--
1 files changed, 41 insertions(+), 2 deletions(-)
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index 3e68e2b..87cd611 100644
t be used to
allocate a DUP chunk, the other space will be considered as the available
space, and be count.
Signed-off-by: Miao Xie
---
fs/btrfs/super.c | 105 +++--
1 files changed, 22 insertions(+), 83 deletions(-)
diff --git a/fs/btrfs/super.c b
On wed, 18 Jan 2012 11:12:20 +0100, Jan Schmidt wrote:
> On 17.01.2012 21:58, Chris Mason wrote:
>> These two didn't make my first pull request just because I wanted to get
>> something out the door. I'll definitely have them in the next pull.
>
> Please, don't do that! You can't just degene
1
so deadlock happens.
Fix this bug by unlocking the page which is in writeback, and re-locking it
after the writeback end.
Signed-off-by: Miao Xie
---
fs/btrfs/ioctl.c | 53 +
1 files changed, 29 insertions(+), 24 deletions(-)
diff --git a/f
ch. I
will cleanup it in the next version.
Signed-off-by: Miao Xie
---
fs/btrfs/btrfs_inode.h |3 +
fs/btrfs/ctree.c | 358 ++--
fs/btrfs/ctree.h | 41 +-
fs/btrfs/dir-item.c| 28 +++--
fs/btrfs/extent_io.c |2 +-
fs/btrfs/f
Hi, Jan Schmidt
On tue, 21 Feb 2012 08:56:29 +0100, Jan Schmidt wrote:
> the current for-linus head as of today (d98456fc) gets stuck
> in a deadlock when executing xfstest 083. This is the
> corresponding output, preceeded by a related lockdep warning:
>
> Feb 21 08:30:52 oglaroon kernel: [56906
an unexisted directory, it is
very strange.
So I think we should insert directory item and directory name index and update
the parent inode as the last step of snapshot creation.
Signed-off-by: Miao Xie
---
fs/btrfs/inode.c |8 +++-
fs/btrfs/transaction.c | 30
The right option is 'o' not 'c'. And this tool is used for the block devices
on which there is a btrfs file system, so change "mount_point" to "device".
Signed-off-by: Miao Xie
---
btrfs-map-logical.c |4 ++--
1 files changed, 2 insertions(+)
The old usage is a copy of btrfs-map-logical, it's wrong, fix it.
Signed-off-by: Miao Xie
---
This patch is against dangerdonteveruse branch.
---
btrfs-corrupt-block.c | 14 --
1 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/btrfs-corrupt-block.c b/btrfs-co
If the fs/file tree is not the parent of the snapshot, it is reasonable
that we can not find the relative reference and back reference. But btrfsck
doesn't consider this case, and reports "unresolved refs" message, it's wrong,
fix it.
Signed-off-by: Miao Xie
-
Some file systems can do some works in the background by kthreads, we'd
better stop those works before we umount the file system, or it is easy to
introduce some problems. So we add an interface that is used to do some
preparation for umount.
Signed-off-by: Miao Xie
---
fs/namesp
em is to close the btrfs-cleaner before
the umount is ready to continue. Since we have introduced umount_prepare
interface into vfs before, we can fix this problem by it.
Reported-by: Tsutomu Itoh
Signed-off-by: Miao Xie
---
fs/btrfs/disk-io.c | 15 ---
fs/btrfs/su
On Thu, 22 Mar 2012 15:39:36 +1100, Dave Chinner wrote:
> On Thu, Mar 22, 2012 at 11:13:17AM +0800, Miao Xie wrote:
>> The reason the deadlock is that:
>> Task Btrfs-cleaner
>> umount()
>> down_write(&s->s_umount)
>
On Thu, 22 Mar 2012 03:41:09 +, Al Viro wrote:
> On Thu, Mar 22, 2012 at 11:13:15AM +0800, Miao Xie wrote:
>> Some file systems can do some works in the background by kthreads, we'd
>> better stop those works before we umount the file system, or it is easy to
>> intr
from Christoph Hellwig.
Some code is from the patch of Kamal Mostafa.
Signed-off-by: Miao Xie
---
fs/fs-writeback.c | 39 +++
include/linux/writeback.h |3 +++
2 files changed, 42 insertions(+), 0 deletions(-)
diff --git a/fs/fs-writeback.c b/fs
it
becomes readonly, so the sync operation will do nothing if the filesystem is
already readonly. Though it may waste lots of time, as a corner case, we
needn't care.
Reported-by: Tsutomu Itoh
Signed-off-by: Miao Xie
---
fs/btrfs/disk-io.c |3 +++
fs/btrfs/extent-tree.c | 25 ++
于 2012年04月26日 23:12, Josef Bacik 写道:
> On Thu, Apr 26, 2012 at 03:55:52PM +0800, Xie Miao wrote:
>> On Thu, Apr 26, 2012 at 11:11 AM, Dave Chinner wrote:
writeback_inodes_sb(_nr) grabs s_umount lock when it want to start
writeback,
it may bring us deadlock problem when doing umount
>> The reason the deadlock is that:
>> Task Btrfs-cleaner
>> umount()
>> down_write(&s->s_umount)
>> sync_filesystem()
>> do auto-defragment and produce
>> lots of dirty page
goes from r/w to r/o.
because the filesystem should guarantee all the dirty pages have been written
into the disk after it becomes readonly, so the sync operation will do nothing
if the filesystem is already readonly. Though it may waste lots of time,
as a corner case, we needn't care.
Signed-of
ck_inodes_sb(_nr).
This idea came from Christoph Hellwig.
Some code is from the patch of Kamal Mostafa.
Signed-off-by: Miao Xie
---
fs/btrfs/extent-tree.c|4 ++--
fs/ext4/inode.c |2 +-
fs/fs-writeback.c | 45
On Mon, 30 Apr 2012 18:41:39 +0200, David Sterba wrote:
> On Fri, Apr 27, 2012 at 06:55:13PM +0800, Miao Xie wrote:
>> But I found you add a trylock for ->s_umount in cleaner_kthread(), this
>> method
>> can fix the deadlock problem, I think. It may be introduced by the o
On Tue, 8 May 2012 17:33:26 +0200, David Sterba wrote:
> On Tue, May 08, 2012 at 06:38:01PM +0800, Miao Xie wrote:
>> I think this method can not fix the problem safely because if the other
>> background threads(not the cleaner) call shrink_delalloc(), the problem
>> can sti
when they are reacquired.
Fix this problem by unlocking those mutexes at the suitable place.
Reported-by: Daniel J Blueman
Signed-off-by: Miao Xie
---
fs/btrfs/delayed-ref.c |8
fs/btrfs/delayed-ref.h |7 +++
fs/btrfs/extent-tree.c | 24 ++--
3 file
riters) == 1);
And if we block the TRANS_JOIN at the place you point out, the deadlock
will happen because we need deal with the ordered operations which will
use TRANS_JOIN here.
(I am dealing with the problem you said above by adding a new type of
TRANS_* now)
Thanks
Miao
> Thanks,
> Ale
e
function - btrfs_csum_file_blocks() didn't differentiate between these
two types of the cases, fix it.
Signed-off-by: Miao Xie
---
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/fi
-> 217us).
# dd if=/file of=/dev/null bs=1M count=1024
Signed-off-by: Miao Xie
---
fs/btrfs/extent_io.c| 31 +++
fs/btrfs/extent_io.h| 2 ++
fs/btrfs/file-item.c| 45 ++---
fs/btrfs/ordered-data.c |
ile loop to get 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
---
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
--
ile loop to get 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
---
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
-> 217us).
# dd if=/file of=/dev/null bs=1M count=1024
Signed-off-by: Miao Xie
---
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
it improved 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
Reviewed-by: Liu Bo
---
Changelog v1 -> v2:
- modify the changelog and the title which can not explain this patch cl
-> 217us).
# dd if=/file of=/dev/null bs=1M count=1024
Signed-off-by: Miao Xie
---
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/extent_io.
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
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
state, we block
TRANS_JOIN, but
don't block TRANS_JOIN_ENDIO.
Thanks
Miao
>
> Thanks,
> Alex.
>
>
>
> On Mon, Mar 25, 2013 at 11:11 AM, Alex Lyakas
> wrote:
>> Hi Miao,
>>
>> On Mon, Mar 25, 2013 at 3:51 AM, Miao Xie wrote:
>>
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
---
fs/btrfs/super.c | 10 +++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/fs/btrfs
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
---
fs/btrfs/ctree.h | 22 --
fs/btrfs/disk-io.c | 5 +
fs/btrfs/volumes.c | 10 +-
3 files changed, 26 insertions(+), 11 deletions(-)
diff
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
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
Cc: Mark F
this function.
Signed-off-by: Miao Xie
Cc: Mark Fasheh
---
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 deletions(-)
diff --git a/fs/
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
Cc: Mark Fasheh
---
m
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 INCOMP
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
>> tha
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_ext
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
>> o
unk() just requires that the free space is 1 time
the size of the global reservation, that is we would not try to
allocate a new chunk if the free space size is in the middle of
these two requires, and just return the enospc error. Fix it.
Cc: Jim Schutt
Cc: Josef Bacik
Signed-off-by: Miao Xi
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
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
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
>>> unnecessar
it improved 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
---
Changelog v2 -> v3:
- address the problem that the csums was inserted into the wrong range, this bug
was reported
problem. So we need
not abort the current transaction.
Reported-by: Tsutomu Itoh
Signed-off-by: Miao Xie
---
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..9818d4a 100644
--- a/fs/btrfs/inode
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
Signed-off-by: Miao Xie
---
fs/btrfs/extent-tree.c | 6
ourselves.
Cc: Tsutomu Itoh
Signed-off-by: Miao Xie
---
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/relocation.c | 5 +
5 files
the global reserve and fill it.
Cc: Tsutomu Itoh
Signed-off-by: Miao Xie
---
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
--- a/fs/btrfs/extent-tree.c
+++ b/fs/btrfs
cc: Tsutomu Itoh
Signed-off-by: Miao Xie
---
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..e34e268 100644
--- a/fs/btrfs/extent-tree.c
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 @@
to remove ->s_umount in cleaner_kthread().
Cc: David Sterba
Signed-off-by: Miao Xie
---
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..cb2bfd1 100644
--- a/fs
1 - 100 of 1137 matches
Mail list logo