[PATCH V2 2/2] Btrfs: make __merge_refs() return type be void

2013-04-11 Thread Wang Shilong
__merge_refs() always return 0, it is unnecessary for the caller to check the return value. Signed-off-by: Wang Shilong --- Changelog v1->v2: - don't make __add_missing_keys() return type to be void so that makes people aware of unhandled BUG_ON() from read_tree block(). - rename title to be

Re: [PATCH 2/2] Btrfs: make some functions return type be void in backref.c

2013-04-11 Thread Wang Shilong
Hello, David Patch V2 has been sent out,many thanks for your review ^_^ Thanks, Wang > On Wed, Apr 10, 2013 at 07:22:51PM +0800, Wang Shilong wrote: >> From: Wang Shilong >> >> __merge_refs() and __add_missing_keys() always return 0, it is unnecessary >> for the caller to check the return value

Re: [obsoleted] [PATCH 1/5 v5] btrfs-progs: make btrfs dev scan multi path aware

2013-04-11 Thread Anand Jain
This patch is replaced By: btrfs-progs: avoid ioctl for multipath-dev with its non-multipath path which is also sent to this mailing list. thanks, Anand On 03/27/2013 06:07 PM, Anand Jain wrote: We should avoid using non multi-path (mp) path for mp disks As of now there is no good way

[PATCH] btrfs-progs: avoid ioctl for multipath-dev with its non-multipath path

2013-04-11 Thread Anand Jain
We should avoid using non multi-path (mp) path for mp disks As of now there is no good way (like api) to check that. A workaround way is to check if the O_EXCL open is unsuccessful. This is safe since otherwise the BTRFS_IOC_SCAN_DEV ioctl would fail if the disk-path can not be opened with the flag

[PATCH 1/2] Btrfs: fix unblocked autodefraggers when remount

2013-04-11 Thread Miao Xie
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/su

[PATCH 2/2] Btrfs: use a lock to protect incompat/compat flag of the super block

2013-04-11 Thread Miao Xie
The following case will make the incompat/compat flag of the super block be recovered. Task1 |Task2 flags = btrfs_super_incompat_flags(); | |flags = btrfs_super_incompat_flags(); flags |= new_flag1;|

[PATCH 0/2] do not open the extend inode reference at the beginning

2013-04-11 Thread Miao Xie
In most cases, we do not insert so many inode references, so it is better that we don't set incompat flag -- EXTEND_IREF -- when we make a fs. Otherwise we can not mount the fs on the old kernel though there is no extend iref in fact. And some users may not hope to inserting the extend inode refer

[PATCH 1/2] Btrfs: set the INCOMPAT_EXTENDED_IREF when the extended iref is inserted

2013-04-11 Thread Miao Xie
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 Fasheh -

[PATCH 2/2] Btrfs: introduce noextiref mount option

2013-04-11 Thread Miao Xie
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 on the old kernel, and don't hope we insert any extend inode references. So we introduce noextiref mount option to close this f

[PATCH] Btrfs-progs: don't set INCOMPAT_EXTENDED_IREF flag when making a new fs

2013-04-11 Thread Miao Xie
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 --- mkfs.c

Re: lvm volume like support

2013-04-11 Thread David Sterba
On Mon, Apr 08, 2013 at 02:01:09PM +0200, David Sterba wrote: > problem 1: size of 'file' was 77 GB > problem 2: umount was fine, remounted again and now size of 'file' is 0 Works fine with a recent kernel (3.9). -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body

Re: [PATCH] Btrfs: add a rb_tree to improve performance of ulist search

2013-04-11 Thread Jan Schmidt
On Thu, April 11, 2013 at 07:25 (+0200), Wang Shilong wrote: > Walking backref tree and btrfs quota rely on ulist very much. > This patch tries to use rb_tree to speed up search time. > > The original code always checks whether an element > exists before adding a new element, however it costs O(n)

Re: [PATCH] Btrfs: add a rb_tree to improve performance of ulist search

2013-04-11 Thread Wang Shilong
Hello, Jan [snip] >> >> +#include >> +#include > > I didn't expect the space after "#include" being optional. If it compiles, I'm > fine with it. With a space, it would look more familiar, though. I am happy to send V2 to correct this coding style problem. Thanks very much for reviewing it so

Re: [PATCH] Btrfs-progs: don't set INCOMPAT_EXTENDED_IREF flag when making a new fs

2013-04-11 Thread Jan Schmidt
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 fs, and just set > it when we actually insert a exten

Re: [PATCH 2/2] Btrfs: introduce noextiref mount option

2013-04-11 Thread Jan Schmidt
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 on the old kernel, and don't hope we > insert any extend inode r

[PATCH] Btrfs-progs: enhance 'btrfs subvolume list'

2013-04-11 Thread Stefan Behrens
"btrfs subvolume list" gets a new option "--fields=..." which allows to specify which pieces of information about subvolumes shall be printed. This is necessary because this commit also adds all the so far missing items from the root_item like the received UUID, all generation values and all time v

[PATCH 1/2] btrfs-progs: replace blkid_probe_get_wholedisk_devno

2013-04-11 Thread Eric Sandeen
blkid_probe_get_wholedisk_devno() isn't available in some older versions of libblkid. It was used to work around an old bug in blkid_devno_to_wholedisk(), but that has been fixed since 5cd0823 libblkid: fix blkid_devno_to_wholedisk(), present in util-linux 2.17 and beyond. If we happen to be miss

