[PATCH] Btrfs-progs: dont print uuid unless -u option is given

2012-10-25 Thread Anand jain
From: Anand Jain anand.j...@oracle.com unless it was intentional to include uuid when -s option is (show snapshot only) given, we would need this break statement. Signed-off-by: Anand Jain anand.j...@oracle.com --- cmds-subvolume.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-)

[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 0/3] flush delalloc by multi-task

2012-10-25 Thread Miao Xie
This patchset introduce multi-task delalloc flush, it can make the delalloc flush more faster. And besides that, it also can fix the problem that we join the same transaction handler more than 2 times. Implementation: - Create a new worker pool. - Queue the inode with pending delalloc into the

[PATCH 1/3] Btrfs: make delalloc inodes be flushed by multi-task

2012-10-25 Thread Miao Xie
This patch introduce a new worker pool named flush_workers, and if we want to force all the inode with pending delalloc to the disks, we can queue those inodes into the work queue of the worker pool, in this way, those inodes will be flushed by multi-task. Signed-off-by: Miao Xie

[PATCH 2/3] Btrfs: make ordered operations be handled by multi-task

2012-10-25 Thread Miao Xie
The process of the ordered operations is similar to the delalloc inode flush, so we handle them by flush workers. Signed-off-by: Miao Xie mi...@cn.fujitsu.com --- fs/btrfs/ordered-data.c | 46 ++ fs/btrfs/ordered-data.h |2 +-

[PATCH 3/3] Btrfs: make ordered extent be flushed by multi-task

2012-10-25 Thread Miao Xie
Though the process of the ordered extents is a bit different with the delalloc inode flush, but we can see it as a subset of the delalloc inode flush, so we also handle them by flush workers. Signed-off-by: Miao Xie mi...@cn.fujitsu.com --- fs/btrfs/ordered-data.c | 41

[RESEND PATCH] fs/super.c set_anon_super calling optimization

2012-10-25 Thread Abhijit Pawar
Hi, set_anon_super is called by many filesystems. Some call directly and some call through the wrapper. Many of them in the wrapper's call to this function are passing the second argument to this function which is not used anywhere. This patch replaces the second variable with NULL. Thanks,

Re: [PATCH 0/3] flush delalloc by multi-task

2012-10-25 Thread Liu Bo
On 10/25/2012 05:20 PM, Miao Xie wrote: This patchset introduce multi-task delalloc flush, it can make the delalloc flush more faster. And besides that, it also can fix the problem that we join the same transaction handler more than 2 times. Implementation: - Create a new worker pool. -

Naming of subvolumes

2012-10-25 Thread Richard Hughes
I'm planning to use btrfs subvolume snapshot -r name in the system upgrade functionality[1] if the user is using btrfs for their root file system. We've got most of the bits in place already for Fedora 18. One think that confuses me is the convention for the naming of snapshots. Is there any

[PATCH] Btrfs: fix memory leak when cloning root's node

2012-10-25 Thread Liu Bo
After cloning root's node, we forgot to dec the src's ref which can lead to a memory leak. Signed-off-by: Liu Bo bo.li@oracle.com --- Jan, Please add this patch to your pull and notice Chris about it :) I didn't get this bug out since I didn't do rmmod yesterday... thanks,

Re: [PATCH] Btrfs: fix memory leak when cloning root's node

2012-10-25 Thread Jan Schmidt
Hi liubo, On Thu, October 25, 2012 at 15:17 (+0200), Liu Bo wrote: After cloning root's node, we forgot to dec the src's ref which can lead to a memory leak. Signed-off-by: Liu Bo bo.li@oracle.com --- Jan, Please add this patch to your pull and notice Chris about it :) I didn't

Re: Naming of subvolumes

2012-10-25 Thread Hugo Mills
On Thu, Oct 25, 2012 at 01:30:20PM +0100, Richard Hughes wrote: I'm planning to use btrfs subvolume snapshot -r name in the system upgrade functionality[1] if the user is using btrfs for their root file system. We've got most of the bits in place already for Fedora 18. One think that

[PATCH v2] Btrfs: fix memory leak when cloning root's node

2012-10-25 Thread Liu Bo
After cloning root's node, we forgot to dec the src's ref which can lead to a memory leak. Signed-off-by: Liu Bo bo.li@oracle.com --- v1-v2: fix a typo. fs/btrfs/ctree.c |8 +--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c index

