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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6BD78C7EE2E for ; Mon, 12 Jun 2023 09:34:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233758AbjFLJeB (ORCPT ); Mon, 12 Jun 2023 05:34:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49066 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231290AbjFLJdK (ORCPT ); Mon, 12 Jun 2023 05:33:10 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7CCD75248 for ; Mon, 12 Jun 2023 02:25:47 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 1940B62230 for ; Mon, 12 Jun 2023 09:25:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EF908C433AE; Mon, 12 Jun 2023 09:25:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1686561946; bh=B+Q1pJZ83mqVXYXDx2fyRggrICY7qEupSuKiF+VcpM4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=bYKr3gjBsf3RW04q2VMEM1eMcrihByeoKJYbIgAVKIuJgi1ePhYOCnWEUahF8vDBK TPTO70h5VA0kZGl5L7/a6qrhWXdiKOAN3HmcP+1BvyiuRXR2xRl+qGH359Z4aQaFfV fXVwh/u4pZCtnCyS9kjlW7ADFwm3RTDWvi9MWp7s= Date: Mon, 12 Jun 2023 11:25:43 +0200 From: Greg KH To: Ilya Dryomov Cc: stable@vger.kernel.org, Dongsheng Yang Subject: Re: [PATCH for 5.4] rbd: get snapshot context after exclusive lock is ensured to be held Message-ID: <2023061228-dab-doorbell-c1ed@gregkh> References: <20230611184127.29830-1-idryomov@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230611184127.29830-1-idryomov@gmail.com> Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org On Sun, Jun 11, 2023 at 08:41:27PM +0200, Ilya Dryomov wrote: > Move capturing the snapshot context into the image request state > machine, after exclusive lock is ensured to be held for the duration of > dealing with the image request. This is needed to ensure correctness > of fast-diff states (OBJECT_EXISTS vs OBJECT_EXISTS_CLEAN) and object > deltas computed based off of them. Otherwise the object map that is > forked for the snapshot isn't guaranteed to accurately reflect the > contents of the snapshot when the snapshot is taken under I/O. This > breaks differential backup and snapshot-based mirroring use cases with > fast-diff enabled: since some object deltas may be incomplete, the > destination image may get corrupted. > > Cc: stable@vger.kernel.org > Link: https://tracker.ceph.com/issues/61472 > Signed-off-by: Ilya Dryomov > Reviewed-by: Dongsheng Yang > [idryomov@gmail.com: backport to 5.4: no rbd_img_capture_header(), > img_request not embedded in blk-mq pdu] > --- > drivers/block/rbd.c | 41 ++++++++++++++++++++++++----------------- > 1 file changed, 24 insertions(+), 17 deletions(-) What is the commit id in Linus's tree of this change? thanks, greg k-h