Since we no longer use the old method, which use inode page cache and
could cause serious data corruption for compressed nodatasum extent, to
fixup nodatasum error during scrub/replace, remove all related code.
Signed-off-by: Qu Wenruo
---
fs/btrfs/scrub.c | 234 -
In commit ac0b4145d662 ("btrfs: scrub: Don't use inode pages for device
replace") we removed the branch of copy_nocow_pages() to avoid
corruption for compressed nodatasum extents.
However above commit only solves the problem in scrub_extent(), if
during scrub_pages() we failed to read some pages,
On 2018年07月05日 03:20, Stéphane Lesimple wrote:
> We reuse the task_position enum and task_ctx struct of the original progress
> indicator, adding more values and fields for our needs.
>
> Then add hooks in all steps of the check to properly record progress.
>
> Signed-off-by: Stéphane Lesimple
On Wed, Jul 11, 2018 at 12:07:05PM +0800, Su Yue wrote:
> > So, I went back to https://github.com/Damenly/btrfs-progs.git/tmp1 and
> > I'm running it without the extra options you added with hardcoded stuff:
> > gargamel:/var/local/src/btrfs-progs.sy-test# ./btrfsck --mode=lowmem
> > --repair /dev
On 07/11/2018 11:36 AM, Marc MERLIN wrote:
On Wed, Jul 11, 2018 at 09:58:36AM +0800, Su Yue wrote:
On 07/11/2018 09:44 AM, Marc MERLIN wrote:
On Wed, Jul 11, 2018 at 09:08:40AM +0800, Su Yue wrote:
On 07/11/2018 08:58 AM, Marc MERLIN wrote:
On Wed, Jul 11, 2018 at 08:53:58AM +0800, Su
On Wed, Jul 11, 2018 at 09:58:36AM +0800, Su Yue wrote:
>
>
> On 07/11/2018 09:44 AM, Marc MERLIN wrote:
> > On Wed, Jul 11, 2018 at 09:08:40AM +0800, Su Yue wrote:
> > >
> > >
> > > On 07/11/2018 08:58 AM, Marc MERLIN wrote:
> > > > On Wed, Jul 11, 2018 at 08:53:58AM +0800, Su Yue wrote:
> > >
On 07/11/2018 09:44 AM, Marc MERLIN wrote:
On Wed, Jul 11, 2018 at 09:08:40AM +0800, Su Yue wrote:
On 07/11/2018 08:58 AM, Marc MERLIN wrote:
On Wed, Jul 11, 2018 at 08:53:58AM +0800, Su Yue wrote:
Problems
1) btrfs check --repair _still_ takes all 32GB of RAM and crashes the
server, desp
On Wed, Jul 11, 2018 at 09:08:40AM +0800, Su Yue wrote:
>
>
> On 07/11/2018 08:58 AM, Marc MERLIN wrote:
> > On Wed, Jul 11, 2018 at 08:53:58AM +0800, Su Yue wrote:
> > > > Problems
> > > > 1) btrfs check --repair _still_ takes all 32GB of RAM and crashes the
> > > > server, despite my deleting l
fs_devices is always passed to btrfs_scan_one_device which
overrides it. And in the call stack below fs_devices is passed to
btrfs_scan_one_device from btrfs_mount_root.
And in btrfs_mount_root the output fs_devices of this call stack
is not used.
btrfs_mount_root
-> btrfs_parse_early_optio
Instead of pointer to btrfs_fs_devices as an arg in
btrfs_scan_one_device, better to make it as a return value.
Signed-off-by: Gu Jinxiang
---
Changelog:
v3: as comment by robot, use PTR_ERR_OR_ZERO, and rebase to misc-next.
v2: as comment by Nikolay, use ERR_CAST instead of cast type manually.
On 07/11/2018 08:58 AM, Marc MERLIN wrote:
On Wed, Jul 11, 2018 at 08:53:58AM +0800, Su Yue wrote:
Problems
1) btrfs check --repair _still_ takes all 32GB of RAM and crashes the
server, despite my deleting lots of snapshots.
Is it because I have too many files then?
Yes. Original check firs
On 07/10/2018 06:53 PM, Su Yue wrote:
On 07/10/2018 12:10 PM, Marc MERLIN wrote:
On Tue, Jul 10, 2018 at 08:56:15AM +0800, Su Yue wrote:
I'm just not clear if my FS is still damaged and btrfsck was just
hacked to
ignore the damage it can't deal with, or whether it was able to repair
thing
On Wed, Jul 11, 2018 at 08:53:58AM +0800, Su Yue wrote:
> > Problems
> > 1) btrfs check --repair _still_ takes all 32GB of RAM and crashes the
> > server, despite my deleting lots of snapshots.
> > Is it because I have too many files then?
> >
> Yes. Original check first gather all infomation abou
On 07/11/2018 02:09 AM, Marc MERLIN wrote:
Thanks to Su and Qu, I was able to get my filesystem to a point that
it's mountable.
I then deleted loads of snapshots and I'm down to 26.
IT now looks like this:
gargamel:~# btrfs fi show /mnt/mnt
Label: 'dshelf2' uuid: 0f1a0c9f-4e54-4fa7-8736-fd50
Hi,
I can reproduce the below circular locking warning [1] using the test
case btrfs/161. It can also be reproduced with 4.1 kernel so its not
due to any of the recent patches.
And this warning is unreasonable too .. here is why.
From [1], Thread #0 is when mounting the sprout device, and thr
When we add a device to the RO mounted seed device, it becomes a
RW sprout FS. The following steps are used to hold the seed and
sprout fs_devices.
(first two steps are not mandatory for the sprouting, they are there
to ensure the seed device remains in the scanned state)
. Clone the (mounted)
Top of the day to you, this is in respect of a very beneficial transaction
which you would not want to let go reply for more details,
Regards,
Lee
--
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 a
Hello,
syzbot has tested the proposed patch and the reproducer did not trigger
crash:
Reported-and-tested-by:
syzbot+909a5177749d7990f...@syzkaller.appspotmail.com
Tested on:
commit: d38c078c856c btrfs: add helper function check device delet..
git tree: https://github.com/a
#syz test: https://github.com/asj/btrfs-devel.git misc-next
On 06/06/2018 09:17 PM, syzbot wrote:
Hello,
syzbot found the following crash on:
HEAD commit: af6c5d5e01ad Merge branch 'for-4.18' of
git://git.kernel.o..
git tree: upstream
console output: https://syzkaller.appspot.com
Thanks to Su and Qu, I was able to get my filesystem to a point that
it's mountable.
I then deleted loads of snapshots and I'm down to 26.
IT now looks like this:
gargamel:~# btrfs fi show /mnt/mnt
Label: 'dshelf2' uuid: 0f1a0c9f-4e54-4fa7-8736-fd50818ff73d
Total devices 1 FS bytes used 1
#syz test: git://g...@github.com:asj/btrfs-devel.git misc-next
"git://g...@github.com:asj/btrfs-devel.git" does not look like a valid git
repo address.
On 06/06/2018 09:17 PM, syzbot wrote:
Hello,
syzbot found the following crash on:
HEAD commit: af6c5d5e01ad Merge branch 'fo
#syz test: git://g...@github.com:asj/btrfs-devel.git misc-next
On 06/06/2018 09:17 PM, syzbot wrote:
Hello,
syzbot found the following crash on:
HEAD commit: af6c5d5e01ad Merge branch 'for-4.18' of
git://git.kernel.o..
git tree: upstream
console output: https://syzkaller.appspot
When we add a device to the RO mounted seed device, it becomes a
RW sprout FS. The following steps are used to hold the seed and
sprout fs_devices.
(first two steps are not mandatory for the sprouting, they are there
to ensure the seed device remains in the scanned state)
. Clone the (mounted)
In preparation to de-duplicate a section of code where we deduce the
num_devices, use warn instead of bug.
Signed-off-by: Anand Jain
---
fs/btrfs/volumes.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index eb78bb8d1108..ce6faeb8bcf8
Move the section of the code which performs the check if the device is
indelible, move that into a helper function.
Signed-off-by: Anand Jain
---
fs/btrfs/volumes.c | 49 ++---
1 file changed, 30 insertions(+), 19 deletions(-)
diff --git a/fs/btrfs/vo
When the replace is running the fs_devices::num_devices also includes
the replace device, however in some operations like device delete and
balance it needs the actual num_devices without the repalce devices, so
now the function btrfs_num_devices() just provides that.
Signed-off-by: Anand Jain
--
On 07/10/2018 06:41 PM, David Sterba wrote:
On Mon, Jul 09, 2018 at 04:33:52PM +0800, Anand Jain wrote:
No functional change, bring the clone of fs_devices and its
operations closer, so that it indicates its purpose.
Also add a comment to indicate why we clone the fs_devices.
Signed-off-by:
From: kbuild test robot
fs/btrfs/super.c:2243:8-14: WARNING: PTR_ERR_OR_ZERO can be used
Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR
Generated by: scripts/coccinelle/api/ptr_ret.cocci
Fixes: 193ea416dc5e ("btrfs: get fs_devices pointer form btrfs_scan_one_device")
CC: Gu Jinxia
/Gu-Jinxiang/btrfs-make-fs_devices-to-be-a-local-variable/20180710-191730
coccinelle warnings: (new ones prefixed by >>)
>> fs/btrfs/super.c:2243:8-14: WARNING: PTR_ERR_OR_ZERO can be used
Please review and possibly fold the followup patch.
---
0-DAY kernel test infrastructure
On Wed, Jul 04, 2018 at 05:54:56PM +, Xu, Wen wrote:
> Hi BTRFS developers,
>
> Here are a list of new issues I found:
Thanks for sending the list to the list, hopefully this will make the
bugs more visible as bugzilla gets low attention otherwise.
--
To unsubscribe from this list: send the l
On Mon, Jul 09, 2018 at 04:33:52PM +0800, Anand Jain wrote:
> No functional change, bring the clone of fs_devices and its
> operations closer, so that it indicates its purpose.
>
> Also add a comment to indicate why we clone the fs_devices.
>
> Signed-off-by: Anand Jain
> ---
> fs/btrfs/volumes
On 07/10/2018 12:55 PM, Qu Wenruo wrote:
On 2018年07月10日 11:50, Marc MERLIN wrote:
On Tue, Jul 10, 2018 at 09:34:36AM +0800, Qu Wenruo wrote:
Ok, this is where I am now:
WARNING: debug: end of checking extent item[18457780273152 169 1]
type: 176 offset: 2
checking extent items [184577802731
Duplicate one, please ignore this.
> -Original Message-
> From: linux-btrfs-ow...@vger.kernel.org
> [mailto:linux-btrfs-ow...@vger.kernel.org] On Behalf Of Gu Jinxiang
> Sent: Tuesday, July 10, 2018 6:27 PM
> To: linux-btrfs@vger.kernel.org
> Cc: nbori...@suse.com
> Subject: [PATCH 2/2] b
On Mon, Jul 09, 2018 at 02:52:54PM +0800, Qu Wenruo wrote:
> This function is never used by any one in kernel, just remove it.
It's good to note when and why the function got unused. In this case
it's after removal of alloc_start mount option in
0d0c71b317207082856f40dbe8a2bac813f49677 "btrfs: obs
fs_devices is always passed to btrfs_scan_one_device which
overrides it. And in the call stack below fs_devices is passed to
btrfs_scan_one_device from btrfs_mount_root.
And in btrfs_mount_root the output fs_devices of this call stack
is not used.
btrfs_mount_root
-> btrfs_parse_early_optio
Instead of pointer to btrfs_fs_devices as an arg in
btrfs_scan_one_device, better to make it as a return value.
Signed-off-by: Gu Jinxiang
---
fs/btrfs/super.c | 29 ++---
fs/btrfs/volumes.c | 14 +++---
fs/btrfs/volumes.h | 4 ++--
3 files changed, 27 insertio
Instead of pointer to btrfs_fs_devices as an arg in
btrfs_scan_one_device, better to make it as a return value.
Signed-off-by: Gu Jinxiang
---
changelog:
v2: as comment by Nikolay, use ERR_CAST instead of cast type manually.
fs/btrfs/super.c | 29 ++---
fs/btrfs/volum
On Mon, Jul 09, 2018 at 02:39:15PM +0800, Gu Jinxiang wrote:
> Since parameter flags is no more used since
> commit d7407606564c ("btrfs: split parse_early_options() in two"),
> remove it.
Please be more specific about the function whre you remove the argument,
something like
"remove unused param
On 10.07.2018 09:04 Pete wrote:
> I've just had the error in the subject which caused the file system to
> go read-only.
>
> Further part of error message:
> WARNING: CPU: 14 PID: 1351 at fs/btrfs/extent-tree.c:3076
> btrfs_run_delayed_refs*0x163/0x190
>
> 'Screenshot' here:
> https://drive.google.
On 10.07.2018 10:14, Qu Wenruo wrote:
>
>
> On 2018年07月10日 15:00, Nikolay Borisov wrote:
>>
>>
>> On 10.07.2018 08:57, Qu Wenruo wrote:
>>> When we need to fixup error blocks during scrub/dev-replace for
>>> nodatasum extents, we still goes through the inode page cache and write
>>> them back
On 10.07.2018 09:33, Gu Jinxiang wrote:
> Instead of pointer to btrfs_fs_devices as an arg in
> btrfs_scan_one_device, better to make it as a return value.
>
> Signed-off-by: Gu Jinxiang
> ---
> fs/btrfs/super.c | 29 ++---
> fs/btrfs/volumes.c | 14 +++---
>
On 2018年07月10日 15:00, Nikolay Borisov wrote:
>
>
> On 10.07.2018 08:57, Qu Wenruo wrote:
>> When we need to fixup error blocks during scrub/dev-replace for
>> nodatasum extents, we still goes through the inode page cache and write
>> them back onto disk.
>>
>> It's already proved that such usa
I've just had the error in the subject which caused the file system to
go read-only.
Further part of error message:
WARNING: CPU: 14 PID: 1351 at fs/btrfs/extent-tree.c:3076
btrfs_run_delayed_refs*0x163/0x190
'Screenshot' here:
https://drive.google.com/file/d/1qw7TE1bec8BKcmffrOmg2LS15IOq8Jwc/vie
On 10.07.2018 09:33, Gu Jinxiang wrote:
> Since output parameter fs_devices of btrfs_parse_early_options is
> not used in the caller, make it be a local variable.
The changelog is a bit misleading, because 'fs_devices' is in fact used
in the caller, however it's always passed to btrfs_scan_one_
On 10.07.2018 08:57, Qu Wenruo wrote:
> When we need to fixup error blocks during scrub/dev-replace for
> nodatasum extents, we still goes through the inode page cache and write
> them back onto disk.
>
> It's already proved that such usage of on-disk data could lead to
> serious data corruptio
45 matches
Mail list logo