Received: by 10.213.65.68 with SMTP id h4csp141832imn; Thu, 15 Mar 2018 12:07:05 -0700 (PDT) X-Google-Smtp-Source: AG47ELvQnBL7xTcCnJ6yFuHEk+PCDUK7BfMlbE/HOF2lcVPNmTpSkjVffCwKQKN9chiOVmgAlay8 X-Received: by 2002:a17:902:b786:: with SMTP id e6-v6mr9497407pls.58.1521140825242; Thu, 15 Mar 2018 12:07:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521140825; cv=none; d=google.com; s=arc-20160816; b=D2XE3xkJ+wh6t5f/3v8/jExGqPCQNJuyS1CBHHbFuFDdJHg33eWAF1Yve/gfVPn2nU v2JQu9hbX6a0PuiVDsvjm9yuEJ/PYL0dpoRlH15zbqj29KqNQyiAzI5vv79bD4ojH6Q2 S26hdvy3Vc0gBobcIeNMksICQfzFBVlJtIqeZVEKMwti4OiTr8B93u5bhhq+6I2CDvPo 3uezLrxtLbzEIz1Zy0Mb++RC2Skcqp4QtqV0pSrccGyTAHYP/ljp/b/DNYiTz2YfsBTN iRL83tVuVxCn58ODCyb7wUfJnW55+kHq1s6GHRCLmPNal4J6fxeldBeQdQnwhYUmJbpf T2DQ== 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=o/ztID0C6Z34xpbLHIwJNhfO06thABotL6OtLYxK0UA=; b=Z89/MhUx3eLyLHy5x4HsVKNfyllBekOPhcGOtTU3ZFL0qe93Qv0DMK7ZAmhs+2UJY4 XPnb3AAOvcD6NwmDBYBMqb8v1XQ9ibsqJlCJjl7/BUTnvmhef/xPMaPFu36dAqDo8dDD i11WxRbbbjoj333iaIj8QV+1/gU92OzSf8ojQYiA3q8sPaKD4w2IjKQRFcTkvDHepMLq CS0N8Lg3r2dfau1zr4MymNIF/DF0vC2xESN8bW4pigVfzgTnKBD0CSLkqAiNAYbfdftn Q4MUipCqEvJpAHxW/VzfceTxyTrrNNcB4Xr+amkatNjsIALAmgu7bXl5B58IGRUA08qk 84Qg== 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 f10si112465pga.52.2018.03.15.12.06.48; Thu, 15 Mar 2018 12:07:05 -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 S1752843AbeCOTEN (ORCPT + 99 others); Thu, 15 Mar 2018 15:04:13 -0400 Received: from manchmal.in-ulm.de ([217.10.9.201]:50006 "EHLO manchmal.in-ulm.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752284AbeCOTEM (ORCPT ); Thu, 15 Mar 2018 15:04:12 -0400 X-Greylist: delayed 506 seconds by postgrey-1.27 at vger.kernel.org; Thu, 15 Mar 2018 15:04:11 EDT Date: Thu, 15 Mar 2018 19:55:42 +0100 From: Christoph Biedl To: Greg Kroah-Hartman 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: <1521139304@msgid.manchmal.in-ulm.de> References: <20180307191039.748351103@linuxfoundation.org> <20180307191042.810088712@linuxfoundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180307191042.810088712@linuxfoundation.org> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Cheers, Christoph