From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com ([209.132.183.28]:41144 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752258AbeAWXf6 (ORCPT ); Tue, 23 Jan 2018 18:35:58 -0500 Date: Tue, 23 Jan 2018 17:35:52 -0600 From: Bill O'Donnell Subject: Re: [PATCH] xfs_copy: accept CRC version of ABTB_MAGIC in ASSERT Message-ID: <20180123233552.GA29111@redhat.com> References: <9c888b88-b664-730c-a1ff-50ee438714dd@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9c888b88-b664-730c-a1ff-50ee438714dd@redhat.com> Sender: linux-xfs-owner@vger.kernel.org List-ID: List-Id: xfs To: Eric Sandeen Cc: linux-xfs , Radek Burkat On Tue, Jan 23, 2018 at 04:59:52PM -0600, Eric Sandeen wrote: > Not sure how this was missed for so long, but to handle CRC > filesystems, this ASSERT on block magic must accept CRC magic > as well. > > Reported-by: Radek Burkat > Signed-off-by: Eric Sandeen Reviewed-by: Bill O'Donnell > --- > > (yes, it's > 80 cols but .. so is most of this indented > code block o_O) > > diff --git a/copy/xfs_copy.c b/copy/xfs_copy.c > index fb37375..16ee4d9 100644 > --- a/copy/xfs_copy.c > +++ b/copy/xfs_copy.c > @@ -1140,7 +1140,8 @@ main(int argc, char **argv) > ((char *) btree_buf.data + > pos - btree_buf.position); > > - ASSERT(be32_to_cpu(block->bb_magic) == XFS_ABTB_MAGIC); > + ASSERT(be32_to_cpu(block->bb_magic) == XFS_ABTB_MAGIC || > + be32_to_cpu(block->bb_magic) == XFS_ABTB_CRC_MAGIC); > } > > /* > > -- > To unsubscribe from this list: send the line "unsubscribe linux-xfs" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html