From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AD767C4360F for ; Tue, 2 Apr 2019 11:44:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7B8312133D for ; Tue, 2 Apr 2019 11:44:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728682AbfDBLox (ORCPT ); Tue, 2 Apr 2019 07:44:53 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37609 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726716AbfDBLox (ORCPT ); Tue, 2 Apr 2019 07:44:53 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 554B530034D2; Tue, 2 Apr 2019 11:44:53 +0000 (UTC) Received: from bfoster (dhcp-41-2.bos.redhat.com [10.18.41.2]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8F78A6155F; Tue, 2 Apr 2019 11:44:52 +0000 (UTC) Date: Tue, 2 Apr 2019 07:44:50 -0400 From: Brian Foster To: Alex Lyakas Cc: linux-xfs@vger.kernel.org, stable@vger.kernel.org, darrick.wong@oracle.com, hch@lst.de, shyam@zadara.com Subject: Re: [STABLE PATCH 0/2] Fix in-memory metadata corruption at xfs_attr3_leaf_write_verify() Message-ID: <20190402114450.GB2899@bfoster> References: <1554042273-3307-1-git-send-email-alex@zadara.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1554042273-3307-1-git-send-email-alex@zadara.com> User-Agent: Mutt/1.11.3 (2019-02-01) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.47]); Tue, 02 Apr 2019 11:44:53 +0000 (UTC) Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org On Sun, Mar 31, 2019 at 05:24:33PM +0300, Alex Lyakas wrote: > This is a partial backport of original Darrick's series "xfs: logging fixes" to kernel 4.14. > It fixes the in-memory metadata corruption error, which happens > when a partially initialized attribute buffer is attemped to be written to disk. > This issue is reproducible with kernel 4.14, when adding a 1-sec sleep in xfs_attr_set(), > between the call to xfs_attr_shortform_to_leaf() and the call to xfs_attr_leaf_addname(). > For future reference, you probably want to make sure the patch series is threaded when it's posted to the list. That aside, this looks like a reasonable and straightforward backport to me: Acked-by: Brian Foster > Darrick J. Wong (2): > xfs: add the ability to join a held buffer to a defer_ops > xfs: hold xfs_buf locked between shortform->leaf conversion and the > addition of an attribute > > fs/xfs/libxfs/xfs_attr.c | 20 +++++++++++++++----- > fs/xfs/libxfs/xfs_attr_leaf.c | 9 ++++++--- > fs/xfs/libxfs/xfs_attr_leaf.h | 3 ++- > fs/xfs/libxfs/xfs_defer.c | 39 ++++++++++++++++++++++++++++++++++++--- > fs/xfs/libxfs/xfs_defer.h | 5 ++++- > 5 files changed, 63 insertions(+), 13 deletions(-) > > -- > 1.9.1 >