Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp4197799rwb; Tue, 8 Nov 2022 13:35:48 -0800 (PST) X-Google-Smtp-Source: AMsMyM6DHOypBI4pePZco23h7l8rdZCuD4GiOoB3s9mmjLiLSwAk8zORddLF2SarsiA8lX07xGcU X-Received: by 2002:a17:906:e28e:b0:7ad:bde1:3cc9 with SMTP id gg14-20020a170906e28e00b007adbde13cc9mr50517241ejb.482.1667943348591; Tue, 08 Nov 2022 13:35:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667943348; cv=none; d=google.com; s=arc-20160816; b=hnGFDMVgJClnQYv/gL3/99RWNMZ/owndbkdVhR7crKssaXU4xXx59ATreyhjsOdsnf Gp9JIbIxatSTsgkuoFBA/7R7ZVXzZ/ZZ+gEnVqvZGdpvNlK5cz8K2w83jSVUofdlLghw T/F2OUWjfKXZ6iJIry27TtWpt2k17dpQFQ5FVxfo3tNTn5A6NrlEGlVITAhbU1r1fdCY chrxm94nFL8LgUH3qutkiBEV+adTpOnTwYWaITdTHdLss5MGcArHnk7Yo+xHcnSnReIs K67m9eTows+b89uVP/wiwJvtBacBt3xSfIvbtzWlrw+YMNgG+8pOAP47+NxKqoMjIgoY 1duQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:message-id:references :in-reply-to:subject:cc:to:from:date:mime-version; bh=lLXWlcIPSyXUrW5jIsZCJjFBlnn9hXW8zbAGlB2DRKs=; b=zvRmiHsvid8yjjNIqam1u6LwqPCXHf/r/0b2vPhY69UYwynXZkDQqTuYK5Bo8f3hzG V9oMk4WjmlJXWGEC7XZ7bojiLfAeL60s914r02rycjPLVebHA/ftxkXMRUcOTWqqiuAo qHRmlzGJxRZMF5e+/NK90ny9TfEDU/VUcu77IDgeuEm3ETiSQ7vwCT558pQFCPpHRznW 4f23knDkOtrYA5xj01tuEoO5crfnz4zx0F9k1fd8hLB985Miguo8cmYljyhNobV/2V6k ouii2O5aXHsIHSIci6bD7ScyxgipUwxZvJ/xWE6E5IKojdnjV3EayUlYtM6Dw39b5jUq 6LkA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gb11-20020a170907960b00b007317274bb0dsi15253809ejc.979.2022.11.08.13.34.13; Tue, 08 Nov 2022 13:35:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229964AbiKHVMp (ORCPT + 99 others); Tue, 8 Nov 2022 16:12:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40424 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229574AbiKHVMl (ORCPT ); Tue, 8 Nov 2022 16:12:41 -0500 X-Greylist: delayed 530 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Tue, 08 Nov 2022 13:12:36 PST Received: from relay.herbolt.com (relay.herbolt.com [37.46.208.54]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F2DD13C6EE for ; Tue, 8 Nov 2022 13:12:36 -0800 (PST) Received: from ip-78-102-244-147.net.upcbroadband.cz (ip-89-176-251-106.bb.vodafone.cz [89.176.251.106]) by relay.herbolt.com (Postfix) with ESMTPSA id 342AB103464F; Tue, 8 Nov 2022 22:03:44 +0100 (CET) Received: from mail.herbolt.com (http-server-2.local.lc [172.168.31.10]) by mail.herbolt.com (Postfix) with ESMTPSA id AC6B8D34A00; Tue, 8 Nov 2022 22:03:43 +0100 (CET) MIME-Version: 1.0 Date: Tue, 08 Nov 2022 22:03:43 +0100 From: Lukas Herbolt To: Lukas Czerner Cc: tytso@mit.edu, linux-ext4@vger.kernel.org Subject: Re: [PATCH] ext4: print file system UUID on mount, remount and unmount In-Reply-To: <20221108145042.85770-1-lczerner@redhat.com> References: <20221108145042.85770-1-lczerner@redhat.com> Message-ID: <97cf8d4ac4b3a27b2fd0ee2013193cb1@herbolt.com> X-Sender: lukas@herbolt.com Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE 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-ext4@vger.kernel.org On 08.11.2022 15:50, Lukas Czerner wrote: > The device names are not necessarily consistent across reboots which > can > make it more difficult to identify the right file system when tracking > down issues using system logs. Looks good to me. Thanks Lukas for proposing it! > Print file system UUID string on every mount, remount and unmount to > make this task easier. > > This is similar to the functionality recently propsed for XFS. > > Signed-off-by: Lukas Czerner > Cc: Lukas Herbolt > --- > fs/ext4/super.c | 12 +++++++----- > 1 file changed, 7 insertions(+), 5 deletions(-) > > diff --git a/fs/ext4/super.c b/fs/ext4/super.c > index 7cdd2138c897..4028bfc8206c 100644 > --- a/fs/ext4/super.c > +++ b/fs/ext4/super.c > @@ -1206,7 +1206,8 @@ static void ext4_put_super(struct super_block > *sb) > ext4_unregister_sysfs(sb); > > if (___ratelimit(&ext4_mount_msg_ratelimit, "EXT4-fs unmount")) > - ext4_msg(sb, KERN_INFO, "unmounting filesystem."); > + ext4_msg(sb, KERN_INFO, "unmounting filesystem %pU.", > + &sb->s_uuid); > > ext4_unregister_li_request(sb); > ext4_quota_off_umount(sb); > @@ -5655,8 +5656,9 @@ static int ext4_fill_super(struct super_block > *sb, struct fs_context *fc) > descr = "out journal"; > > if (___ratelimit(&ext4_mount_msg_ratelimit, "EXT4-fs mount")) > - ext4_msg(sb, KERN_INFO, "mounted filesystem with%s. " > - "Quota mode: %s.", descr, ext4_quota_mode(sb)); > + ext4_msg(sb, KERN_INFO, "mounted filesystem %pU with%s. " > + "Quota mode: %s.", &sb->s_uuid, descr, > + ext4_quota_mode(sb)); > > /* Update the s_overhead_clusters if necessary */ > ext4_update_overhead(sb, false); > @@ -6611,8 +6613,8 @@ static int ext4_reconfigure(struct fs_context > *fc) > if (ret < 0) > return ret; > > - ext4_msg(sb, KERN_INFO, "re-mounted. Quota mode: %s.", > - ext4_quota_mode(sb)); > + ext4_msg(sb, KERN_INFO, "re-mounted %pU. Quota mode: %s.", > + &sb->s_uuid, ext4_quota_mode(sb)); > > return 0; > }