[RFC][PATCH] Btrfs: about chunk tree backups

2011-04-07 Thread WuBo
hi,all I've been diging into the idea of chunk tree backups. Here is the predesign, before finishing chunk alloc, the first block in this chunk will be written in some information, these information will be useful for chunk tree rebuilding if crash, also the first block will be moved into

Re: [RFC][PATCH] Btrfs: about chunk tree backups

2011-04-12 Thread WuBo
If no one has comments on this, I'll work on finishing it. Thanks Wubo On 04/07/2011 03:57 PM, WuBo wrote: hi,all I've been diging into the idea of chunk tree backups. Here is the predesign, before finishing chunk alloc, the first block in this chunk will be written in some information

[RFC][PATCH] Btrfs: Make kernel support chunk tree backup

2011-06-22 Thread WuBo
I've been diging into the idea of chunk tree backups. Here is the design, before finishing chunk alloc, the first block in this chunk will be written in some information, these information will be useful for chunk tree rebuilding if crash, also the first block will be moved into

[RFC][PATCH] Btrfs-progs: Add chunk tree recover tool

2011-06-22 Thread WuBo
This patch has two parts: 1. In user progs, there need some chunk allocation operations for example mkfs.btrfs which also need to make the first 4096 as stripe header. The way of handle is the same as kernel. 2. the chunk tree recover tool if crash. this tool will first search all the devices

[PATCH] Btrfs-progs: Add chunk tree recover tool

2011-07-04 Thread WuBo
This patch has two parts: 1. In user progs, there need some chunk allocation operations for example mkfs.btrfs which also need to make the first 4096 as stripe header. The way of handle is the same as kernel. 2. the chunk tree recover tool if crash. this tool will first search all the devices

Re: [PATCH] Btrfs: Make kernel support chunk tree backup

2011-07-20 Thread WuBo
ping? On 07/04/2011 04:07 PM, WuBo wrote: I've been diging into the idea of chunk tree backups. Here is the design, before finishing chunk alloc, the first block in this chunk will be written in some information, these information will be useful for chunk tree rebuilding if crash, also

[PATCH] Btrfs: Protect the readonly flag of block group

2011-07-25 Thread WuBo
The access for ro in btrfs_block_group_cache should be protected because of the racy lock in relocation. Signed-off-by: Wu Bo wu...@cn.fujitsu.com --- fs/btrfs/extent-tree.c | 11 +++ 1 files changed, 7 insertions(+), 4 deletions(-) diff --git a/fs/btrfs/extent-tree.c

[RFC][PATCH] Btrfs: Fix the write error into tiny space

2011-09-22 Thread WuBo
reproduce: dd if=/dev/zero of=tmpfile bs=4K count=1 dd if=/dev/zero of=tmpfile1 bs=1M dd if=/dev/zero of=tmpfile2 bs=4K rm -f tmpfile sync dd if=/dev/zero of=tmpfile bs=8K count=1 We try to create a 8K file when there is only 4K space left, btrfs will write no data into a file, but under EXT4 it

[PATCH 0/3] xfstests: Add a group of reservation space test

2011-11-02 Thread WuBo
This patch set add a group of reservation space test. Especailly for btrfs. It includes three parts: copy workload, prealloc and write posix. For test 264, I hope it's usefull for Josef's reserve improve work. For test 265 and 266, the current btrfs is not pass yet. TO avoid fill the huge disk,

[PATCH 1/3] xfstests 264: add a copy and reserve test

2011-11-02 Thread WuBo
This test is a stress test. It creates a set of threads for coping small files into disk. I use a 2G disk for test, the ENOSPC arises usually but the disk is not full under kenerl 3.0 with intel64. Signed-off-by: Wu Bo wu...@cn.fujitsu.com --- 264 | 158

[PATCH 2/3] xfstests 265: add a prealloc and reserve test

2011-11-02 Thread WuBo
This test is for preallocation test. If the disk is full, just with a prealloc file has some free space that prealloc early. We need to check whether the write to the free space is success or not. Signed-off-by: Wu Bo wu...@cn.fujitsu.com --- 265 | 107

[PATCH 3/3] xfstests 266: add a write and reserve test

2011-11-02 Thread WuBo
This test is for write-posix test. If writing a file when the disk is almost full, the posix wants the call to write as much as possible but not none. quote the POSIX: If a write() requests that more bytes be written than there is room for (for example, [XSI] [Option Start] the process' file size

Re: [PATCH 1/3] xfstests 264: add a copy and reserve test

2011-11-03 Thread WuBo
On 11/03/2011 02:55 PM, Christoph Hellwig wrote: On Thu, Nov 03, 2011 at 11:08:55AM +0800, WuBo wrote: This test is a stress test. It creates a set of threads for coping small files into disk. I use a 2G disk for test, the ENOSPC arises usually but the disk is not full under kenerl 3.0

[PATCH v2 0/3] xfstests: Add a group of reservation space test

2011-11-07 Thread WuBo
Changes v1-v2: - Make test-set support generic This patch set add a group of reservation space test. Especailly for btrfs. It includes three parts: copy workload, prealloc and write posix. For test 273, I hope it's usefull for Josef's reserve improve work. For test 274 and 275, the current btrfs

[PATCH v2 1/3] xfstests 273: add a copy and reserve test

2011-11-07 Thread WuBo
This test is a stress test. It creates a set of threads for coping small files into disk. I use a 2G disk for test, the ENOSPC arises usually but the disk is not full under kenerl 3.0 with intel64. Signed-off-by: Wu Bo wu...@cn.fujitsu.com --- 273 | 145

[PATCH v2 2/3] xfstests 274: add a prealloc and reserve test

2011-11-07 Thread WuBo
This test is for preallocation test. If the disk is full, just with a prealloc file has some free space that prealloc early. We need to check whether the write to the free space is success or not. Signed-off-by: Wu Bo wu...@cn.fujitsu.com --- 274 | 91

[PATCH v2 3/3] xfstests 275: add a write and reserve test

2011-11-07 Thread WuBo
This test is for write-posix test. If writing a file when the disk is almost full, the posix wants the call to write as much as possible but not none. quote the POSIX: If a write() requests that more bytes be written than there is room for (for example, [XSI] [Option Start] the process' file size

Re: [PATCH 2/3] xfstests 265: add a prealloc and reserve test

2011-11-15 Thread WuBo
On 11/16/2011 03:08 AM, Christoph Hellwig wrote: On Tue, Nov 15, 2011 at 12:21:13PM -0600, Ben Myers wrote: Hi Wu Bo, On Thu, Nov 03, 2011 at 11:09:00AM +0800, WuBo wrote: This test is for preallocation test. If the disk is full, just with a prealloc file has some free space that prealloc

Re: [PATCH] Btrfs: don't panic if orphan item already exists

2011-12-13 Thread WuBo
is successed, I will delete the orphan inode anyway. what do you think of this idea? I'll make a patch if you do not have any comment. BTW, 083 will always make the btrfs_truncate fail with btrfs_truncate_inode_items for ENOSPC when the disk is almost full. thanks wubo -- To unsubscribe from

Re: [PATCH] Btrfs: don't panic if orphan item already exists

2011-12-14 Thread WuBo
On 12/14/2011 10:58 PM, Josef Bacik wrote: On Wed, Dec 14, 2011 at 05:46:37PM +0800, Miao Xie wrote: 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