Received: by 10.213.65.68 with SMTP id h4csp360133imn; Fri, 16 Mar 2018 05:32:17 -0700 (PDT) X-Google-Smtp-Source: AG47ELtqdSJHCxorQVYXAvi+3+MR45WWmrCuhOu/0JNAsLvpO239xc9YeIIzWm3N9nCilbEhyfLZ X-Received: by 10.167.130.208 with SMTP id f16mr1455862pfn.164.1521203537421; Fri, 16 Mar 2018 05:32:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521203537; cv=none; d=google.com; s=arc-20160816; b=y3GEFmq+NqG73ULDTakZuGENAXDrALym5iwR+quimob7gqTvpbAlJ8m3dO8TBokMay p/rXDc/a4fUvfT+JqDMTgOKEd9LU0Jftu1AZdJI6s8KTANUs/k/4rnJpDynNs7IbGQHx uOOh1ufFzS7USsF6aiPTXAaj5dgT+EH+/n3JR5uIItvp4x7k14H2+oSgEKw6vELV8J23 P5A5zVy0N4wQ6+MdWOftUjYjVUqe0oyaKGlDj3l+Rz+pHFFQqyFqH2IvsKsSXuvZcasK 7HySG7keFpRKXp9oxUgOVaVUdnBeB9wscSnf18k87kziRO0I1r1adR9eFla3fZ4fzG+h Cfgw== 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:message-id:subject:cc :to:from:date:arc-authentication-results; bh=4xejyvk07KQEnLCJozFZYLVYoHHCZIXk8XoPKGsTfyg=; b=mBxC0liWRjEGN/MEIbUVSDetx9XINfRjiIZz3RXIwMXPsQyy8VlFvQ9pMnxE5W8sHT y/kRoP9X/KEuF9DAJT0sK8aPiWYH293UVK+enDEgtLSMYuTH9WCAhGGbqComCMzMhb/o EUwG92EEnkKHCd4eWf6/kjWL83f6udVSjkVwYH6f48M7IQa9xJiQ9Jw8V5WbYAAL34Fl j4+JDmws8uOB7clEUuKzVXH6p7i7frzWyRKmxkLsiZ1m7sd2bM/KWZQOk0i+P3f+Tdfc LIve+rd/TCvTt/qwad5w9t8+Sk7oVyuJIBc/nGeecgg0KGABOGve4WTgr72k+B1+Zp39 6w/Q== 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 bc6-v6si6093746plb.357.2018.03.16.05.32.02; Fri, 16 Mar 2018 05:32:17 -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 S1752217AbeCPMa4 (ORCPT + 99 others); Fri, 16 Mar 2018 08:30:56 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:50884 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751688AbeCPMau (ORCPT ); Fri, 16 Mar 2018 08:30:50 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id E0D6AEC2; Fri, 16 Mar 2018 12:30:49 +0000 (UTC) Date: Fri, 16 Mar 2018 13:30:49 +0100 From: Greg Kroah-Hartman To: Christoph Biedl , linux-btrfs@vger.kernel.org Cc: 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: <20180316123049.GC25079@kroah.com> References: <20180307191039.748351103@linuxfoundation.org> <20180307191042.810088712@linuxfoundation.org> <1521139304@msgid.manchmal.in-ulm.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1521139304@msgid.manchmal.in-ulm.de> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. thanks, greg k-h