Re: Naming of subvolumes

2012-10-25 Thread Richard Hughes
. Should the subvolumes be placed somewhere upgrade specific? Any best practice ideas on naming? e.g. @system-upgrade-20121025? Richard -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a message to majord...@vger.kernel.org More majordomo info at http

Re: [PATCH v2] Btrfs: fix memory leak when cloning root's node

2012-10-25 Thread Jan Schmidt
Chris: If you're not done yet, please put this one on top of the rc3-pile. Otherwise this can wait for the next rc as well. On Thu, October 25, 2012 at 15:30 (+0200), Liu Bo wrote: After cloning root's node, we forgot to dec the src's ref which can lead to a memory leak. Signed-off-by: Liu

Re: mkfs.btrfs allow to set the sectorsize by the -s option but the kernel doesnot

2012-10-25 Thread David Sterba
On Wed, Oct 24, 2012 at 02:39:34PM +0800, Ins wrote: mkfs.btrfs allows to set the sectorsize by the -s option. ... 2366if (sectorsize != PAGE_SIZE) { 2367printk(KERN_WARNING btrfs: Incompatible sector size(%lu) 2368 found on %s\n, (unsigned

[RFC v4 00/15] vfs: hot data tracking

2012-10-25 Thread zwu . kernel
From: Zhi Yong Wu wu...@linux.vnet.ibm.com NOTE: The patchset can be obtained via my kernel dev git on github: g...@github.com:wuzhy/kernel.git hot_tracking If you're interested, you can also can review them via https://github.com/wuzhy/kernel/commits/hot_tracking For more infomation,

[RFC v4 07/15] vfs,hot_track: add the aging function

2012-10-25 Thread zwu . kernel
From: Zhi Yong Wu wu...@linux.vnet.ibm.com Signed-off-by: Zhi Yong Wu wu...@linux.vnet.ibm.com --- fs/hot_tracking.c | 56 + fs/hot_tracking.h |6 + 2 files changed, 62 insertions(+), 0 deletions(-) diff --git a/fs/hot_tracking.c

[RFC v4 06/15] vfs,hot_track: add the function for updating map arrays

2012-10-25 Thread zwu . kernel
From: Zhi Yong Wu wu...@linux.vnet.ibm.com Signed-off-by: Zhi Yong Wu wu...@linux.vnet.ibm.com --- fs/hot_tracking.c | 164 + fs/hot_tracking.h | 54 + 2 files changed, 218 insertions(+), 0 deletions(-) diff --git

[RFC v4 04/15] vfs,hot_track: add two map arrays

2012-10-25 Thread zwu . kernel
From: Zhi Yong Wu wu...@linux.vnet.ibm.com Adds two map arrays which contains a lot of list and is used to efficiently look up the data temperature of a file or its ranges. In each list of map arrays, the array node will keep track of temperature info. Signed-off-by: Zhi Yong Wu

[RFC v4 10/15] vfs,hot_track: add one new ioctl interface

2012-10-25 Thread zwu . kernel
From: Zhi Yong Wu wu...@linux.vnet.ibm.com FS_IOC_GET_HEAT_INFO: return a struct containing the various metrics collected in hot_freq_data structs, and also return a calculated data temperature based on those metrics. Optionally, retrieve the temperature from the hot data hash list instead of

[RFC v4 15/15] vfs,hot_track: add the documentation

2012-10-25 Thread zwu . kernel
From: Zhi Yong Wu wu...@linux.vnet.ibm.com Signed-off-by: Zhi Yong Wu wu...@linux.vnet.ibm.com --- Documentation/filesystems/00-INDEX |2 + Documentation/filesystems/hot_tracking.txt | 164 2 files changed, 166 insertions(+), 0 deletions(-) create mode

[RFC v4 14/15] xfs: add hot tracking support

2012-10-25 Thread zwu . kernel
From: Dave Chinner dchin...@redhat.com Connect up the VFS hot tracking support so XFS filesystems can make use of it. Signed-off-by: Dave Chinner dchin...@redhat.com --- fs/xfs/xfs_mount.h |1 + fs/xfs/xfs_super.c | 16 2 files changed, 17 insertions(+), 0 deletions(-)

[RFC v4 13/15] btrfs: add hot tracking support

2012-10-25 Thread zwu . kernel
From: Zhi Yong Wu wu...@linux.vnet.ibm.com Introduce one new mount option '-o hot_track', and add its parsing support. Its usage looks like: mount -o hot_track mount -o nouser,hot_track mount -o nouser,hot_track,loop mount -o hot_track,nouser Signed-off-by: Zhi Yong Wu

Re: Naming of subvolumes

2012-10-25 Thread Richard Hughes
On Thu, 2012-10-25 at 16:09 +0100, Leonidas Spyropoulos wrote: On another note. How would you implement that logic (make a snapshot before upgrade) without the lib? Would you wrap package manager into a wrapper or patch package manager to call snapshot and the upgrade. In both cases you will

[RFC v4 12/15] vfs,hot_track: turn some Micro into be tunable

2012-10-25 Thread zwu . kernel
From: Zhi Yong Wu wu...@linux.vnet.ibm.com Turn TIME_TO_KICK and HEAT_UPDATE_DELAY into be tunable via /proc/sys/fs/hot-kick-time and /proc/sys/fs/hot-update-delay. Signed-off-by: Zhi Yong Wu wu...@linux.vnet.ibm.com --- fs/hot_tracking.c| 12 +--- fs/hot_tracking.h

Invitation to use Google Talk

2012-10-25 Thread Google Talk
--- You've been invited by Firo Yang to use Google Talk. If you already have a Google account, login to Gmail and accept this chat invitation: http://mail.google.com/mail/b-3f935c4a3a-875407c2af-TcuHt33BDQMAsJelvxTTsKreF7o To

[RFC v4 03/15] vfs,hot_track: add the function for collecting I/O frequency

2012-10-25 Thread zwu . kernel
From: Zhi Yong Wu wu...@linux.vnet.ibm.com Add some utils helpers to update access frequencies for one file or its range. Signed-off-by: Zhi Yong Wu wu...@linux.vnet.ibm.com --- fs/hot_tracking.c| 191 ++ fs/hot_tracking.h|9

[RFC v4 01/15] vfs,hot_track: introduce private radix tree structures

2012-10-25 Thread zwu . kernel
From: Zhi Yong Wu wu...@linux.vnet.ibm.com One root structure hot_info is defined, is hooked up in super_block, and will be used to hold radix tree root, hash list root and some other information, etc. Adds hot_inode_tree struct to keep track of frequently accessed files, and be keyed by

[RFC v4 09/15] vfs,hot_track: register one memory shrinker

2012-10-25 Thread zwu . kernel
From: Zhi Yong Wu wu...@linux.vnet.ibm.com Register a shrinker to control the amount of memory that is used in tracking hot regions - if we are throwing inodes out of memory due to memory pressure, we most definitely are going to need to reduce the amount of memory the tracking code is using,

[RFC v4 11/15] vfs,hot_track: add debugfs support

2012-10-25 Thread zwu . kernel
From: Zhi Yong Wu wu...@linux.vnet.ibm.com Add a /sys/kernel/debug/hot_track/device_name/ directory for each volume that contains two files. The first, `inode_stats', contains the heat information for inodes that have been brought into the hot data map structures. The second, `range_stats',

[RFC v4 05/15] vfs,hot_track: add hooks to enable hot data tracking

2012-10-25 Thread zwu . kernel
From: Zhi Yong Wu wu...@linux.vnet.ibm.com Miscellaneous features that implement hot data tracking and generally make the hot data functions a bit more friendly. Signed-off-by: Zhi Yong Wu wu...@linux.vnet.ibm.com --- fs/direct-io.c |6 ++ mm/filemap.c|6 ++

[RFC v4 02/15] vfs,hot_track: initialize and free key data structures

2012-10-25 Thread zwu . kernel
From: Zhi Yong Wu wu...@linux.vnet.ibm.com Add initialization function to create some key data structures when hot tracking is enabled; Clean up them when hot tracking is disabled Signed-off-by: Zhi Yong Wu wu...@linux.vnet.ibm.com --- fs/hot_tracking.c| 125

[RFC v4 08/15] vfs,hot_track: add one work queue

2012-10-25 Thread zwu . kernel
From: Zhi Yong Wu wu...@linux.vnet.ibm.com Add a per-superblock workqueue and a work_struct to run periodic work to update map info on each superblock. Signed-off-by: Zhi Yong Wu wu...@linux.vnet.ibm.com --- fs/hot_tracking.c| 85 ++

Re: [BUG][PATCH][BTRFS-PROGS] Bug overflow fix

2012-10-25 Thread David Sterba
On Wed, Oct 24, 2012 at 04:24:02PM +0800, Rock Lee wrote: If there's is a long name directory exists in the /dev, then an overflow will hit in function utils.c btrfs_scan_one_dir:1013! The minimal fix is to use snprintf instead of strcpy. The reason why not using strncpy is that, if there

Re: help with btrfs send

2012-10-25 Thread David Sterba
On Wed, Oct 24, 2012 at 06:23:32PM +0100, Rory Campbell-Lange wrote: The output of 'btrfs send' is in binary format. You can read more about what is contained in the data stream in Jonathan Corbet's posting at LWN here http://lwn.net/Articles/506244/ You'd normally do send/receive something

[PATCH] btrfs-progs: do not send stream into a terminal

2012-10-25 Thread David Sterba
Signed-off-by: David Sterba dste...@suse.cz --- cmds-send.c |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/cmds-send.c b/cmds-send.c index 9b47e70..e37f5d2 100644 --- a/cmds-send.c +++ b/cmds-send.c @@ -427,6 +427,11 @@ int cmd_send_start(int argc, char **argv)

Re: [BUG][BTRFS-PROGS] Fix Bug to corrupt the img file

2012-10-25 Thread David Sterba
On Wed, Oct 24, 2012 at 10:04:47AM +0800, Rock Lee wrote: @@ -572,7 +576,7 @@ int btrfs_prepare_device(int fd, char *file, int zero_end, u64 *block_count_ret, discard_blocks(fd, 0, block_count); } - ret = zero_dev_start(fd); + ret = zero_dev_start(fd,

Re: [BUG][BTRFS-PROGS] Fix Bug to corrupt the img file

2012-10-25 Thread Rock Lee
Got it. 2012/10/25 David Sterba d...@jikos.cz: On Wed, Oct 24, 2012 at 10:04:47AM +0800, Rock Lee wrote: @@ -572,7 +576,7 @@ int btrfs_prepare_device(int fd, char *file, int zero_end, u64 *block_count_ret, discard_blocks(fd, 0, block_count); } - ret =

Re: Naming of subvolumes

2012-10-25 Thread Calvin Walton
On Thu, 2012-10-25 at 16:16 +0100, Richard Hughes wrote: On Thu, 2012-10-25 at 16:09 +0100, Leonidas Spyropoulos wrote: On another note. How would you implement that logic (make a snapshot before upgrade) without the lib? Would you wrap package manager into a wrapper or patch package

[PATCH V2][BTRFS-PROGS] [BUG] Fix Bug to corrupt the img file

2012-10-25 Thread Rock Lee
Fix Bug to corrupt the img file Reproduce steps: dd if=/dev/zero of=btrfs-small.img bs=1M count=1 ls -lh btrfs-small.img -rw-rw-r--. 1 rock rock 1.0M Oct 24 09:51 btrfs-small.img ^^^ mkfs.btrfs btrfs-small.img -rw-rw-r--. 1 rock rock 2.0M Oct 24

Re: [PATCH 5/5] Update the man page with the new prefixes.

2012-10-25 Thread David Sterba
Hi, one minor typo On Tue, Oct 23, 2012 at 07:51:55PM +0200, Goffredo Baroncelli wrote: --- a/man/btrfs.8.in +++ b/man/btrfs.8.in @@ -184,6 +184,9 @@ defragment operations. \fB-t size\fP defragment only files at least \fIsize\fR bytes big +For \fBstart\fP, \fBlen\fP, \fBsize\fP it is

Re: [PATCH][BTRFS-PROGS][V2] Update to parse_size()

2012-10-25 Thread David Sterba
On Tue, Oct 23, 2012 at 08:48:08PM +0200, Goffredo Baroncelli wrote: Sorry the version is V1 and not V2 Changelog: V1: avoid to change the parse_size argument; better check of a wrong suffix; force strtoull to use a decimal base [I looked at patches at your git repo, not sure if

Re: [PATCH V2][BTRFS-PROGS] [BUG] Fix Bug to corrupt the img file Reply-To: d...@jikos.cz

2012-10-25 Thread David Sterba
On Fri, Oct 26, 2012 at 12:12:24AM +0800, Rock Lee wrote: Fix Bug to corrupt the img file Reproduce steps: dd if=/dev/zero of=btrfs-small.img bs=1M count=1 ls -lh btrfs-small.img -rw-rw-r--. 1 rock rock 1.0M Oct 24 09:51 btrfs-small.img ^^^

Re: [PATCH] [btrfs-progs] Modify parse_size to remove the strdup/free

2012-10-25 Thread David Sterba
On Tue, Oct 23, 2012 at 05:11:27PM +0800, Rock Lee wrote: Since the function atoi(l) series stop at the first non numeric chars, So there's no need to strdup the original s and modify s[len-1] = '\0' This change is superseded and contained in Goffredos patches which I prefer for inclusion as

Re: btrfs seems to do COW while inode has NODATACOW set

2012-10-25 Thread cwillu
On Thu, Oct 25, 2012 at 12:35 PM, Alex Lyakas alex.bt...@zadarastorage.com wrote: Hi everybody, I need some help understanding the nodatacow behavior. I have set up a large file (5GiB), which has very few EXTENT_DATAs (all are real, not bytenr=0). The file has NODATASUM and NODATACOW flags

Re: btrfs seems to do COW while inode has NODATACOW set

2012-10-25 Thread Alex Lyakas
Hi cwillu, the filesystem has a single subvolume and a single file within it. I know that ext2 conversion creates an image file that references same extents, which should cause the COW. I actually used examples from conversion mkfs code to create this filesystem. Maybe I have some

Re: btrfs seems to do COW while inode has NODATACOW set

2012-10-25 Thread Wade Cline
Hi Alex, Someone correct me if I am wrong, but I'm pretty sure that the purpose of 'nodatacow' is to prevent the location of extents on the disk itself from moving, however, it may be necessary to allocate more extents in the metadata (which I presume are represented by EXTENT_DATA) in order to

Re: btrfs seems to do COW while inode has NODATACOW set

2012-10-25 Thread Alex Lyakas
Wade, thanks. Yes, with the preallocated extent I saw the behavior you describe, and it makes perfect sense to alloc a new EXTENT_DATA in this case. In my case, I did another simple test: Before: item 4 key (257 INODE_ITEM 0) itemoff 3593 itemsize 160 inode generation 5

[RFC] New attempt to a better btrfs fi df

2012-10-25 Thread Goffredo Baroncelli
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi all, this is a new attempt to improve the output of the command btrfs fi df. The previous attempt received a good reception. However there was no a general consensus about the wording. Moreover I still didn't understand how btrfs was using the

Re: [PATCH 5/5] Update the man page with the new prefixes.

2012-10-25 Thread Goffredo Baroncelli
On 2012-10-25 18:13, David Sterba wrote: Hi, one minor typo On Tue, Oct 23, 2012 at 07:51:55PM +0200, Goffredo Baroncelli wrote: --- a/man/btrfs.8.in +++ b/man/btrfs.8.in @@ -184,6 +184,9 @@ defragment operations. \fB-t size\fP defragment only files at least \fIsize\fR bytes big

Re: device delete, error removing device [SOLVED]

2012-10-25 Thread Goffredo Baroncelli
On 2012-10-24 23:43, Chris Murphy wrote: However this page https://btrfs.wiki.kernel.org/index.php/Project_ideas#Drive_swapping states that someone is working on this kind of issue. Yep, I see I'm merely stating what is already known, sorry about that. No, please; you are really

Re: [RFC] New attempt to a better btrfs fi df

2012-10-25 Thread cwillu
I don't publish the patched because aren't in a good shape. However I really like the output. The example is a filesystem based on three disks of 3GB. It is clear that: - - RAID0 uses all the disks - - RAID1 uses two different disks Comments are welcome. Known bugs: - - if a filesystem

Need help mounting laptop corrupted root btrfs. Kernel BUG at fs/btrfs/volumes.c:3707

2012-10-25 Thread Marc MERLIN
Howdy, I can wait a day or maybe 2 before I have to wipe and restore from backup. Please let me know if you have a patch against 3.6.3 you'd like me to try to mount/recover this filesystem, or whether you'd like me to try btrfsck. My laptop had a problem with its boot drive which prevented

Re: [RFC] New attempt to a better btrfs fi df

2012-10-25 Thread Goffredo Baroncelli
On 2012-10-25 21:40, cwillu wrote: I don't publish the patched because aren't in a good shape. However I really like the output. The example is a filesystem based on three disks of 3GB. It is clear that: - - RAID0 uses all the disks - - RAID1 uses two different disks Comments are welcome.

Re: [RFC] New attempt to a better btrfs fi df

2012-10-25 Thread Chris Murphy
On Oct 25, 2012, at 1:21 PM, Goffredo Baroncelli kreij...@inwind.it wrote: Moreover I still didn't understand how btrfs was using the disks. This comment has less to do with the RFC, and more about user confusion in a specific case of the existing fi df behavior. But since I have the same

Re: Need help mounting laptop corrupted root btrfs. Kernel BUG at fs/btrfs/volumes.c:3707

2012-10-25 Thread cwillu
On Thu, Oct 25, 2012 at 1:58 PM, Marc MERLIN m...@merlins.org wrote: Howdy, I can wait a day or maybe 2 before I have to wipe and restore from backup. Please let me know if you have a patch against 3.6.3 you'd like me to try to mount/recover this filesystem, or whether you'd like me to try

Re: [RFC] New attempt to a better btrfs fi df

2012-10-25 Thread cwillu
Allocated_area: Data,RAID0: Size:921.75MB, Used:256.00KB /dev/vdc 307.25MB /dev/vdb 307.25MB /dev/vdd 307.25MB Data,Single: Size:8.00MB, Used:0.00 /dev/vdb 8.00MB System,RAID1: Size:8.00MB, Used:4.00KB /dev/vdd 8.00MB /dev/vdc

Re: [RFC] New attempt to a better btrfs fi df

2012-10-25 Thread cwillu
On Thu, Oct 25, 2012 at 2:03 PM, Chris Murphy li...@colorremedies.com wrote: On Oct 25, 2012, at 1:21 PM, Goffredo Baroncelli kreij...@inwind.it wrote: Moreover I still didn't understand how btrfs was using the disks. This comment has less to do with the RFC, and more about user confusion in

Re: Need help mounting laptop corrupted root btrfs. Kernel BUG at fs/btrfs/volumes.c:3707

2012-10-25 Thread Marc MERLIN
On Thu, Oct 25, 2012 at 02:03:49PM -0600, cwillu wrote: 3) Want me to try btrfsck although it may make it impossible for me to reproduce the bug and test a fix, as well as potentially break the filesystem more (last time I tried btrfsck, it outputted thousands of lines and never

Re: [RFC] New attempt to a better btrfs fi df

2012-10-25 Thread Chris Murphy
My suggestion is that by default a summary similar to the existing df command be mimicked, where it makes sense, for btrfs fi df. - I like the Capacity %. If there is a reliable equivalent, it need not be inode based, that would be great. - I care far less about the actual physical device

Re: [RFC] New attempt to a better btrfs fi df

2012-10-25 Thread Goffredo Baroncelli
On 2012-10-25 22:11, cwillu wrote: 3. How does Data: total=72GB before rebalance, but is 5GB after rebalance? This was a brand new file system, file system installed, with maybe 2-3 updates, and a dozen or two reboots. That's it. No VM's created on that volume (it's a VDI itself), and the VDI

Re: [RFC] New attempt to a better btrfs fi df

2012-10-25 Thread cwillu
On Thu, Oct 25, 2012 at 2:36 PM, Chris Murphy li...@colorremedies.com wrote: My suggestion is that by default a summary similar to the existing df command be mimicked, where it makes sense, for btrfs fi df. - I like the Capacity %. If there is a reliable equivalent, it need not be inode

Re: btrfs seems to do COW while inode has NODATACOW set

2012-10-25 Thread Wade Cline
On 10/25/2012 12:09 PM, Alex Lyakas wrote: Wade, thanks. Yes, with the preallocated extent I saw the behavior you describe, and it makes perfect sense to alloc a new EXTENT_DATA in this case. In my case, I did another simple test: Before: item 4 key (257 INODE_ITEM 0) itemoff 3593

Re: problem replacing failing drive

2012-10-25 Thread sam tygier
On 22/10/12 10:07, sam tygier wrote: hi, I have a 2 drive btrfs raid set up. It was created first with a single drive, and then adding a second and doing btrfs fi balance start -dconvert=raid1 /data the original drive is showing smart errors so i want to replace it. i dont easily have

RE: problem replacing failing drive

2012-10-25 Thread Kyle Gates
To: linux-btrfs@vger.kernel.org From: samtyg...@yahoo.co.uk Subject: Re: problem replacing failing drive Date: Thu, 25 Oct 2012 22:02:23 +0100 On 22/10/12 10:07, sam tygier wrote: hi, I have a 2 drive btrfs raid set up. It was created first with

Re: [PATCH V2][BTRFS-PROGS] [BUG] Fix Bug to corrupt the img file Reply-To: d...@jikos.cz

2012-10-25 Thread Rock Lee
Thanks for your review. Sorry for the problem line wrapped, I will resend the patch. Thanks -Rock 2012/10/26 David Sterba d...@jikos.cz: On Fri, Oct 26, 2012 at 12:12:24AM +0800, Rock Lee wrote: Fix Bug to corrupt the img file Reproduce steps: dd if=/dev/zero of=btrfs-small.img bs=1M

[RESEND PATCH V2][BTRFS-PROGS] [BUG] Fix Bug to corrupt the img file

2012-10-25 Thread zimilo
From: Rock zim...@code-trick.com Reproduce steps: dd if=/dev/zero of=btrfs-small.img bs=1M count=1 ls -lh btrfs-small.img -rw-rw-r--. 1 rock rock 1.0M Oct 24 09:51 btrfs-small.img ^^^ mkfs.btrfs btrfs-small.img -rw-rw-r--. 1 rock rock 2.0M Oct 24 09:53

Re: [PATCH 0/3] flush delalloc by multi-task

2012-10-25 Thread Miao Xie
On thu, 25 Oct 2012 19:53:05 +0800, Liu Bo wrote: On 10/25/2012 05:20 PM, Miao Xie wrote: This patchset introduce multi-task delalloc flush, it can make the delalloc flush more faster. And besides that, it also can fix the problem that we join the same transaction handler more than 2

Re: [PATCH 0/3] flush delalloc by multi-task

2012-10-25 Thread Liu Bo
On 10/26/2012 09:56 AM, Miao Xie wrote: I can see the potential improvements brought by flushing inodes this way. But I don't think it makes much sense by making waiting process multi-task, since even we spread wait order extents into different cpus, they just occpied the cpu and went

Re: [RFC] New attempt to a better btrfs fi df

2012-10-25 Thread Chris Murphy
On Oct 25, 2012, at 2:11 PM, cwillu cwi...@cwillu.com wrote: 1. Why is FS bytes used = 3.91GB, yet devid 1 used is 9.13 GB? FS bytes is what du -sh would show. devid 1 used is space allocated to some block group (without that block group itself being entirely used) I agree the word used

Re: [BUG][PATCH][BTRFS-PROGS] Bug overflow fix

2012-10-25 Thread Rock Lee
Yeah, I will improve the patch to get it better. Thanks, - Rock 2012/10/25 David Sterba d...@jikos.cz: On Wed, Oct 24, 2012 at 04:24:02PM +0800, Rock Lee wrote: If there's is a long name directory exists in the /dev, then an overflow will hit in function utils.c btrfs_scan_one_dir:1013! The

Re: [RFC] New attempt to a better btrfs fi df

2012-10-25 Thread cwillu
On Thu, Oct 25, 2012 at 8:33 PM, Chris Murphy li...@colorremedies.com wrote: So what's the intended distinction between 'fi df' and 'fi show'? Because for months using btrfs I'd constantly be confused which command was going to show me what information I wanted, and that tells me there should

Re: [PATCH 0/3] flush delalloc by multi-task

2012-10-25 Thread Miao Xie
On Fri, 26 Oct 2012 10:05:55 +0800, Liu Bo wrote: On 10/26/2012 09:56 AM, Miao Xie wrote: I can see the potential improvements brought by flushing inodes this way. But I don't think it makes much sense by making waiting process multi-task, since even we spread wait order extents into

Re: [RFC] New attempt to a better btrfs fi df

2012-10-25 Thread Chris Murphy
On Oct 25, 2012, at 9:36 PM, cwillu cwi...@cwillu.com wrote: On Thu, Oct 25, 2012 at 8:33 PM, Chris Murphy li...@colorremedies.com wrote: So what's the intended distinction between 'fi df' and 'fi show'? Because for months using btrfs I'd constantly be confused which command was going to

Re: Naming of subvolumes

2012-10-25 Thread Chris Murphy
subvolumes cluttering things up. Should the subvolumes be placed somewhere upgrade specific? Any best practice ideas on naming? e.g. @system-upgrade-20121025? I'm curious what is being snapshotted, and what the snapshot organization will be, before getting to the naming convention