Re: ENOSPC errors during raid1 rebalance

2014-03-05 Thread Duncan
Michael Russo posted on Wed, 05 Mar 2014 22:13:10 + as excerpted: > Chris Murphy colorremedies.com> writes: > >> You could also try a full defragment by specifying -r on the mount >> point with a small -t value to effectively cause everything to be >> subject to defragmenting. If this still

[PATCH 4/5] Btrfs-progs: fsck: force to udate tree root for some cases

2014-03-05 Thread Wang Shilong
commit roots won't update root item in tree root if it finds updated root's bytenr is same as before. However, this is not right for fsck, we need update tree root in the following case: 1.overwrite previous root node. 2.reinit reloc data tree, this is because we skip pin relo data tree before

[PATCH 3/5] Btrfs-progs: fsck: insert root dir into reloc data tree when reiniting it

2014-03-05 Thread Wang Shilong
There are two bugs when resetting balance: 1.we will skip reinitting reloc data tree if no reloc root found, however this is not right because we don't pin reloc data tree before. 2.we should insert root dir into reloc data tree,otherwise we will fail to fsck. Fix problems by forcely reini

[PATCH 5/5] Btrfs-progs: fsck: handle case that we can not lookup extent info

2014-03-05 Thread Wang Shilong
Previously, --init-extent-tree works just because btrfs_lookup_extent_info() blindly return 0, and this make it work if there are not any *FULL BACKREF* mode in broken filesystem. It is just a coincidence that --init-extent-tree option works, let's do it in the right way firstly. For now, we have

[PATCH 2/5] Btrfs-progs: fsck: reset balance after reiniting extent root

2014-03-05 Thread Wang Shilong
reset balance need cow block which will insert extent item into extent tree. If we do this before reinitting extent root, we may encounter EEIXST. Signed-off-by: Wang Shilong --- cmds-check.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/cmds-check.c b/cmds-che

[PATCH 1/5] Btrfs-progs: fsck: deal with really corrupted extent tree

2014-03-05 Thread Wang Shilong
To reinit extent root, we need find a free extent, however, we may have a really corrupted extent tree, so we can't rely on existed extent tree to cache block group any more. During test, we fail to reinit extent tree which is because we can not find a free extent so let's make block group cache o

[PATCH V2 01/10] Btrfs: fix early enospc due to the race of the two ordered extent wait

2014-03-05 Thread Miao Xie
btrfs_wait_ordered_roots() moves all the list entries to a new list, and then deals with them one by one. But if the other task invokes this function at that time, it would get a empty list. It makes the enospc error happens more early. Fix it. Signed-off-by: Miao Xie --- Changelog v1 -> v2: - Ne

[PATCH V2 07/10] Btrfs: don't flush all delalloc inodes when we doesn't get s_umount lock

2014-03-05 Thread Miao Xie
We needn't flush all delalloc inodes when we doesn't get s_umount lock, or we would make the tasks wait for a long time. Signed-off-by: Miao Xie --- Changelog v1 -> v2: - New patch. --- fs/btrfs/ctree.h | 3 ++- fs/btrfs/dev-replace.c | 2 +- fs/btrfs/extent-tree.c | 8 fs/btrf

[PATCH V2 09/10] Btrfs: fix possible empty list access when flushing the delalloc inodes

2014-03-05 Thread Miao Xie
We didn't have a lock to protect the access to the delalloc inodes list, that is we might access a empty delalloc inodes list if someone start flushing delalloc inodes because the delalloc inodes were moved into a other list temporarily. Fix it by wrapping the access with a lock. Signed-off-by: Mi

[PATCH V2 06/10] Btrfs: reclaim delalloc metadata more aggressively

2014-03-05 Thread Miao Xie
generic/074 in xfstests failed sometimes because of the enospc error, the reason of this problem is that we just reclaimed the space we need from the reserved space for delalloc, and then tried to reserve the space, but if some task did no-flush reservation between the above reclamation and reserva

[PATCH V2 03/10] Btrfs: just do dirty page flush for the inode with compression before direct IO

2014-03-05 Thread Miao Xie
As the comment in the btrfs_direct_IO says, only the compressed pages need be flush again to make sure they are on the disk, but the common pages needn't, so we add a if statement to check if the inode has compressed pages or not, if no, skip the flush. And in order to prevent the write ranges fro

