Re: [PATCH 00/67] btrfs-progs: add the stack prefix for the set/get

2018-01-23 Thread Lu Fengqi
On Tue, Jan 23, 2018 at 03:29:50PM +0100, David Sterba wrote: >On Thu, Jan 11, 2018 at 01:08:32PM +0800, Lu Fengqi wrote: >> These set/get functions defined by BTRFS_SETGET_STACK_FUNCS macro is >> missing the prefix stack. I can't add an extent buffer version set/get >> function as the result of th

Re: [PATCH v2] btrfs: remove spurious WARN_ON(ref->count < 0) in find_parent_nodes

2018-01-23 Thread Lu Fengqi
On Tue, Jan 23, 2018 at 10:22:09PM -0500, Zygo Blaxell wrote: >Until v4.14, this warning was very infrequent: > > WARNING: CPU: 3 PID: 18172 at fs/btrfs/backref.c:1391 > find_parent_nodes+0xc41/0x14e0 > Modules linked in: [...] > CPU: 3 PID: 18172 Comm: bees Tainted: G D W

[PATCH v2] btrfs: remove spurious WARN_ON(ref->count < 0) in find_parent_nodes

2018-01-23 Thread Zygo Blaxell
Until v4.14, this warning was very infrequent: WARNING: CPU: 3 PID: 18172 at fs/btrfs/backref.c:1391 find_parent_nodes+0xc41/0x14e0 Modules linked in: [...] CPU: 3 PID: 18172 Comm: bees Tainted: G D WL 4.11.9-zb64+ #1 Hardware name: System manufacturer Sy

[PATCH 2/2] btrfs-progs: test-mkfs: Output minimal device size

2018-01-23 Thread Qu Wenruo
To make debugging a little easier. Signed-off-by: Qu Wenruo --- tests/mkfs-tests/010-minimal-size/test.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/mkfs-tests/010-minimal-size/test.sh b/tests/mkfs-tests/010-minimal-size/test.sh index f75a22d8ff8d..f33b8aa399f4 100755 --- a/tests

[PATCH 1/2] btrfs-progs: mkfs: Fix minimal device size calculation for new temporary chunk layout

2018-01-23 Thread Qu Wenruo
Commit 0b2161becf8e ("btrfs-progs: mkfs: Prevent temporary system chunk to use space in reserved 1M range") changed the hard-coded temporary chunk layout to avoid the first 1M. However this also affects btrfs_min_dev_size() which still assume temporary chunks starts at device offset 0. This patch

[PATCH v2] btrfs-progs: Remove unnecessary parameter for btrfs_add_block_group

2018-01-23 Thread Qu Wenruo
@chunk_objectid of btrfs_make_block_group() function is always fixed to BTRFS_FIRST_FREE_OBJECTID, so there is no need to pass it as parameter explicitly. Signed-off-by: Qu Wenruo --- v2: Rebase to devel branch, as I introduced some conflict. --- cmds-check.c | 5 ++--- convert/main.c | 4

Re: Periodic frame losses when recording to btrfs volume with OBS

2018-01-23 Thread Duncan
ein posted on Tue, 23 Jan 2018 09:38:13 +0100 as excerpted: > On 01/22/2018 09:59 AM, Duncan wrote: >> >> And to tie up a loose end, xfs has somewhat different design principles >> and may well not be particularly sensitive to the dirty_* settings, >> while btrfs, due to COW and other design choi

Re: [PATCH] btrfs: remove spurious WARN_ON(ref->count) in find_parent_nodes

2018-01-23 Thread Lu Fengqi
On Tue, Jan 23, 2018 at 02:36:09PM -0700, Edmund Nadolski wrote: > > >On 01/23/2018 12:36 AM, Lu Fengqi wrote: >> On Mon, Jan 22, 2018 at 08:35:43PM -0700, Edmund Nadolski wrote: >>> On 1/22/18 5:58 AM, Nikolay Borisov wrote: On 21.01.2018 21:08, Zygo Blaxell wrote: > This warnin

Re: bad key ordering - repairable?