[PATCH 2/2] btrfs-progs: use clearer var names in is_ssd()

2013-04-11 Thread Eric Sandeen
is_ssd() uses nondescript variable names; path - to what? disk - it's a dev_t not a disk name, unlike dev, which is a name not a dev_t! Rename some vars to make things hopefully clearer: wholedisk - the name of the node for the entire disk devno - the dev_t of the device we're mkfs'ing sysfs_p

[PATCH v2 1/4] Btrfs-progs: cleanup in btrfs-list.c

2013-04-11 Thread Stefan Behrens
Since someone modified the code to initialize all need_print with zero, these lines can be removed entirely. Signed-off-by: Stefan Behrens --- btrfs-list.c | 12 +--- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/btrfs-list.c b/btrfs-list.c index 1246a25..a5d6e9b 100644 -

[PATCH v2 3/4] Btrfs-progs: add more subvol fields to btrfs-list

2013-04-11 Thread Stefan Behrens
The parent UUID, all generation values and all timestamps that are available in the root_item are added. Signed-off-by: Stefan Behrens --- btrfs-list.c | 273 +++ btrfs-list.h | 39 - 2 files changed, 197 insertions(+), 115 deletio

[PATCH v2 0/4] Btrfs-progs: add --fields option to subvol list

2013-04-11 Thread Stefan Behrens
"btrfs subvolume list" gets a new option "--fields=..." which allows to specify which pieces of information about subvolumes shall be printed. This is necessary because this commit also adds all the so far missing items from the root_item like the received UUID, all generation values and all time v

[PATCH v2 2/4] Btrfs-progs: make the btrfs-list output more compact

2013-04-11 Thread Stefan Behrens
The following commit will add many additional columns to the output. Therefore the current commit adds a width for each column. It replaces to uncondionally add a after each column which makes the output much wider than necessary. Signed-off-by: Stefan Behrens --- btrfs-list.c | 79

[PATCH v2 4/4] Btrfs-progs: enhance 'btrfs subvolume list'

2013-04-11 Thread Stefan Behrens
"btrfs subvolume list" gets a new option "--fields=..." which allows to specify which pieces of information about subvolumes shall be printed. This is necessary because this commit also adds all the so far missing items from the root_item like the received UUID, all generation values and all time v

Re: btrfs prof compile error on debian squeeze.

2013-04-11 Thread Olivier BATARD
I agree with you. Debian package are out of date. I've chosen to change distribution, I switched to ArchLinux and everything is fine. And finally I don't like the way debian works anymore. Thanks for your help. Le 11 avr. 2013 à 03:41, Eric Sandeen a écrit : > On 4/10/13 7:28 PM, Mitch Hard

Re: btrfs prof compile error on debian squeeze.

2013-04-11 Thread Eric Sandeen
On 4/11/13 11:26 AM, Olivier BATARD wrote: > > I agree with you. Debian package are out of date. I've chosen to > change distribution, I switched to ArchLinux and everything is fine. > And finally I don't like the way debian works anymore. > > Thanks for your help. FWIW, I did just send patches

Restriper documentation

2013-04-11 Thread Phillip Susi
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 It looks like the restriper patches got merged last year, but never documented in the man page. Could you do that? -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.17 (MingW32) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBA

kernel BUG at fs/btrfs/extent-tree.c:5406!

2013-04-11 Thread Zbigniew Jędrzejewski-Szmek
Hi, I managed to break my btrfs root partition in the following way: [ 68.149871] [ cut here ] [ 68.149904] kernel BUG at fs/btrfs/extent-tree.c:5406! [ 68.149918] invalid opcode: [#1] SMP [ 68.150490] Modules linked in: btrfs zlib_deflate raid6_pq libcrc32c x

Re: [PATCH v2 4/4] Btrfs-progs: enhance 'btrfs subvolume list'

2013-04-11 Thread Wang Shilong
Hi Stefan, > "btrfs subvolume list" gets a new option "--fields=..." which allows > to specify which pieces of information about subvolumes shall be > printed. This is necessary because this commit also adds all the so > far missing items from the root_item like the received UUID, all > generation

Re: [PATCH] Btrfs-progs: don't set INCOMPAT_EXTENDED_IREF flag when making a new fs

2013-04-11 Thread Miao Xie
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

Re: [PATCH v2 3/4] Btrfs-progs: add more subvol fields to btrfs-list

2013-04-11 Thread Wang Shilong
Hello, ... [snip] > -static int update_root(struct root_lookup *root_lookup, > -u64 root_id, u64 ref_tree, u64 root_offset, u64 flags, > -u64 dir_id, char *name, int name_len, u64 ogen, u64 gen, > -time_t ot, void *uuid, void *puuid) > +

Re: [PATCH v2 3/4] Btrfs-progs: add more subvol fields to btrfs-list

2013-04-11 Thread Wang Shilong
Hello, > The parent UUID, all generation values and all timestamps that > are available in the root_item are added. > > Signed-off-by: Stefan Behrens > --- > btrfs-list.c | 273 > +++ > btrfs-list.h | 39 - > 2 files changed, 197

Re: [PATCH 2/2] Btrfs: introduce noextiref mount option

2013-04-11 Thread Miao Xie
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