[PATCH V2 05/10] Btrfs: remove unnecessary lock in may_commit_transaction()

2014-03-05 Thread Miao Xie
The reason is: - The per-cpu counter has its own lock to protect itself. - Here we needn't get a exact value. Signed-off-by: Miao Xie --- Changelog v1 -> v2: - None. --- fs/btrfs/extent-tree.c | 9 + 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/fs/btrfs/extent-tree.c b/fs

[PATCH V2 04/10] Btrfs: remove the unnecessary flush when preparing the pages

2014-03-05 Thread Miao Xie
Signed-off-by: Miao Xie --- Changelog v1 -> v2: - None. --- fs/btrfs/file.c | 13 + 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index 0165b86..76b725e 100644 --- a/fs/btrfs/file.c +++ b/fs/btrfs/file.c @@ -1346,11 +1346,11 @@ lock_an

[PATCH V2 08/10] Btrfs: split the global ordered extents mutex

2014-03-05 Thread Miao Xie
When we create a snapshot, we just need wait the ordered extents in the source fs/file root, but because we use the global mutex to protect this ordered extents list of the source fs/file root to avoid accessing a empty list, if someone got the mutex to access the ordered extents list of the other

[PATCH V2 02/10] Btrfs: wake up the tasks that wait for the io earlier

2014-03-05 Thread Miao Xie
The tasks that wait for the IO_DONE flag just care about the io of the dirty pages, so it is better to wake up them immediately after all the pages are written, not the whole process of the io completes. Signed-off-by: Miao Xie --- Changelog v1 -> v2: - None. --- fs/btrfs/ordered-data.c | 14 +++

[PATCH V2 10/10] Btrfs: reclaim the reserved metadata space at background

2014-03-05 Thread Miao Xie
Before applying this patch, the task had to reclaim the metadata space by itself if the metadata space was not enough. And When the task started the space reclamation, all the other tasks which wanted to reserve the metadata space were blocked. At some cases, they would be blocked for a long time,

[PATCH] Btrfs: introduce btrfs_{start, end}_nocow_write() for each subvolume

2014-03-05 Thread Miao Xie
If the snapshot creation happened after the nocow write but before the dirty data flush, we would fail to flush the dirty data because of no space. So we must keep track of when those nocow write operations start and when they end, if there are nocow writers, the snapshot creators must wait. In or

[PATCH 1/2] btrfs: Cleanup the btrfs_workqueue related function type

2014-03-05 Thread quwen...@cn.fujitsu.com
The new btrfs_workqueue still use open-coded function defition, this patch will change them into btrfs_func_t type which is much the same as kernel workqueue. Signed-off-by: Qu Wenruo --- fs/btrfs/async-thread.c | 6 +++--- fs/btrfs/async-thread.h | 20 +++- 2 files changed, 14

[PATCH 2/2] btrfs: Add ftrace for btrfs_workqueue

2014-03-05 Thread quwen...@cn.fujitsu.com
Add ftrace for btrfs_workqueue for further workqueue tunning. This patch needs to applied after the workqueue replace patchset. Signed-off-by: Qu Wenruo --- fs/btrfs/async-thread.c | 7 include/trace/events/btrfs.h | 82 2 files changed, 89

[PATCH 2/2] btrfs: Add ftrace for btrfs_workqueue

2014-03-05 Thread quwen...@cn.fujitsu.com
Add ftrace for btrfs_workqueue for further workqueue tunning. This patch needs to applied after the workqueue replace patchset. Signed-off-by: Qu Wenruo --- fs/btrfs/async-thread.c | 7 include/trace/events/btrfs.h | 82 2 files changed, 89

[PATCH 1/2] btrfs: Cleanup the btrfs_workqueue related function type

2014-03-05 Thread quwen...@cn.fujitsu.com
The new btrfs_workqueue still use open-coded function defition, this patch will change them into btrfs_func_t type which is much the same as kernel workqueue. Signed-off-by: Qu Wenruo --- fs/btrfs/async-thread.c | 6 +++--- fs/btrfs/async-thread.h | 20 +++- 2 files changed, 14

[PATCH 2/3] btrfs-progs: cleanup device stat usage prompt