2018-01-23 Thread Chris Murphy
On Tue, Jan 23, 2018 at 5:51 AM, Austin S. Hemmelgarn wrote: > This is extremely important to understand. BTRFS and ZFS are essentially > the only filesystems available on Linux that actually validate things enough > to notice this reliably (ReFS on Windows probably does, and I think whatever >

Re: [PATCH 1/2] btrfs-progs: mkfs: Prevent temporary system chunk to use space in reserved 1M range

2018-01-23 Thread Qu Wenruo
On 2018年01月24日 00:42, David Sterba wrote: > On Wed, Jan 10, 2018 at 12:56:47PM +0800, Qu Wenruo wrote: >> When creating btrfs, mkfs.btrfs will firstly create a temporary system >> chunk as basis, and then created needed trees or new devices. >> >> However the layout temporary system chunk is hard

Re: bad key ordering - repairable?

2018-01-23 Thread Chris Murphy
On Tue, Jan 23, 2018 at 11:13 AM, Claes Fransson wrote: > I haven't noticed before that there is actually RAM-modules from > different vendors in the laptop. One 8GB by Samsung, and one 4GB by > Kingston! If they have the correct tolerances, I don't think it's a problem. Some memory controllers

Re: Superblock update: Is there really any benefits of updating synchronously?

2018-01-23 Thread Hans van Kranenburg
On 01/23/2018 08:51 PM, waxhead wrote: > Nikolay Borisov wrote: >> On 23.01.2018 16:20, Hans van Kranenburg wrote: [...] >>> >>> We also had a discussion about the "backup roots" that are stored >>> besides the superblock, and that they are "better than nothing" to help >>> maybe recover somethin

Re: [PATCH] btrfs: remove spurious WARN_ON(ref->count) in find_parent_nodes

2018-01-23 Thread Edmund Nadolski
On 01/23/2018 12:36 AM, Lu Fengqi wrote: > On Mon, Jan 22, 2018 at 08:35:43PM -0700, Edmund Nadolski wrote: >> On 1/22/18 5:58 AM, Nikolay Borisov wrote: >>> >>> >>> On 21.01.2018 21:08, Zygo Blaxell wrote: This warning appears during execution of the LOGICAL_INO ioctl and appears to be

Re: [PATCH] btrfs-progs: treewide: Replace strerror(errno) with %m.

2018-01-23 Thread Rosen Penev
On Tue, Jan 23, 2018 at 11:42 AM, David Sterba wrote: > On Sun, Jan 07, 2018 at 01:54:21PM -0800, Rosen Penev wrote: >> As btrfs is specific to Linux, %m can be used instead of strerror(errno) >> in format strings. This has some size reduction benefits for embedded >> systems. > > Makes sense. > >

Re: btrfs directory listing temporarily includes a recently removed file

2018-01-23 Thread Josef Bacik
On Tue, Jan 23, 2018 at 12:11:00PM -0500, Mike Gilbert wrote: > Hi all, > > I just wanted to draw some attention to a recent regression regarding > a race condition when listing directories on btrfs. Your assistance in > resolving this would be appreciated. > > https://bugzilla.kernel.org/show_bu

[PATCH] Btrfs: fix stale entries in readdir

2018-01-23 Thread Josef Bacik
From: Josef Bacik In fixing the readdir+pagefault deadlock I accidentally introduced a stale entry regression in readdir. If we get close to full for the temporary buffer, and then skip a few delayed deletions, and then try to add another entry that won't fit, we will emit the entries we found a

Re: Superblock update: Is there really any benefits of updating synchronously?

2018-01-23 Thread waxhead
Nikolay Borisov wrote: On 23.01.2018 16:20, Hans van Kranenburg wrote: On 01/23/2018 10:03 AM, Nikolay Borisov wrote: On 23.01.2018 09:03, waxhead wrote: Note: This have been mentioned before, but since I see some issues related to superblocks I think it would be good to bring up the ques

Re: [PATCH] btrfs-progs: treewide: Replace strerror(errno) with %m.

2018-01-23 Thread David Sterba
On Sun, Jan 07, 2018 at 01:54:21PM -0800, Rosen Penev wrote: > As btrfs is specific to Linux, %m can be used instead of strerror(errno) > in format strings. This has some size reduction benefits for embedded > systems. Makes sense. > glibc, musl, and uclibc-ng all support %m as a modifier to prin

Re: [PATCH 5/5] btrfs-progs: Remove unnecessary parameter for btrfs_add_block_group

2018-01-23 Thread David Sterba
On Wed, Jan 03, 2018 at 03:13:06PM +0800, Qu Wenruo wrote: > @chunk_objectid of btrfs_make_block_group() function is always fixed to > BTRFS_FIRST_FREE_OBJECTID, so there is no need to pass it as parameter > explicitly. > > Signed-off-by: Qu Wenruo Can you please refresh this patch on top of cur

Re: bad key ordering - repairable?

2018-01-23 Thread Claes Fransson
2018-01-23 14:06 GMT+01:00 Claes Fransson : > 2018-01-22 22:22 GMT+01:00 Hugo Mills : >> On Mon, Jan 22, 2018 at 10:06:58PM +0100, Claes Fransson wrote: >>> Hi! >>> >>> I really like the features of BTRFS, especially deduplication, >>> snapshotting and checksumming. However, when using it on my lap

Re: [PATCH 2/2] btrfs-progs: misc-test: Add test case to check if fi usage and show report consistent unallocated space

2018-01-23 Thread David Sterba
On Tue, Jan 09, 2018 at 08:21:29AM +0800, Qu Wenruo wrote: > On 2018年01月09日 03:39, David Sterba wrote: > > On Tue, Jan 02, 2018 at 02:33:15PM +0800, Qu Wenruo wrote: > >> Signed-off-by: Qu Wenruo > >> --- > >> tests/misc-tests/028-fi-usage-cross-check/test.sh | 46 > >> +++ >

btrfs directory listing temporarily includes a recently removed file

2018-01-23 Thread Mike Gilbert
Hi all, I just wanted to draw some attention to a recent regression regarding a race condition when listing directories on btrfs. Your assistance in resolving this would be appreciated. https://bugzilla.kernel.org/show_bug.cgi?id=198483 -- To unsubscribe from this list: send the line "unsubscribe

Re: [PATCH 1/2] btrfs-progs: mkfs: Prevent temporary system chunk to use space in reserved 1M range

2018-01-23 Thread David Sterba
On Wed, Jan 10, 2018 at 12:56:47PM +0800, Qu Wenruo wrote: > When creating btrfs, mkfs.btrfs will firstly create a temporary system > chunk as basis, and then created needed trees or new devices. > > However the layout temporary system chunk is hard-coded and uses > reserved [0, 1M) range of devid

Re: [PATCH 0/7] Misc btrfs-progs cleanups/fixes

2018-01-23 Thread David Sterba
On Mon, Jan 15, 2018 at 11:17:33AM +0200, Nikolay Borisov wrote: > On 5.12.2017 10:39, Nikolay Borisov wrote: > > Here is a series doing some minor code cleanups, hopefully making the code > > more idiomatic and easier to follow. They should be pretty low-risk and > > introduce no functional cha

Re: [PATCH 6/7] btrfs-progs: Add test for super block recovery

2018-01-23 Thread David Sterba
On Tue, Jan 23, 2018 at 05:29:57PM +0200, Nikolay Borisov wrote: > On 23.01.2018 17:07, David Sterba wrote: > > On Tue, Dec 05, 2017 at 12:04:49PM +0200, Nikolay Borisov wrote: > --- /dev/null > +++ b/tests/fsck-tests/029-superblock-recovery/test.sh > @@ -0,0 +1,64 @@ > +#!/bin/

Re: [PATCH 6/7] btrfs-progs: Add test for super block recovery

2018-01-23 Thread Nikolay Borisov
On 23.01.2018 17:07, David Sterba wrote: > On Tue, Dec 05, 2017 at 12:04:49PM +0200, Nikolay Borisov wrote: --- /dev/null +++ b/tests/fsck-tests/029-superblock-recovery/test.sh @@ -0,0 +1,64 @@ +#!/bin/bash +# Test that any superblock is correctly detected +# and fix

Re: [PATCH 6/7] btrfs-progs: Add test for super block recovery

2018-01-23 Thread David Sterba
On Tue, Dec 05, 2017 at 12:04:49PM +0200, Nikolay Borisov wrote: > >> --- /dev/null > >> +++ b/tests/fsck-tests/029-superblock-recovery/test.sh > >> @@ -0,0 +1,64 @@ > >> +#!/bin/bash > >> +# Test that any superblock is correctly detected > >> +# and fixed by btrfs rescue > >> + > >> +source "$TOP/

Re: Superblock update: Is there really any benefits of updating synchronously?

2018-01-23 Thread Nikolay Borisov
On 23.01.2018 16:20, Hans van Kranenburg wrote: > On 01/23/2018 10:03 AM, Nikolay Borisov wrote: >> >> On 23.01.2018 09:03, waxhead wrote: >>> Note: This have been mentioned before, but since I see some issues >>> related to superblocks I think it would be good to bring up the question >>> again.

Re: [PATCH 00/67] btrfs-progs: add the stack prefix for the set/get

2018-01-23 Thread David Sterba
On Thu, Jan 11, 2018 at 01:08:32PM +0800, Lu Fengqi wrote: > These set/get functions defined by BTRFS_SETGET_STACK_FUNCS macro is > missing the prefix stack. I can't add an extent buffer version set/get > function as the result of the function name conflict. Why do you need to add the extent buffe

Re: Superblock update: Is there really any benefits of updating synchronously?

2018-01-23 Thread Hans van Kranenburg
On 01/23/2018 10:03 AM, Nikolay Borisov wrote: > > On 23.01.2018 09:03, waxhead wrote: >> Note: This have been mentioned before, but since I see some issues >> related to superblocks I think it would be good to bring up the question >> again. >> >> [...] >> https://btrfs.wiki.kernel.org/index.php/

Re: bad key ordering - repairable?

2018-01-23 Thread Claes Fransson
2018-01-23 13:51 GMT+01:00 Austin S. Hemmelgarn : > On 2018-01-22 21:35, Chris Murphy wrote: >> >> On Mon, Jan 22, 2018 at 2:06 PM, Claes Fransson >> wrote: >>> >>> Hi! >>> >>> I really like the features of BTRFS, especially deduplication, >>> snapshotting and checksumming. However, when using it

Re: bad key ordering - repairable?

2018-01-23 Thread Claes Fransson
2018-01-23 3:35 GMT+01:00 Chris Murphy : > On Mon, Jan 22, 2018 at 2:06 PM, Claes Fransson > wrote: >> Hi! >> >> I really like the features of BTRFS, especially deduplication, >> snapshotting and checksumming. However, when using it on my laptop the >> last couple of years, it has became corrupted

Re: bad key ordering - repairable?

2018-01-23 Thread Claes Fransson
2018-01-22 22:22 GMT+01:00 Hugo Mills : > On Mon, Jan 22, 2018 at 10:06:58PM +0100, Claes Fransson wrote: >> Hi! >> >> I really like the features of BTRFS, especially deduplication, >> snapshotting and checksumming. However, when using it on my laptop the >> last couple of years, it has became corr

Re: bad key ordering - repairable?

2018-01-23 Thread Austin S. Hemmelgarn
On 2018-01-22 21:35, Chris Murphy wrote: On Mon, Jan 22, 2018 at 2:06 PM, Claes Fransson wrote: Hi! I really like the features of BTRFS, especially deduplication, snapshotting and checksumming. However, when using it on my laptop the last couple of years, it has became corrupted a lot of times

[PATCH] btrfs: Use schedule_timeout_interruptible

2018-01-23 Thread Nikolay Borisov
Instead of manually fiddling with the state of the task (RUNNING->INTERRUPTIBLE->RUNNING) again just use schedule_timeout_interruptible which adjusts the task state as needed. No functional changes. Signed-off-by: Nikolay Borisov --- fs/btrfs/disk-io.c | 4 +--- 1 file changed, 1 insertion(+), 3

Re: Superblock update: Is there really any benefits of updating synchronously?

2018-01-23 Thread Nikolay Borisov
On 23.01.2018 09:03, waxhead wrote: > Note: This have been mentioned before, but since I see some issues > related to superblocks I think it would be good to bring up the question > again. > > According to the information found in the wiki: > https://btrfs.wiki.kernel.org/index.php/On-disk_Forma

Re: Periodic frame losses when recording to btrfs volume with OBS

2018-01-23 Thread ein
On 01/22/2018 09:59 AM, Duncan wrote: > Sebastian Ochmann posted on Sun, 21 Jan 2018 16:27:55 +0100 as excerpted: > [...] > On 2018年01月20日 18:47, Sebastian Ochmann wrote: Hello, I would like to describe a real-world use case where btrfs does not perform well for me. I'm reco