Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp1680296pxb; Wed, 9 Feb 2022 02:02:04 -0800 (PST) X-Google-Smtp-Source: ABdhPJytIpHd6aLTBQemx+kydRiq0TqiHFXpHET5elHUqjV1eMSD4kIvUVk0EmLz+dLBu5OjDTDM X-Received: by 2002:a17:903:182:: with SMTP id z2mr1663869plg.67.1644400924434; Wed, 09 Feb 2022 02:02:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644400924; cv=none; d=google.com; s=arc-20160816; b=hbDhGfzR3YZ2FFZ5FMcO21MIf8RoPgPy33elWsY4ihx6MgKx2w9rNsj2DQ72u9x/gu 4pNPHyuuDl03QboAO1FFAti1WI+RkvSaaBwGnI1P3X4u6nEi/ddcr0Go12ifOytEJOEO 9K3ZANzwHyDhsIhybE8698vwAjySofDPjMqKJv62TP3KFj5/e+qkPIJlq3V2OyHKwMvK 6yQaQhUfyaKPI1iwUWy8mlesxOrG3Pe7aH0ISNW2N+xcYjTd3fneX0+wJPWgerpmMTD3 n6YaqMR2s1yip6PV6NN/ZgUdOyMDkxHueqhI8exZJ9v2bswTdEGHims8/9gGngh9+JzB nI3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:mail-followup-to :reply-to:message-id:subject:cc:to:from:date:dkim-signature :dkim-signature; bh=uiS+i+Yi/MMxlJxriyCYJVbMBk32ERqDOJ25GJCQbRc=; b=mxQ11aOcbN9fS1c6CHhdB2VC6WWziNkqaqhrxJJL5P3qkZH/udE3eH5gl/87aFCGL3 B7CIH8j7K5zAIdi59qzIcWRASS9y2Z+HC9khOmunPlACAse+lfypaNaC1SIx+RjWD3iA bLjOkfxbj56I9+jP3gx5NU/fjA5415OaGD4iayas59DKqIvKk91Ft0i30CgqO81X4bHt vjumYI+cm4S02dKYMyQyc29n6C1yjBobJA3VvH0dA0FBccMPmFATGs+eQXVs2jCECCY+ c9G2AjuyaoNlYaOSww6Vtb/VAZCQl5kJ07i9eFE0miR7PRkf7SGfl4q/wRCfk7nrAUTf XpWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=UklAC60N; dkim=neutral (no key) header.i=@suse.cz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k15si4395245plg.0.2022.02.09.02.01.48; Wed, 09 Feb 2022 02:02:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=UklAC60N; dkim=neutral (no key) header.i=@suse.cz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235121AbiBHXIE (ORCPT + 99 others); Tue, 8 Feb 2022 18:08:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34042 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234994AbiBHXID (ORCPT ); Tue, 8 Feb 2022 18:08:03 -0500 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BA861C061577; Tue, 8 Feb 2022 15:08:02 -0800 (PST) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id 74F8221107; Tue, 8 Feb 2022 23:08:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1644361681; h=from:from:reply-to:reply-to:date:date:message-id:message-id:to:to: cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=uiS+i+Yi/MMxlJxriyCYJVbMBk32ERqDOJ25GJCQbRc=; b=UklAC60NoSQMJKh2xX5ZaEu0/SBWz31YETthCnXLKA9ZjOXV0UZpwyXG4hdVC0T/DHIzB7 WN/9ww9x5VUiBRwUuuPQRubP72Jrd01RUHszuF4p+rODIQtNE5NDJxsbhSimU1dyobqX1f xv5ihVkzMgfmqvE1mJ9KRH1aA+iYVjY= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1644361681; h=from:from:reply-to:reply-to:date:date:message-id:message-id:to:to: cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=uiS+i+Yi/MMxlJxriyCYJVbMBk32ERqDOJ25GJCQbRc=; b=ClYkgGbTQO0gh5nT0MhzEyJxDDF62O4PGlIzebj9vaM86LezgE3BGvjubR+ZbyQ3yFSCfa T9ccYw19FeZ+KeDQ== Received: from ds.suse.cz (ds.suse.cz [10.100.12.205]) by relay2.suse.de (Postfix) with ESMTP id 6BD3AA3B88; Tue, 8 Feb 2022 23:08:01 +0000 (UTC) Received: by ds.suse.cz (Postfix, from userid 10065) id DFEB4DAB3E; Wed, 9 Feb 2022 00:04:20 +0100 (CET) Date: Wed, 9 Feb 2022 00:04:20 +0100 From: David Sterba To: =?utf-8?B?RMSBdmlzIE1vc8SBbnM=?= Cc: linux-btrfs@vger.kernel.org, Chris Mason , Josef Bacik , David Sterba , linux-kernel@vger.kernel.org Subject: Re: [PATCH v3] btrfs: send: in case of IO error log it Message-ID: <20220208230420.GJ12643@twin.jikos.cz> Reply-To: dsterba@suse.cz Mail-Followup-To: dsterba@suse.cz, =?utf-8?B?RMSBdmlzIE1vc8SBbnM=?= , linux-btrfs@vger.kernel.org, Chris Mason , Josef Bacik , David Sterba , linux-kernel@vger.kernel.org References: <20220202201437.7718-1-davispuh@gmail.com> <20220205184822.2968-1-davispuh@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20220205184822.2968-1-davispuh@gmail.com> User-Agent: Mutt/1.5.23.1-rc1 (2014-03-12) X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Feb 05, 2022 at 08:48:23PM +0200, Dāvis Mosāns wrote: > Currently if we get IO error while doing send then we abort without > logging information about which file caused issue. > So log it to help with debugging. > > Signed-off-by: Dāvis Mosāns Added to misc-next, thanks. > --- > fs/btrfs/send.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c > index d8ccb62aa7d2..b1f75fde4a19 100644 > --- a/fs/btrfs/send.c > +++ b/fs/btrfs/send.c > @@ -4999,6 +4999,8 @@ static int put_file_data(struct send_ctx *sctx, u64 offset, u32 len) > lock_page(page); > if (!PageUptodate(page)) { > unlock_page(page); > + btrfs_err(fs_info, "send: IO error at offset=%llu for inode=%llu root=%llu", > + page_offset(page), sctx->cur_ino, sctx->send_root->root_key.objectid); > put_page(page); Good point in v2, using page must be before put_page. I've slightly reformatted the message so the lines fit to the limit.