Received: by 10.213.65.68 with SMTP id h4csp390533imn; Fri, 16 Mar 2018 06:26:01 -0700 (PDT) X-Google-Smtp-Source: AG47ELvNEjrvYfnVJw3EHTmS4KQz5p2n7SAtEtYM8PZXV+GmzCNyeg3K8Fk2cNGeK3jhTyT/y6Mp X-Received: by 2002:a17:902:b10c:: with SMTP id q12-v6mr2204428plr.197.1521206761048; Fri, 16 Mar 2018 06:26:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521206761; cv=none; d=google.com; s=arc-20160816; b=ycApv8FXZTFr9JONDVZZBNpwFSF3tpRi+tz1QmFU7oZuaZrEIYlTaqo6iWJZeq1f9J 8CTYJxscb8v6FdGKrhJm9lf+9TA4TAwUhbsuiA3oZaLU1di2yaCnMv4CyJ2TbgxsUMmp mm0ttlo6M9cMsWBcQy6GoMAOnhYZjKSq4jAiEusK4AVRTKREW5FC68oV0VRu6vfnSBea +9kTSYtsgnPsk4oz52wpT4C3WpGKhElt+AZxzvyiuH2jal1Fiut8KamnU34wx3uLvw0H CvDuXbOYM6XE/uLYhu1G9GD655h6ItcySZnsZ6LSAw1g08E0eIQ8HdgePe8k9cFX9ywZ Yvgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:mail-followup-to :reply-to:message-id:subject:cc:to:from:date :arc-authentication-results; bh=mAIlOlfRKInv63fTmT6G9/y4B7bsKlpBUVwqbSqOo0U=; b=by7a0TcV2le2ite6FF+ibuXjXpu0N7XAr5NsO5Grf71Cv2OmGJRiaY+0gzbYgVk9qb VWd2uyWgK81CgFxeYogXgPvX/qj+H3cXPgTyXS5U3TWS5cNu1Ml3JLpu0NhaLBAgVHKs ZHI6+FDeU5jhyK/zb0RXhCDIfQ2iyrNsJYfFZd7qAsEPO9KHP+ut9jAQv1VnJqngplCH YKrKr81XjV/nQS6a/Wq4oIJhoWqZ4nDa5RE06MxggxbWv7LgFN+XWpKCrKFzeVfl/yUr IhoGBE1li6iKFrJCVgOz0XYDQb8HPSQlL4qGnjCJo6Wjpe6cxom8Hsz9/Fb5EXD/cDYQ gIjw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a6-v6si5846423pll.406.2018.03.16.06.25.46; Fri, 16 Mar 2018 06:26:01 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753042AbeCPNY3 (ORCPT + 99 others); Fri, 16 Mar 2018 09:24:29 -0400 Received: from mx2.suse.de ([195.135.220.15]:51861 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752946AbeCPNY1 (ORCPT ); Fri, 16 Mar 2018 09:24:27 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 67936AE6C; Fri, 16 Mar 2018 13:24:25 +0000 (UTC) Received: by ds.suse.cz (Postfix, from userid 10065) id 96237DA828; Fri, 16 Mar 2018 14:22:02 +0100 (CET) Date: Fri, 16 Mar 2018 14:22:02 +0100 From: David Sterba To: Greg Kroah-Hartman Cc: Christoph Biedl , linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org, Anand Jain , Liu Bo , David Sterba Subject: Re: [PATCH 4.14 024/110] btrfs: use proper endianness accessors for super_copy Message-ID: <20180316132202.GB8297@twin.jikos.cz> Reply-To: dsterba@suse.cz Mail-Followup-To: dsterba@suse.cz, Greg Kroah-Hartman , Christoph Biedl , linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org, Anand Jain , Liu Bo , David Sterba References: <20180307191039.748351103@linuxfoundation.org> <20180307191042.810088712@linuxfoundation.org> <1521139304@msgid.manchmal.in-ulm.de> <20180316123049.GC25079@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180316123049.GC25079@kroah.com> User-Agent: Mutt/1.5.23.1 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Mar 16, 2018 at 01:30:49PM +0100, Greg Kroah-Hartman wrote: > On Thu, Mar 15, 2018 at 07:55:42PM +0100, Christoph Biedl wrote: > > Greg Kroah-Hartman wrote... > > > > > 4.14-stable review patch. If anyone has any objections, please let me know. > > > > > commit 3c181c12c431fe33b669410d663beb9cceefcd1b upstream. > > (...) > > > > > If the filesystem is always used on a same endian host, this will not > > > be a problem. > > > > >From my observations I cannot quite subscribe to that. > > > > On big-endian systems, this change intruduces severe corruption, > > resulting in complete loss of the data on the used block device. > > > > Steps to reproduce (tested on ppc/powerpc and parisc/hppa): > > > > # mkfs.btrfs $DEV > > # mount $DEV /mnt/tmp/ > > # umount /mnt/tmp/ > > > > This simple umount corrupts the file system: > > > > # mount $DEV /mnt/tmp/ > > mount: /mnt/tmp: wrong fs type, bad option, bad superblock on $DEV, missing codepage or helper program, or other error. > > > > # dmesg: > > BTRFS critical (device ): unable to find logical 4294967296 length 4096 > > BTRFS critical (device ): unable to find logical 4294967296 length 4096 > > BTRFS critical (device ): unable to find logical 18102363734671360 length 16384 > > BTRFS error (device ): failed to read chunk root > > BTRFS error (device ): open_ctree failed > > > > Also fsck is of no help: > > > > # btrfsck $DEV > > Couldn't map the block 18102363734671360 > > No mapping for 18102363734671360-18102363734687744 > > Couldn't map the block 18102363734671360 > > bytenr mismatch, want=18102363734671360, have=0 > > ERROR: cannot read chunk root > > ERROR: cannot open file system > > > > > > Trying mount or fsck on a little-endian system does not help either. So > > I consider the data on that device lost - luckily I use btrfs only for > > files where a backup exists all the time. > > > > > > Reverting that change restored the previous error-free behaviour. I > > didn't check HEAD, i.e. v4.16-rc5, since the upstream commt was the last > > that affected these files. Still I could give this a try if anybody > > wishes so. > > That sucks. Can you test Linus's tree to verify the problem is there? > I'll gladly revert this if Linus's tree also gets the revert, I don't > want you to hit this when you upgrade to a newer kernel. I'll push a fix for the upcoming rc but I think it would be better to remove the broken patch from stable kernels ASAP, so I'd recommend to revert it now.