[RFC][PATCH V2] Btrfs-progs, btrfsck: add block group check function

2012-08-07 Thread Chen Yang
From: Chen Yang chenyang.f...@cn.fujitsu.com This patch adds the function to check correspondence between block group, chunk and device extent. Signed-off-by: Cheng Yang chenyang.f...@cn.fujitsu.com --- v1-v2: optimaze the checking process: * Remove the checking traversal of block group

[PATCH] Btrfs-progs: introduce '-p' option and fullpath into subvolume set-default command

2012-09-24 Thread Chen Yang
In command btrfs subvolume set-default, we used subvolume id and path to set the default subvolume of a filesystem. It's not easy for a common user, so I improved it and the fullpath of a subvolume can be used to set the default subvolume of a filesystem. Signed-off-by: Cheng Yang

Re: [PATCH] Btrfs-progs: introduce '-p' option and fullpath into subvolume set-default command

2012-10-10 Thread Chen Yang
On 2012-10-9 22:44, David Sterba wrote: On Mon, Sep 24, 2012 at 02:42:13PM +0800, Chen Yang wrote: In command btrfs subvolume set-default, we used subvolume id and path to set the default subvolume of a filesystem. It's not easy for a common user, What is not easy? How often do you set

[PATCH 1/2] Btrfs-progs: Improve the command help system of btrfs

2012-10-25 Thread Chen Yang
Btrfs's command help system allow you to show only one line short usage. But in some case we need to use two or more lines to show the short usage of a complicated command. This patch add a filed 'lines' in cmd_struct, which is the number of the extra short usage lines you want to append. For

[PATCH 2/2] Btrfs-progs: Introduce another form of btrfs subvolume set-default command

2012-10-25 Thread Chen Yang
This patch introduces another form of btrfs subvolume set-default command. In command btrfs subvolume set-default, we used subvolume id and path to set the default subvolume of a filesystem. By the new form, we can use subvolume path to set the default subvolume. The new form: subvolume

[PATCH] Btrfs-progs: Fix a segmentation fault in btrfstune when device is invalid.

2012-11-19 Thread Chen Yang
When open_ctree(device, ...) failed, the return value should be checked. Signed-off-by: Cheng Yang chenyang.f...@cn.fujitsu.com --- btrfstune.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/btrfstune.c b/btrfstune.c index 47830c5..07648d5 100644 --- a/btrfstune.c +++

[PATCH] Btrfs: send - sparse file support for btrfs-send mechanism

2012-11-28 Thread Chen Yang
when send/receive a sparse file, the holes of the original file will be filled with zero. The holes will be sent as ZERO streams, and it's unnecessary. So, I improved this by skipping the hole of file while sending. Signed-off-by: Cheng Yang chenyang.f...@cn.fujitsu.com --- fs/btrfs/send.c |

[PATCH] Btrfs: send - pre-allocated file support for btrfs-send mechanism

2012-11-28 Thread Chen Yang
From 4222aa3a32cf4db161fcbbb87ad29b714f1bfaf2 Mon Sep 17 00:00:00 2001 From: Chen Yang chenyang.f...@cn.fujitsu.com Date: Thu, 29 Nov 2012 13:22:09 +0800 Subject: [PATCH] Btrfs: send - pre-allocated file support for btrfs-send mechanism when send or receive a file which has pre-allocated part

[PATCH] Btrfs-progs/receive: sparse and pre-allocated file support, for btrfs-send mechanism

2013-01-23 Thread Chen Yang
From: Chen Yang chenyang.f...@cn.fujitsu.com Date: Fri, 18 Jan 2013 14:54:31 +0800 Subject: [PATCH] Btrfs-progs/receive: sparse and pre-allocated file support for btrfs-send mechanism When sending a file with sparse or pre-allocated part, these parts will be sent as ZERO streams, and it's

[PATCH] Btrfs/send: sparse and pre-allocated file support for, btrfs-send mechanism

2013-01-23 Thread Chen Yang
From: Chen Yang chenyang.f...@cn.fujitsu.com Date: Wed, 23 Jan 2013 11:21:51 +0800 Subject: [PATCH] Btrfs/send: sparse and pre-allocated file support for btrfs-send mechanism When sending a file with sparse or pre-allocated part, these parts will be sent as ZERO streams, and it's unnecessary

[PATCH] Btrfs-progs: Complete the help information of btrfs send/receive

2013-01-23 Thread Chen Yang
From: Chen Yang chenyang.f...@cn.fujitsu.com Date: Fri, 18 Jan 2013 14:52:12 +0800 Subject: [PATCH] Btrfs-progs: Complete the help information of btrfs send/receive When typing command btrfs send --help or btrfs receive --help, the help information of the commands is incomplete, which only

[PATCH] Btrfs-prog/send: fix wrong best-parent assignment in, find_good_parent()

2013-01-24 Thread Chen Yang
We use find_good_parent() to look for a suit snapshot in the clone source snapshots as the parent, not the source subvolume of the snapshot which is about to be sent. fix it Signed-off-by: Cheng Yang chenyang.f...@cn.fujitsu.com --- cmds-send.c |2 +- 1 files changed, 1 insertions(+), 1

[PATCH] Btrfs-prog/send: fix wrong dump_fd check in cmd_send_start()

2013-01-31 Thread Chen Yang
In cmd_send_start(), there is a check to make sure dump_fd is not a tty before parsing command options. So if we use the option -f file, it doesn't work for the dump_fd has not been created. So fix it. Signed-off-by: Cheng Yang chenyang.f...@cn.fujitsu.com --- cmds-send.c | 12 +++- 1

Re: [PATCH] Btrfs-prog/send: fix wrong dump_fd check in cmd_send_start()

2013-01-31 Thread Chen Yang
On Thu, Jan 31, 2013 at 04:21:24PM +0800, Chen Yang wrote: In cmd_send_start(), there is a check to make sure dump_fd is not a tty before parsing command options. So if we use the option -f file, it doesn't work for the dump_fd has not been created. So fix it. Good catch, thanks. I see

Re: Is it possible to use send receive features to clone the btrfs partition efficiently (including all snapshots inside)?

2013-02-03 Thread Chen Yang
It is very difficult for me to find any good documentation on send receive commands. Event the most recent btrfs progs man page (accessed from git today) says nothing. I want to migrate data (including numerous read only snaphots) from linux-raid - based storage into a native raid