[PATCH v2 1/9] btrfs: Cleanup the unused struct async_sched.

2013-09-12 Thread Qu Wenruo
The struct async_sched is not used by any codes and can be removed. Signed-off-by: Qu Wenruo quwen...@cn.fujitsu.com --- fs/btrfs/volumes.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index 78b8717..12eaf89 100644 --- a/fs/btrfs/volumes.c +++

[PATCH v2 0/9] btrfs: Replace the btrfs_workers with kernel workqueue

2013-09-12 Thread Qu Wenruo
Use kernel workqueue and kernel workqueue based new btrfs_workqueue_struct to replace the old btrfs_workers. The main goal is to reduce the redundant codes(800 lines vs 200 lines) and try to get benefits from the latest workqueue changes. About the performance, the test suite I used is bonnie++,

[PATCH v2 9/9] btrfs: Replace thread_pool_size with workqueue default value

2013-09-12 Thread Qu Wenruo
The original btrfs_workers uses the fs_info-thread_pool_size as the max_active, and the previous patches followed this way. But the kernel workqueue has the default value(0) for workqueue, and workqueue itself has some threshold mechanism to prevent creating too many threads, so we should use the

[PATCH v2 8/9] btrfs: Cleanup the old btrfs workqueue

2013-09-12 Thread Qu Wenruo
Since the patches before implemented the new kernel workqueue based btrfs_worqueue_struct, the old btrfs workqueue(btrfs_worker) can be removed without any problem. Signed-off-by: Qu Wenruo quwen...@cn.fujitsu.com --- fs/btrfs/Makefile | 2 +- fs/btrfs/async-thread.c | 714

[PATCH v2 3/9] btrfs: Added btrfs_workqueue_struct implemented ordered execution based on kernel workqueue

2013-09-12 Thread Qu Wenruo
Use kernel workqueue to implement a new btrfs_workqueue_struct, which has the ordering execution feature like the btrfs_worker. The func is executed in a concurrency way, and the ordred_func/ordered_free is executed in the sequence them are queued after the corresponding func is done. The new

[PATCH v2 2/9] btrfs: use kernel workqueue to replace the btrfs_workers functions

2013-09-12 Thread Qu Wenruo
Use the kernel workqueue to replace the btrfs_workers which are only used as normal workqueue. Other btrfs_workers will use some extra functions like requeue, high priority and ordered work. These btrfs_workers will not be touched in this patch. The followings are the untouched btrfs_workers:

[PATCH v2 5/9] btrfs: Use btrfs_workqueue_struct to replace the fs_info-workers

2013-09-12 Thread Qu Wenruo
Use the newly created btrfs_workqueue_struct to replace the original fs_info-workers Signed-off-by: Qu Wenruo quwen...@cn.fujitsu.com --- fs/btrfs/ctree.h | 2 +- fs/btrfs/disk-io.c | 36 +++- fs/btrfs/super.c | 3 ++- 3 files changed, 18 insertions(+), 23

[PATCH v2 6/9] btrfs: Use btrfs_workqueue_struct to replace the fs_info-delalloc_workers

2013-09-12 Thread Qu Wenruo
Much like the fs_info-workers, replace the fs_info-delalloc_workers use the same btrfs_workqueue. Signed-off-by: Qu Wenruo quwen...@cn.fujitsu.com --- fs/btrfs/ctree.h | 2 +- fs/btrfs/disk-io.c | 13 + fs/btrfs/inode.c | 19 +-- fs/btrfs/super.c | 2 +- 4

[PATCH v2 4/9] btrfs: Add high priority workqueue support for btrfs_workqueue_struct

2013-09-12 Thread Qu Wenruo
Add high priority workqueue, which added a new workqueue to btrfs_workqueue_struct. Whether using the high priority workqueue must be decided at initialization. Signed-off-by: Qu Wenruo quwen...@cn.fujitsu.com --- fs/btrfs/bwq.c | 29 - fs/btrfs/bwq.h | 8

[PATCH v2] Btrfs: don't leak transaction in btrfs_sync_file()

2013-09-12 Thread Filipe David Borba Manana
In btrfs_sync_file(), if the call to btrfs_log_dentry_safe() returns a negative error (for e.g. -ENOMEM via btrfs_log_inode()), we would return without ending/freeing the transaction. Signed-off-by: Filipe David Borba Manana fdman...@gmail.com --- V2: If btrfs_log_dentry_safe() returns error,

extent data disk byte 0

2013-09-12 Thread Anand Jain
In the item 7 below, any idea why would the disk byte be 0 ? (its not an inline extent) -- item 6 key (257 EXTENT_DATA 0) itemoff 3531 itemsize 53 extent data disk byte 456130560 nr 4096 extent data offset 0 nr 4096 ram 4096

Re: [PATCH] btrfs-progs: btrfs.8.in: Add info about reverting back to root subvolume.

2013-09-12 Thread David Sterba
On Wed, Sep 11, 2013 at 02:34:05PM +0530, chandan wrote: --- a/man/btrfs.8.in +++ b/man/btrfs.8.in @@ -244,7 +244,8 @@ is similar to \fBsubvolume list\fR command. \fBsubvolume set-default\fR\fI id path\fR Set the subvolume of the filesystem \fIpath\fR which is mounted as \fIdefault\fR.