2014-03-05 Thread Gui Hecheng
1. use usage() to replace the fprintf() 2. use check_argc_exact() to replace "argc != ..." Signed-off-by: Gui Hecheng --- cmds-device.c | 13 - 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/cmds-device.c b/cmds-device.c index ad59600..5009d9a 100644 --- a/cmds-device.

[PATCH 1/3] btrfs-progs: cleanup dead return after usage() for fi-disk_usage

2014-03-05 Thread Gui Hecheng
The usage() calls exit() internally, so remove the return after it. Signed-off-by: Gui Hecheng --- cmds-fi-disk_usage.c | 12 +++- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/cmds-fi-disk_usage.c b/cmds-fi-disk_usage.c index e4eb72b..a3b06be 100644 --- a/cmds-fi-disk_us

[PATCH 3/3] btrfs-progs: make the device scan logic more clear

2014-03-05 Thread Gui Hecheng
1. Use long option to replace the original strcmp() to parse the "--all-devices". 2. the "int ret" is defined in 2 places, just define it once and make the return pattern into "goto + single return". This does not change the actual scan procedure and return values. Just make it clear, the original

Re: ENOSPC errors during raid1 rebalance

2014-03-05 Thread Michael Russo
Chris Murphy colorremedies.com> writes: > Did you do a defrag and balance after ext4>btrfs conversion, > but before data/metadata profile conversion? No I didn't, as I thought it was only optional and didn't realize it might later affect my ability to change profiles. -- To unsubscribe fr

Re: ENOSPC errors during raid1 rebalance

2014-03-05 Thread Michael Russo
Chris Murphy colorremedies.com> writes: > You could also try a full defragment by specifying -r on the mount point > with a small -t value to effectively cause everything to be subject > to defragmenting. If this still doesn't permit soft rebalance, then maybe > filefrag can find files that have

Re: [Repost] Is BTRFS "bedup" maintained ?

2014-03-05 Thread cwillu
Bedup was/is a third-party project, not sure if its developer follows this list. Might be worth filing a bug or otherwise poking the author on https://github.com/g2p/bedup On Wed, Mar 5, 2014 at 2:43 PM, Marc MERLIN wrote: > On Wed, Mar 05, 2014 at 06:24:40PM +0100, Swāmi Petaramesh wrote: >> H

Re: [Repost] Is BTRFS "bedup" maintained ?

2014-03-05 Thread Marc MERLIN
On Wed, Mar 05, 2014 at 06:24:40PM +0100, Swâmi Petaramesh wrote: > Hello, > > (Not having received a single answer, I repost this...) I got your post, and posted myself about bedup not working at all for me, and got no answer either. As far as I can tell, it's entirely unmaintained and was like

[Repost] Is BTRFS "bedup" maintained ?

2014-03-05 Thread Swâmi Petaramesh
Hello, (Not having received a single answer, I repost this...) I tried to use "bedup" BTRFS offline deduplication tool on several BTRFS machines, with mixed results : 1/ Crashes with messages stating "programming error", sqlite objects must be used inside of the thread that created them, blah-

patch for ioctl.h

2014-03-05 Thread Arvin Schnell
Hi, u64 is not known when just including btrfs/ioctl.h. I assume it should be __u64 as everywhere else in the file. Regards, Arvin -- Arvin Schnell, Senior Software Engineer, Research & Development SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nü

Re: [RFC PATCH 5/5] Btrfs: fix broken free space cache after the system crashed

2014-03-05 Thread Josef Bacik
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 03/05/2014 02:02 AM, Miao Xie wrote: > On Tue, 4 Mar 2014 10:19:20 -0500, Josef Bacik wrote: On 01/15/2014 > 07:00 AM, Miao Xie wrote: When we mounted the filesystem after the crash, we got the following message: BTRFS error (device xxx):

Re: [PATCH v3] Btrfs: add readahead for send_write

2014-03-05 Thread David Sterba
On Wed, Mar 05, 2014 at 10:07:35AM +0800, Liu Bo wrote: > Btrfs send reads data from disk and then writes to a stream via pipe or > a file via flush. > > Currently we're going to read each page a time, so every page results > in a disk read, which is not friendly to disks, esp. HDD. Given that, >

Loan Application

2014-03-05 Thread Loans
Loan Application at a low rate of 0.5% send your Name,Amount,Phone and country to standar...@56788.com Note: $5,000.00 USD minimum and $100,000,000 Maximum. -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordo