Re: [PATCH v2 1/4] btrfs: Remove userspace transaction ioctls

2018-02-05 Thread Wang Shilong
These ioctl are originally introduced by Sage Weil for Ceph use? Not sure whether it still useful, Cc Sage just in case. 在 2018年2月5日,下午5:41,Nikolay Borisov 写道: Commit 3558d4f88ec8 ("btrfs: Deprecate userspace transaction ioctls") marked the beginning of the end of

Re: [PATCH 0/5] btrfs-progs: resolve property and enhance defragment

2017-11-01 Thread Wang Shilong
在 2017年11月2日,上午11:44,Su Yue 写道: Sorry, the patchset does not work as expected. Please ignore it. On 11/02/2017 11:23 AM, Su Yue wrote: > The patchset adds an option '--compress-force' to work with > 'btrfs fi defrag -c'. Then no-compression files will be set with >

Re: RedHat 7.4 Release Notes: "Btrfs has been deprecated" - wut?

2017-08-04 Thread Wang Shilong
Hi Qu, On Fri, Aug 4, 2017 at 10:05 PM, Qu Wenruo wrote: > > > On 2017年08月02日 16:38, Brendan Hide wrote: >> >> The title seems alarmist to me - and I suspect it is going to be >> misconstrued. :-/ >> >> From the release notes at >>

Re: [PATCH] Btrfs: avoid unnecessarily locking inode when clearing a range

2017-08-03 Thread Wang Shilong
about to clear the range from the defrag status, we don't need to >> lock and unlock the inode. >> >> Signed-off-by: Filipe Manana <fdman...@suse.com> > > > Thanks Filipe, looks like it goes all the way back to: > > commit 47059d930f0e002ff851beea87d738146804

Re: RedHat 7.4 Release Notes: "Btrfs has been deprecated" - wut?

2017-08-02 Thread Wang Shilong
I haven't seen active btrfs developers from some time, Redhat looks put most of their efforts on XFS, It is time to switch to SLES/opensuse! On Wed, Aug 2, 2017 at 4:38 PM, Brendan Hide wrote: > The title seems alarmist to me - and I suspect it is going to be >

Re: [PULL] Btrfs for 4.13, part 1

2017-06-24 Thread Wang Shilong
Sorry for bikeshedding. On Fri, Jun 23, 2017 at 11:16 PM, David Sterba wrote: > Hi, > > this is the main batch for 4.13. There are some user visible changes, see > below. The core updates improve error handling (mostly related to bios), with > the usual incremental work on the

[PATCH v2] btrfs-progs: du: fix to skip not btrfs dir/file

2016-07-07 Thread Wang Shilong
- //root/.bashrc 0.00B 0.00B - //root/.cshrc 0.00B 0.00B - //root/.tcshrc This works for me to analysis system usage and analysis performaces. Signed-off-by: Wang Shilong <wangshilong1...@gmail.com> --- v1->v2: remove extra un

Re: [PATCH] btrfs-progs: du: fix to skip not btrfs dir/file

2016-07-06 Thread Wang Shilong
On Wed, Jul 6, 2016 at 10:35 PM, Holger Hoffstätte <hol...@applied-asynchrony.com> wrote: > On 07/06/16 14:25, Wang Shilong wrote: >> 'btrfs file du' is a very useful tool to watch my system >> file usage with snapshot aware. >> >> when trying to run following c

[PATCH] btrfs-progs: du: fix to skip not btrfs dir/file

2016-07-06 Thread Wang Shilong
for me to analysis system usage and analysis performaces. Signed-off-by: Wang Shilong <wangshilong1...@gmail.com> --- cmds-fi-du.c | 11 ++- cmds-inspect.c | 2 +- utils.c| 8 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/cmds-fi-du.c b/cmds-f

Re: About in-band dedupe for v4.7

2016-05-12 Thread Wang Shilong
Hello Guys, I am commenting not because of Qu's patch, of course, Qu and Mark Fasheh Do a really good thing for Btrfs contributions. Just my two cents! 1) I think Currently, we should really focus on Btrfs stability, there are still many bugs hidden inside Btrfs, please See

Re: compression disk space saving - what are your results?

2015-12-02 Thread Wang Shilong
On Wed, Dec 2, 2015 at 9:53 PM, Tomasz Chmielewski wrote: > On 2015-12-02 22:03, Austin S Hemmelgarn wrote: > >>> From these numbers (124 GB used where data size is 153 GB), it appears >>> that we save around 20% with zlib compression enabled. >>> Is 20% reasonable saving for

Re: shall distros run btrfsck on boot?

2015-11-23 Thread Wang Shilong
On Tue, Nov 24, 2015 at 12:02 PM, Christoph Anton Mitterer wrote: > Hey. > > Short question since that came up on debian-devel. > > Now that btrfs check get's more and more useful, are the developers > going to recommend running it periodically on boot (of course that >

Re: [PATCH] Btrfs: fix wrong check for btrfs_force_chunk_alloc()

2015-06-30 Thread Wang Shilong
On Sun, Apr 12, 2015 at 7:35 AM, Wang Shilong wangshilong1...@gmail.com wrote: btrfs_force_chunk_alloc() return 1 for allocation chunk successfully. This problem exists since commit c87f08ca4. With this patch, we might fix some enospc problems for balances. Signed-off-by: Wang Shilong

[PATCH] Btrfs: fix wrong check for btrfs_force_chunk_alloc()

2015-04-12 Thread Wang Shilong
btrfs_force_chunk_alloc() return 1 for allocation chunk successfully. This problem exists since commit c87f08ca4. With this patch, we might fix some enospc problems for balances. Signed-off-by: Wang Shilong wangshilong1...@gmail.com --- fs/btrfs/relocation.c | 2 +- 1 file changed, 1 insertion

Re: Btrfs Send/Receive WARN_ON Cannot allocate memory And no such file or directory error

2015-03-17 Thread Wang Shilong
-- 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://vger.kernel.org/majordomo-info.html Best Regards, Wang Shilong -- To unsubscribe from this list: send the line unsubscribe linux-btrfs

Re: Btrfs Send/Receive WARN_ON Cannot allocate memory And no such file or directory error

2015-03-17 Thread Wang Shilong
On Tue, Mar 17, 2015 at 9:34 AM, Wang Shilong wangshilong1...@gmail.com wrote: Hi, Hi, I have been testing btrfs send/receive recently. I got an error send ioctl failed with -12: Cannot allocate memory on send side. WARN_ON happened on len PATH_MAX in fs_path_ensure_buf. I

Re: Is it safe or useful to use NOCOW flag and autodefrag mount option at same time?

2015-03-15 Thread Wang Shilong
, Wang Shilong Best regards, jploz As requested in the wiki basic information about my fresh setup attached: uname -a Linux hostname 3.16.0-4-686-pae #1 SMP Debian 3.16.7-ckt7-1 (2015-03-01) i686 GNU/Linux btrfs --version Btrfs v3.17 btrfs fi show Label: none uuid: cc6492e7

Re: btrfs performance, sudden drop to 0 IOPs

2015-02-12 Thread Wang Shilong
-- 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://vger.kernel.org/majordomo-info.html Best Regards, Wang Shilong -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body

Re: [PATCH 3/3] btrfs: qgroup: destroy related qgroup when removing subvolume if needed.

2015-01-21 Thread Wang Shilong
* - compressed * - sync -- 1.8.4.2 -- 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://vger.kernel.org/majordomo-info.html Best Regards, Wang Shilong -- To unsubscribe from this list

Re: [PATCH v3] btrfs-progs: make btrfs qgroups show human readable sizes

2015-01-18 Thread Wang Shilong
-btrfs in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Best Regards, Wang Shilong -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a message to majord...@vger.kernel.org More majordomo

Re: btrfs performance - ssd array

2015-01-17 Thread Wang Shilong
is very spiky and I can still see that CPU sys% is very high. As soon as the kworker threads start consuming CPU, the IOPs performance goes down again to some ~15 000 IOPs. Best Regards, Wang Shilong -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a message

Re: btrfs performance - ssd array

2015-01-12 Thread Wang Shilong
info at http://vger.kernel.org/majordomo-info.html Best Regards, Wang Shilong -- 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://vger.kernel.org/majordomo-info.html

Re: should I use btrfs on Centos 7 for a new production server?

2014-12-30 Thread Wang Shilong
. -- John Dewey -- 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://vger.kernel.org/majordomo-info.html Best Regards, Wang Shilong -- To unsubscribe from this list: send the line

Re: should I use btrfs on Centos 7 for a new production server?

2014-12-30 Thread Wang Shilong
majordomo info at http://vger.kernel.org/majordomo-info.html Best Regards, Wang Shilong Best Regards, Wang Shilong -- 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://vger.kernel.org/majordomo

[PATCH] Btrfs: call inode_dec_link_count() on mkdir error path

2014-12-23 Thread Wang Shilong
From: Wang Shilong wangshilong1...@gmail.com In btrfs_mkdir(), if it fails to create dir, we should clean up existed items, setting inode's link properly to make sure it could be cleaned up properly. Signed-off-by: Wang Shilong wangshilong1...@gmail.com --- fs/btrfs/inode.c | 4 +++- 1 file

Re: [BTRFS-PROGS][PATCH][CLEANUP] Remove some gotos

2014-12-21 Thread Wang Shilong
of code reviewers and newbies.. Merry Chirismas guys. ^_^ -- 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://vger.kernel.org/majordomo-info.html Best Regards, Wang Shilong

[PATCH v4] Btrfs: deal with all 'subvol=xxx' options once

2014-12-03 Thread Wang Shilong
by striping out all 'subvol=xxx' options, only last is valid. Signed-off-by: Wang Shilong wangshilong1...@gmail.com --- v3-v4: zero buffer to make sure strncat() work... --- fs/btrfs/super.c | 46 ++ 1 file changed, 26 insertions(+), 20 deletions(-) diff --git

Re: [PATCH v4 00/10] Implement device scrub/replace for RAID56

2014-12-02 Thread Wang Shilong
unsubscribe linux-btrfs in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Best Regards, Wang Shilong -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a message to majord...@vger.kernel.org More

[PATCH v2] Btrfs: deal with all 'subvol=xxx' options once

2014-11-25 Thread Wang Shilong
by striping out all 'subvol=xxx' options, only last is valid. Signed-off-by: Wang Shilong wangshilong1...@gmail.com --- v1-v2: error handling and comment update --- fs/btrfs/super.c | 26 +++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/fs/btrfs/super.c b/fs/btrfs

Re: [PATCH v2] Btrfs: deal with all 'subvol=xxx' options once

2014-11-25 Thread Wang Shilong
On Tue, Nov 25, 2014 at 04:20:11PM +0800, Wang Shilong wrote: Steps to reproduce: # mkfs.btrfs -f /dev/sdb # mount -t btrfs /dev/sdb /mnt # btrfs sub create /mnt/dir # mount -t btrfs /dev/sdb /mnt -o subvol=dir,subvol=dir It fails with: mount: mount(2) failed: No such file

[PATCH 0/3] Extent tree rebuilding with snapshots patches

2014-11-25 Thread Wang Shilong
-20141125 Wang Shilong (3): Btrfs-progs: fsck: deal with snapshot one by one when rebuilding extent tree Btrfs-progs: fsck: add ability to rebuild extent tree with snapshots Btrfs-progs, fsck: move root items repair after root rebuilding cmds-check.c | 412

[PATCH resend 2/3] Btrfs-progs: fsck: add ability to rebuild extent tree with snapshots

2014-11-25 Thread Wang Shilong
From: Wang Shilong wangsl.f...@cn.fujitsu.com This patch makes us to rebuild a really corrupt extent tree with snapshots. To implement this, we have to verify whether a block is FULL BACKREF. This idea come from Josef Bacik: 1) We walk down the original tree, every eb we encounter has

[PATCH resend 1/3] Btrfs-progs: fsck: deal with snapshot one by one when rebuilding extent tree

2014-11-25 Thread Wang Shilong
From: Wang Shilong wangsl.f...@cn.fujitsu.com Previously, we deal with node block firstly and then leaf block which can maximize readahead. However, to rebuild extent tree, we need deal with snapshot one by one. This patch makes us deal with snapshot one by one if we need rebuild extent tree

[PATCH 3/3] Btrfs-progs, fsck: move root items repair after root rebuilding

2014-11-25 Thread Wang Shilong
If some critical roots are corrupt, reapr_root_items() will fail, this is detected by fsck_tests.sh's extent rebuilding tests. Signed-off-by: Wang Shilong wangshilong1...@gmail.com --- cmds-check.c | 32 1 file changed, 16 insertions(+), 16 deletions(-) diff

[PATCH 3/3] Btrfs-progs, fsck: move root items repair after root rebuilding

2014-11-25 Thread Wang Shilong
If some critical roots are corrupt, reapr_root_items() will fail, this is detected by fsck_tests.sh's extent rebuilding tests. Signed-off-by: Wang Shilong wangshilong1...@gmail.com --- cmds-check.c | 32 1 file changed, 16 insertions(+), 16 deletions(-) diff

[PATCH resend 1/3] Btrfs-progs: fsck: deal with snapshot one by one when rebuilding extent tree

2014-11-25 Thread Wang Shilong
From: Wang Shilong wangsl.f...@cn.fujitsu.com Previously, we deal with node block firstly and then leaf block which can maximize readahead. However, to rebuild extent tree, we need deal with snapshot one by one. This patch makes us deal with snapshot one by one if we need rebuild extent tree

[PATCH 0/3] Extent tree rebuilding with snapshots patches

2014-11-25 Thread Wang Shilong
-20141125 Wang Shilong (3): Btrfs-progs: fsck: deal with snapshot one by one when rebuilding extent tree Btrfs-progs: fsck: add ability to rebuild extent tree with snapshots Btrfs-progs, fsck: move root items repair after root rebuilding cmds-check.c | 412

[PATCH resend 2/3] Btrfs-progs: fsck: add ability to rebuild extent tree with snapshots

2014-11-25 Thread Wang Shilong
From: Wang Shilong wangsl.f...@cn.fujitsu.com This patch makes us to rebuild a really corrupt extent tree with snapshots. To implement this, we have to verify whether a block is FULL BACKREF. This idea come from Josef Bacik: 1) We walk down the original tree, every eb we encounter has

Re: [PATCH 3/3] Btrfs-progs, fsck: move root items repair after root rebuilding

2014-11-25 Thread Wang Shilong
, root items also won't succeed. patches are based on David's integration-20141125 Wang Shilong (3): Btrfs-progs: fsck: deal with snapshot one by one when rebuilding extent tree Btrfs-progs: fsck: add ability to rebuild extent tree with snapshots Btrfs-progs, fsck: move root items

[PATCH] Btrfs: deal with all 'subvol=xxx' options once

2014-11-24 Thread Wang Shilong
by striping out all 'subvol=xxx' options, only last is valid. Signed-off-by: Wang Shilong wangshilong1...@gmail.com --- fs/btrfs/super.c | 20 +++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c index 54bd91e..2b2fa4b 100644 --- a/fs

Re: [PATCH] Btrfs: deal with all 'subvol=xxx' options once

2014-11-24 Thread Wang Shilong
this problem by striping out all 'subvol=xxx' options, only last is valid. Signed-off-by: Wang Shilong wangshilong1...@gmail.com --- fs/btrfs/super.c | 20 +++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c index 54bd91e

[PATCH v2] Btrfs: fix allocationg memory failure for btrfsic_state structure

2014-11-22 Thread Wang Shilong
array, so it will be good if we could allocate continuous pages here. Fix this problem by firstly trying kzalloc(), if we fail, use vzalloc() instead. Signed-off-by: Wang Shilong wangshilong1...@gmail.com --- v1-v2: include vmalloc.h and swith kvfree() helper. --- fs/btrfs/check-integrity.c

[PATCH] Btrfs: switch to kvfree() helper

2014-11-22 Thread Wang Shilong
A new helper kvfree() in mm/utils.c will do this. Signed-off-by: Wang Shilong wangshilong1...@gmail.com --- fs/btrfs/raid56.c | 13 +++-- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/fs/btrfs/raid56.c b/fs/btrfs/raid56.c index 6a41631..12e343b 100644 --- a/fs/btrfs

Re: Quota question

2014-11-12 Thread Wang Shilong
...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Best Regards, Wang Shilong -- 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://vger.kernel.org/majordomo

Re: request for info on the list of parameters to tweak for PCIe SSDs

2014-10-31 Thread Wang Shilong
, and feel free to let others know your results(i am also curious).^_^ Best Regards, Wang Shilong Hi, Could you kindly help us with the list of all the btrfs file system parameters , that can be tweaked for the best performance of the PCIe based SSDs ? Thanks, Lakshmi -- To unsubscribe

Re: Poll: time to switch skinny-metadata on by default?

2014-10-18 Thread Wang Shilong
...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Best Regards, Wang Shilong -- 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://vger.kernel.org/majordomo

Re: Poll: time to switch skinny-metadata on by default?

2014-10-18 Thread Wang Shilong
Sure, that is cool, let me know if i could give any help! I have an idle VM that could run btrfs tests there.^_^ Thanks I'll run this on Monday. Josef Wang Shilong wangshilong1...@gmail.com wrote: Hello Josef, With Skinny metadta and i running your btrfs-next repo for-suse branch

Re: [PATCH 1/2] Btrfs: check_int: use the known block location

2014-10-17 Thread Wang Shilong
the bio. Reported-by: Wang Shilong wangshilong1...@gmail.com Signed-off-by: Stefan Behrens sbehr...@giantdisaster.de This passed my Tests after applying both patches. Tested-by: Wang Shilong wangshilong1...@gmail.com --- fs/btrfs/check-integrity.c | 66

Re: [PATCH 2/2] Btrfs: check-int: don't complain about balanced blocks

2014-10-17 Thread Wang Shilong
The xfstest btrfs/014 which tests the balance operation caused that the check_int module complained that known blocks changed their physical location. Since this is not an error in this case, only print such message if the verbose mode was enabled. Reported-by: Wang Shilong wangshilong1

Re: [PATCH v2] Btrfs-progs: check, fix return value check of is_child_root()

2014-10-16 Thread Wang Shilong
of continuing. This affects only the 3.17 release candidates (3.16 and older releases don't have this issue). Signed-off-by: Filipe Manana fdman...@suse.com Thanks for Fixing this, Filipe! Reviewed-by: Wang Shilong wangshilong1...@gmail.com --- V2: Made it return 2 (instead of -1) when

Re: Problems running Balance and checking integrity concurrently.

2014-10-16 Thread Wang Shilong
Hi Stefan Behrens, Thanks very much for your attention! More stress tests will be followed and will give you feedbacks when finished. On Fri, 10 Oct 2014 21:35:02 +0800, Wang Shilong wrote: Hello, I have reproduced a problem with Btrfs integrity and balance using latest btrfs kernel

Problems running Balance and checking integrity concurrently.

2014-10-10 Thread Wang Shilong
in hash table, M, bytenr mismatch (!= stored 20968554496 I supposed there are some race problems between integrity check and Btrfs balance, could you guys please take a look at this issue! Best Regards, Wang Shilong -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body

[PATCH] Btrfs: fix allocationg memory failure for btrfsic_state structure

2014-10-10 Thread Wang Shilong
array, so it will be good if we could allocate continuous pages here. Fix this problem by firstly trying kzalloc(), if we fail, use vzalloc() instead. Signed-off-by: Wang Shilong wangshilong1...@gmail.com --- fs/btrfs/check-integrity.c | 16 +++- 1 file changed, 11 insertions(+), 5

[PATCH] Btrfs: fix incorrect compression ratio detection

2014-10-07 Thread Wang Shilong
and fall into nocompression directly. Signed-off-by: Wang Shilong wangshilong1...@gmail.com --- fs/btrfs/inode.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 344a322..b78e90a 100644 --- a/fs/btrfs/inode.c +++ b/fs

[PATCH] xfstests: add regression for inode bad compression ratio detection

2014-10-07 Thread Wang Shilong
This test add a regression test to make sure btrfs dosen't set inode NOCOMPRESS flag when a small write(=blocksize) happens. Signed-off-by: Wang Shilong wangshilong1...@gmail.com --- Test is a little relying on btrfs now have a max 128k limit write, not sure whether it is good since

[PATCH v2] xfstests: add regression for inode bad compression ratio detection

2014-10-07 Thread Wang Shilong
This test add a regression test to make sure btrfs dosen't set inode NOCOMPRESS flag when a small write(=blocksize) happens. Signed-off-by: Wang Shilong wangshilong1...@gmail.com --- v1-v2: switch _extent_count() helper. Test relies on btrfs have a max 128k limit write, not sure whether

[PATCH 1/2] xfstests,btrfs/010: use _extent_count() helper

2014-10-07 Thread Wang Shilong
cleanup to swith _extent_count(), this way we remove a dependence on filefrag. Signed-off-by: Wang Shilong wangshilong1...@gmail.com --- tests/btrfs/010 | 8 1 file changed, 4 insertions(+), 4 deletions(-) mode change 100755 = 100644 tests/btrfs/010 diff --git a/tests/btrfs/010 b

[PATCH 2/2] xfstests,btrfs/004: use FILEFRAG_PROG macro

2014-10-07 Thread Wang Shilong
Signed-off-by: Wang Shilong wangshilong1...@gmail.com --- i didn't find a way to remove filefrag here, but let us use macro firstly... --- tests/btrfs/004 | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/btrfs/004 b/tests/btrfs/004 index 1d5b816..1f59963 100755

Re: [PATCH 2/2] xfstests,btrfs/004: use FILEFRAG_PROG macro

2014-10-07 Thread Wang Shilong
Cc list On Wed, Oct 08, 2014 at 06:35:22AM -0400, Wang Shilong wrote: Signed-off-by: Wang Shilong wangshilong1...@gmail.com --- i didn't find a way to remove filefrag here, but let us use macro firstly... YOu shoul dbe able to use fiemap to calculate the same output. i.e

Re: btrfs rescue super-recover memory corruption

2014-09-18 Thread Wang Shilong
really work out what all this is all doing, but maybe the fix is obvious to Wang Shilong (who wrote the original code)? Though i no longer spend much time on btrfs, i will take a look at this. ^_^ Thanks Eric Thanks, -Eric Best Regards, Wang Shilong -- To unsubscribe from this list: send

[PATCH] Btrfs-progs: super-recover: fix double free fs_devices memory

2014-09-18 Thread Wang Shilong
: Eric Sandeen sand...@redhat.com Cc: Chris Murphy li...@colorremedies.com Signed-off-by: Wang Shilong wangshilong1...@gmail.com --- super-recover.c | 13 +++-- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/super-recover.c b/super-recover.c index 767de4b..419b86a 100644

Re: [PATCH] Btrfs: remove empty block groups automatically

2014-09-13 Thread Wang Shilong
btrfs_dev_stats_dirty(struct btrfs_device *dev) { -- 1.8.3.1 -- 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://vger.kernel.org/majordomo-info.html Best Regards, Wang Shilong -- To unsubscribe from

Re: [PATCH] Btrfs-progs: fix some build warnings on 32bit platform

2014-07-29 Thread Wang Shilong
Hi David, On Sun, Jul 27, 2014 at 12:49:55AM +0800, Wang Shilong wrote: cmds-restore.c:120:4: warning: format %lu expects argument of type long unsigned int, but argument 3 has type size_t [-Wformat=] fprintf(stderr, bad compress length %lu\n, in_len); --- a/cmds-restore.c +++ b/cmds

Re: [PATCH] Btrfs: Fix memory corruption by ulist_add_merge() on 32bit arch

2014-07-28 Thread Wang Shilong
Hi Takashi, This seems like a promising fix, i just have a little question: ulist_add() logic is we firstly cast a pointer to u64(see ptr_to_u64()), and then cast u64 to pointer back(u64_to_ptr()). So normally, arg u64 is actually a pointer. If the below overflow happens, that means casting

Re: Help with Project on brtfs wiki

2014-07-26 Thread Wang Shilong
Hi Hugo, Am Samstag, 26. Juli 2014, 11:05:03 schrieb Hugo Mills: I am not asking to hold my hand You are, though. Something like using grep to find code that (might be) related to the thing you're trying to work with is _fundamental_. You should expect to be reading the code --

[PATCH] Btrfs-progs: fix some build warnings on 32bit platform

2014-07-26 Thread Wang Shilong
of type long unsigned int, but argument 3 has type size_t [-Wformat=] fprintf(stderr, bad compress length %lu\n, in_len); ... BTW, this patch also switches other castings with new helpers. Signed-off-by: Wang Shilong wangshilong1...@gmail.com --- cmds-inspect.c | 4 ++-- cmds-restore.c | 2

[PATCH] Btrfs-progs: remove author and copyright info from man page

2014-07-24 Thread Wang Shilong
or significantly amend a page, add a copyright notice as a comment in the source file. If you are the author of a device driver and want to include an address for reporting bugs, place this under the BUGS section. ... Suggested-by: Satoru Takeuchi takeuchi_sat...@jp.fujitsu.com Signed-off-by: Wang Shilong

Re: btrfs_qgroup_create unused parameter

2014-07-24 Thread Wang Shilong
will be picked up by Chris and sent to Linus when next merge window is open. Since Chris is sometimes busy, patch merging is always delayed for some time. Thanks, Wang -Kevin On 07/04/2014 09:09 PM, Wang Shilong wrote: Hi I think you are right, @name here is unneeded.. You can give a patch

Re: [PATCH] Btrfs: fix compressed write corruption on enospc

2014-07-24 Thread Wang Shilong
On 07/24/2014 10:48 PM, Liu Bo wrote: When failing to allocate space for the whole compressed extent, we'll fallback to uncompressed IO, but we've forgotten to redirty the pages which belong to this compressed extent, and these 'clean' pages will simply skip 'submit' part and go to endio

Re: [PATCH] Btrfs: fix compressed write corruption on enospc

2014-07-24 Thread Wang Shilong
On 07/25/2014 10:08 AM, Liu Bo wrote: On Fri, Jul 25, 2014 at 09:53:43AM +0800, Wang Shilong wrote: On 07/24/2014 10:48 PM, Liu Bo wrote: When failing to allocate space for the whole compressed extent, we'll fallback to uncompressed IO, but we've forgotten to redirty the pages which belong

Re: [BUG] Quota Ignored On write problem still exist with 3.16-rc5

2014-07-22 Thread Wang Shilong
Hi Satoru-san, On 07/23/2014 08:53 AM, Satoru Takeuchi wrote: Hi Wang, (2014/07/18 19:29), Wang Shilong wrote: On 07/18/2014 04:45 PM, Satoru Takeuchi wrote: Hi Josef, Chris, I found Quota Ignored On write problem still exist with 3.16-rc5, which Kevin reported before. Kevin's report

Re: 1 week to rebuid 4x 3TB raid10 is a long time!

2014-07-21 Thread Wang Shilong
On 07/21/2014 10:00 PM, TM wrote: Wang Shilong wangsl.fnst at cn.fujitsu.com writes: Just my two cents: Since 'btrfs replace' support RADI10, I suppose using replace operation is better than 'device removal and add'. Another Question is related to btrfs snapshot-aware balance. How many

Re: 1 week to rebuid 4x 3TB raid10 is a long time!

2014-07-21 Thread Wang Shilong
On 07/21/2014 10:00 PM, TM wrote: Wang Shilong wangsl.fnst at cn.fujitsu.com writes: Just my two cents: Since 'btrfs replace' support RADI10, I suppose using replace operation is better than 'device removal and add'. Another Question is related to btrfs snapshot-aware balance. How many

Re: 1 week to rebuid 4x 3TB raid10 is a long time!

2014-07-20 Thread Wang Shilong
Hi, On 07/20/2014 04:45 PM, TM wrote: Hi, I have a raid10 with 4x 3TB disks on a microserver http://n40l.wikia.com/wiki/Base_Hardware_N54L , 8Gb RAM Recently one disk started to fail (smart errors), so I replaced it Mounted as degraded, added new disk, removed old Started yesterday I am

Re: [BUG] Quota Ignored On write problem still exist with 3.16-rc5

2014-07-18 Thread Wang Shilong
On 07/18/2014 04:45 PM, Satoru Takeuchi wrote: Hi Josef, Chris, I found Quota Ignored On write problem still exist with 3.16-rc5, which Kevin reported before. Kevin's report: https://www.mail-archive.com/linux-btrfs@vger.kernel.org/msg35292.html The result of bisect:

Re: `btrfsck: extent_io.c:612: free_extent_buffer: Assertion `!(eb-flags 1)' failed.` in `btrfsck`

2014-07-18 Thread Wang Shilong
Hi, There are some patches for fsck flighting, they are integrated in David's branches. You can pull from David's latest branch, and see if it helps: https://github.com/kdave/btrfs-progs integration-20140704 Have a try and see if it helps anyway. Thanks, Wang Hi together, I'm

[PATCH 6/6] Btrfs: fix wrong extent mapping for DirectIO

2014-07-16 Thread Wang Shilong
anything more. Signed-off-by: Wang Shilong wangsl.f...@cn.fujitsu.com --- fs/btrfs/inode.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index ed8b55c..d1ba5e4 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -6308,6 +6308,8 @@ next

[PATCH 3/6] Btrfs: fix off-by-one in cow_file_range_inline()

2014-07-16 Thread Wang Shilong
Btrfs could still inline file data if its size is same as page size, so don't skip max value here. Signed-off-by: Wang Shilong wangsl.f...@cn.fujitsu.com --- fs/btrfs/inode.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index e678391

[PATCH 4/6] Btrfs: fix wrong max inline data size limit

2014-07-16 Thread Wang Shilong
inline data is stored from offset of @disk_bytenr in struct btrfs_file_extent_item. So substracting total size of struct btrfs_file_extent_item is wrong, fix it. Signed-off-by: Wang Shilong wangsl.f...@cn.fujitsu.com --- fs/btrfs/ctree.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[PATCH 1/6] Btrfs: fix wrong skipping compression for an inode

2014-07-16 Thread Wang Shilong
-by: Wang Shilong wangsl.f...@cn.fujitsu.com --- fs/btrfs/inode.c | 25 - 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index a58f31c..20798f8 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -348,6 +348,23 @@ static

[PATCH 2/6] Btrfs: fall into nocompression codes quickly if possible

2014-07-16 Thread Wang Shilong
If flag NOCOMPRESS is set which means bad compression ratio, we could avoid call cow_file_range_async() for this case earlier. Signed-off-by: Wang Shilong wangsl.f...@cn.fujitsu.com --- fs/btrfs/inode.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/fs/btrfs/inode.c b/fs

[PATCH 5/6] Btrfs: fix wrong write range for filemap_fdatawrite_range()

2014-07-16 Thread Wang Shilong
filemap_fdatawrite_range() expect the third arg to be @end not @len, fix it. Signed-off-by: Wang Shilong wangsl.f...@cn.fujitsu.com --- fs/btrfs/inode.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index e2c3d63..ed8b55c 100644

Re: qgroup destroy / assign

2014-07-06 Thread Wang Shilong
Hi Kevin, On 07/05/2014 05:10 AM, Kevin Brandstatter wrote: how are qgroups accounted for? Are they specifially tied to one subvolume on creation? Qgroup implementation is aslo a little confusing for me at first:-) . Yes, a qgroup is created automatically tied to one subvolume on creation

Re: 3.15.1: kernel BUG at fs/btrfs/locking.c:269

2014-07-04 Thread Wang Shilong
On 07/04/2014 02:02 PM, Marc MERLIN wrote: On Fri, Jul 04, 2014 at 01:29:29PM +0800, Wang Shilong wrote: Well, I explained the problem, ext4 and others of course tell me which devid an error is on, hopefully btrfs will able to do so in the near future. So it is ok for you to print one of btrfs

Re: 3.15.1: kernel BUG at fs/btrfs/locking.c:269

2014-07-04 Thread Wang Shilong
On 07/04/2014 02:02 PM, Marc MERLIN wrote: On Fri, Jul 04, 2014 at 01:29:29PM +0800, Wang Shilong wrote: Well, I explained the problem, ext4 and others of course tell me which devid an error is on, hopefully btrfs will able to do so in the near future. So it is ok for you to print one of btrfs

Re: btrfs_qgroup_create unused parameter

2014-07-04 Thread Wang Shilong
Hi I think you are right, @name here is unneeded.. You can give a patch for that.^_^ Wang |The code is pasted below for convenience of reference, but in the function to create a qgruop, it taks a 4th parameter (char * name). I assume this is the name of the path to limit, however, i

Re: 3.15.1: kernel BUG at fs/btrfs/locking.c:269

2014-07-03 Thread Wang Shilong
On 07/03/2014 04:13 PM, Liu Bo wrote: On Wed, Jul 02, 2014 at 01:41:52PM -0700, Marc MERLIN wrote: This got triggered by an rsync I think. I'm not sure which of my btrfs FS has the issue yet since BUG_ON isn't very helpful as discussed earlier. [160562.925463] parent transid verify failed on

Re: 3.15.1: kernel BUG at fs/btrfs/locking.c:269

2014-07-03 Thread Wang Shilong
. On Fri, Jul 04, 2014 at 11:50:25AM +0800, Wang Shilong wrote: I am afraid, scrub maybe could not fix such kind of errors, all scrub doing is to verify whether checksums match and if possible use good mirrors to rewrite bad one. I wouldn't be bothered if scrub can't fix it, but it would be good

Re: 3.15.1: kernel BUG at fs/btrfs/locking.c:269

2014-07-03 Thread Wang Shilong
On 07/04/2014 11:07 AM, Liu Bo wrote: On Thu, Jul 03, 2014 at 06:44:21AM -0700, Marc MERLIN wrote: Thanks for the patch. Hopefully this will make it to the next 3.15.x kernel. I also went back to 3.14 anyway since the 'blocked for 120 seconds' look like another instance of deadlocks we've been

Re: [PATCH v5] btrfs: label should not contain return char

2014-07-01 Thread Wang Shilong
Hi Satoru and all, I think there maybe a leftover issue. That is if we don't set label, in default it will output a blank line. Steps to reproduce: # mkfs.btrfs -f /dev/sdb # mount /dev/sdb # cat /sys/fs/btrfs/uuid/label --an extra line will be outputed. This is because in btrfs_label_show(),

Re: [PATCH 1/2 v3 RESEND] Btrfs: device_list_add() should not update list when mounted

2014-07-01 Thread Wang Shilong
Hi Anand, Sorry for delay reply, more comments below: On 06/13/2014 12:26 PM, Anand Jain wrote: From: Anand Jain anand.j...@oracle.com device_list_add() is called when user runs btrfs dev scan, which would add any btrfs device into the btrfs_fs_devices list. Now think of a mounted btrfs. And

Re: [PATCH 2/2] btrfs: check generation as replace duplicates devid+uuid

2014-07-01 Thread Wang Shilong
Hi Anand, On 06/13/2014 12:26 PM, Anand Jain wrote: ..snip.. @@ -523,6 +523,16 @@ static noinline int device_list_add(const char *path, if (fs_devices-opened) return -EBUSY; + else { + /* +* That is

Re: [PATCH v6] btrfs: label should not contain return char

2014-07-01 Thread Wang Shilong
Hi Satoru, On 07/01/2014 04:00 PM, Satoru Takeuchi wrote: Hi Wang, (2014/07/01 15:46), Wang Shilong wrote: Hi Satoru and all, I think there maybe a leftover issue. That is if we don't set label, in default it will output a blank line. Steps to reproduce: # mkfs.btrfs -f /dev/sdb

Re: [PATCH v2] Btrfs: clear compress-force when remounting with compress option

2014-07-01 Thread Wang Shilong
On 07/02/2014 09:58 AM, Satoru Takeuchi wrote: (2014/07/02 1:04), David Sterba wrote: On Mon, Jun 30, 2014 at 10:51:25AM +0800, Wang Shilong wrote: Steps to reproduce: # mkfs.btrfs -f /dev/sdb # mount /dev/sdb /mnt -o compress-force=lzo # mount /dev/sdb /mnt -o remount,compress=zlib

Re: [PATCH 1/2 v3 RESEND] Btrfs: device_list_add() should not update list when mounted

2014-07-01 Thread Wang Shilong
On 07/02/2014 12:31 AM, Anand Jain wrote: Thanks for the commenting Wang. inline below. On 01/07/2014 15:16, Wang Shilong wrote: Hi Anand, Sorry for delay reply, more comments below: On 06/13/2014 12:26 PM, Anand Jain wrote: From: Anand Jain anand.j...@oracle.com [...] I agree we

Re: [PATCH 1/1] btrfs: looping 'mkfs.btrfs -f dev' may fail with EBUSY

2014-07-01 Thread Wang Shilong
On 06/12/2014 02:25 PM, Anand Jain wrote: The thread holding the O_EXCL flag seems to be BTRFS_IOC_SCAN_DEV ioctl, which in turn calls btrfs_scan_one_device() to open dev with the O_EXCL flag. But btrfs_scan_one_device() does not write anything to the disk. and it is called by . An

Re: [PATCH] Btrfs: fill_holes: Fix slot number passed to hole_mergeable() call.

2014-07-01 Thread Wang Shilong
, this looks good to me. Reviewed-by: Wang Shilong wangsl.f...@cn.fujitsu.com fs/btrfs/file.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index ad7c059..3cd7997 100644 --- a/fs/btrfs/file.c +++ b/fs/btrfs/file.c @@ -2126,10 +2126,9

Re: Scrub being stuck

2014-06-30 Thread Wang Shilong
On 06/30/2014 01:14 AM, Florian Lindner wrote: Hello, I've just completed a scrub on my home filesystem and now I wanted to start on my Archiv btrfs RAID 0. root@horus ~ # uname - a Linux horus 3.15.2-1-ARCH #1 SMP PREEMPT Fri Jun 27 07:41:19 CEST 2014 x86_64 GNU/Linux root@horus ~ # btrfs

[PATCH v2] Btrfs: clear compress-force when remounting with compress option

2014-06-29 Thread Wang Shilong
compress-force option separately. Fix this problem by clearing @FORCE_COMPRESS flag when remounting to compress=xxx. Suggested-by: Tsutomu Itoh t-i...@jp.fujitsu.com Signed-off-by: Wang Shilong wangsl.f...@cn.fujitsu.com --- v1-v2: remove unnecessary message output which was addressed by David

[PATCH] Btrfs: fix race between balance recovery and root deletion

2014-06-25 Thread Wang Shilong
by holding @cleaner_mutex when doing balance recovery. Signed-off-by: Wang Shilong wangsl.f...@cn.fujitsu.com --- fs/btrfs/disk-io.c | 2 ++ fs/btrfs/super.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 8bb4aa1..61d8e87 100644 --- a/fs/btrfs

  1   2   3   4   5   6   7   8   >