[GIT PULL] Btrfs

2013-09-12 Thread Chris Mason
Hi Linus, Please pull my for-linus branch: git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs.git for-linus This is against 3.11-rc7, but was pulled and tested against your tree as of yesterday. We do have two small incrementals queued up, but I wanted to get this bunch out the

Re: [PATCH v2 2/2] btrfs-progs: use kernel for mounted and lblkid to scan disks

2013-09-12 Thread David Sterba
On Fri, Sep 06, 2013 at 05:37:53PM +0800, Anand Jain wrote: Further, to scan for the disks this patch will use lblkid, so that we don't have to manually scan the /dev or /dev/mapper which means we don't need the all-devices options. Thanks for implementing it! I found a few things to fix,

Re: [PATCH 1/2 resend] btrfs-progs: v4, move out print in cmd_df to another function

2013-09-12 Thread David Sterba
On Fri, Sep 06, 2013 at 05:37:52PM +0800, Anand Jain wrote: +static char *group_type_str(u64 flag) { - struct btrfs_ioctl_space_args *sargs, *sargs_orig; - u64 count = 0, i; - int ret; - int fd; - int e; - char *path; - DIR *dirstream = NULL; - - if

Re: [PATCH v2 0/9] btrfs: Replace the btrfs_workers with kernel workqueue

2013-09-12 Thread David Sterba
On Thu, Sep 12, 2013 at 04:08:15PM +0800, Qu Wenruo wrote: Use kernel workqueue and kernel workqueue based new btrfs_workqueue_struct to replace the old btrfs_workers. The main goal is to reduce the redundant codes(800 lines vs 200 lines) and try to get benefits from the latest workqueue

Re: [GIT PULL] Btrfs

2013-09-12 Thread Josh Boyer
On Thu, Sep 12, 2013 at 11:36 AM, Chris Mason chris.ma...@fusionio.com wrote: Mark Fasheh (4): btrfs: offline dedupe This commit adds calls to __put_user_unaligned, which causes build failures on ARM if btrfs is configured: + make -s ARCH=arm V=1 -j4 modules fs/btrfs/ioctl.c: In function

[PATCH] Btrfs: improve replacing nocow extents

2013-09-12 Thread Josef Bacik
Various people have hit a deadlock when running btrfs/011. This is because when replacing nocow extents we will take the i_mutex to make sure nobody messes with the file while we are replacing the extent. The problem is we are already holding a transaction open, which is a locking inversion, so

Re: [PATCH v2 2/9] btrfs: use kernel workqueue to replace the btrfs_workers functions

2013-09-12 Thread Liu Bo
On Thu, Sep 12, 2013 at 04:08:17PM +0800, Qu Wenruo wrote: Use the kernel workqueue to replace the btrfs_workers which are only used as normal workqueue. Other btrfs_workers will use some extra functions like requeue, high priority and ordered work. These btrfs_workers will not be touched

Re: [PATCH v2 2/9] btrfs: use kernel workqueue to replace the btrfs_workers functions

2013-09-12 Thread Qu Wenruo
于 2013年09月13日 09:29, Liu Bo 写道: On Thu, Sep 12, 2013 at 04:08:17PM +0800, Qu Wenruo wrote: Use the kernel workqueue to replace the btrfs_workers which are only used as normal workqueue. Other btrfs_workers will use some extra functions like requeue, high priority and ordered work. These

Re: [PATCH v2 9/9] btrfs: Replace thread_pool_size with workqueue default value

2013-09-12 Thread Liu Bo
On Thu, Sep 12, 2013 at 04:08:24PM +0800, Qu Wenruo wrote: The original btrfs_workers uses the fs_info-thread_pool_size as the max_active, and the previous patches followed this way. But the kernel workqueue has the default value(0) for workqueue, and workqueue itself has some threshold

Re: [PATCH v2 0/9] btrfs: Replace the btrfs_workers with kernel workqueue

2013-09-12 Thread Qu Wenruo
于 2013年09月13日 01:37, David Sterba 写道: On Thu, Sep 12, 2013 at 04:08:15PM +0800, Qu Wenruo wrote: Use kernel workqueue and kernel workqueue based new btrfs_workqueue_struct to replace the old btrfs_workers. The main goal is to reduce the redundant codes(800 lines vs 200 lines) and try to get

Re: [PATCH v2 9/9] btrfs: Replace thread_pool_size with workqueue default value

2013-09-12 Thread Qu Wenruo
于 2013年09月13日 09:47, Liu Bo 写道: On Thu, Sep 12, 2013 at 04:08:24PM +0800, Qu Wenruo wrote: The original btrfs_workers uses the fs_info-thread_pool_size as the max_active, and the previous patches followed this way. But the kernel workqueue has the default value(0) for workqueue, and workqueue

Re: [PATCH] btrfs-progs: btrfs.8.in: Add info about reverting back to root subvolume.

2013-09-12 Thread chandan
On Thursday, September 12, 2013 03:29:52 PM David Sterba wrote: The number 5 is an implementation detail, we should recommend to use 0. In the current btrfs kernel code if 0 is passed as the subvolume id, the btrfs_ioctl_default_subvol() function sets the subvolume id to the objectid of the