Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp3152613pxu; Tue, 8 Dec 2020 05:03:39 -0800 (PST) X-Google-Smtp-Source: ABdhPJwJLb+LA/ImIQ+lB4PdiLXpD6+TDd59ZSZ4t8UIBg7Rty3wsEFDzw+QGSDoi43pnmPj5B11 X-Received: by 2002:a05:6402:22b4:: with SMTP id cx20mr24297723edb.262.1607432619294; Tue, 08 Dec 2020 05:03:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607432619; cv=none; d=google.com; s=arc-20160816; b=BNL3/eUQ7QWHYatCpUgHHzvzV1LVQtOAEnOLinghFs4gNERix0gTnX5tJcQSyTy/u6 ZL5yQuwSboWSiP9K/4jJ5zBVMAuGWU5iRzRq857dwxuvPOSwszNglHOmPK3ZiE6weeZU XjfWgOFISMhx/TSM39pvDg7mu7qjFqfOqqYuka9Ihs9LYbuiFDN96AiMk13AU8vxSQ3a sqAvbpsC+UeeP1atTQGx9rpdOgL3AHJ4Ow8kYUs4b8FNGwHYUymp3k6F5QOKU9lQPy6b l+/4HR2W10ZPOPlNcgntu+7Ldk9kk0GeBNZ8q77s5v6Z4Gj/cnUhRgAA8UKhw/0zgqFG B3tw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:message-id:in-reply-to :date:references:organization:subject:cc:to:from; bh=/WpCFniIyjSo0CR9mxH3N3IOxWVtQbbn0r9GSeU+2gE=; b=Hy6Jtv1jfuS7sSa3a+2FsUAKxIlm2COedWx4GHIxHZSNdTxnvrrIhzRIx/tq4v/K15 kArb4I5/bnh5OokM7YvdcvQAsAA95ujGeZlnI1g46M+TmLPN/HZGRur+BW1aP1t1zmV2 r5r6omPf+mYdeUDy8jmEko/HVvMby5pmNV/dZb3k+zB8MfcdFwPLaEw1t1JNh3QACgig QkTNpCvScgpr4ne9F6l2K8fdED+kwWi/BWCo2xEGebpZopvush4ccl2glMW/ncK18SrH EJ7Dv6XFnvYAMuLen6Xln0F4IARgE79pgQBlwHDqNg5YDLAp3EefU3bZiDACbaSpAPLy sEXA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c1si8120712ejx.607.2020.12.08.05.02.57; Tue, 08 Dec 2020 05:03:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726697AbgLHM7N (ORCPT + 99 others); Tue, 8 Dec 2020 07:59:13 -0500 Received: from bhuna.collabora.co.uk ([46.235.227.227]:36328 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726228AbgLHM7N (ORCPT ); Tue, 8 Dec 2020 07:59:13 -0500 Received: from localhost (unknown [IPv6:2804:14c:132:242d::1001]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: krisman) by bhuna.collabora.co.uk (Postfix) with ESMTPSA id 2D1771F44C2F; Tue, 8 Dec 2020 12:58:30 +0000 (GMT) From: Gabriel Krisman Bertazi To: David Howells Cc: viro@zeniv.linux.org.uk, tytso@mit.edu, khazhy@google.com, adilger.kernel@dilger.ca, linux-ext4@vger.kernel.org, linux-fsdevel@vger.kernel.org, kernel@collabora.com Subject: Re: [PATCH 5/8] vfs: Include origin of the SB error notification Organization: Collabora References: <20201208003117.342047-6-krisman@collabora.com> <20201208003117.342047-1-krisman@collabora.com> <952750.1607431868@warthog.procyon.org.uk> Date: Tue, 08 Dec 2020 09:58:25 -0300 In-Reply-To: <952750.1607431868@warthog.procyon.org.uk> (David Howells's message of "Tue, 08 Dec 2020 12:51:08 +0000") Message-ID: <87r1o05ua6.fsf@collabora.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org David Howells writes: > Gabriel Krisman Bertazi wrote: > >> @@ -130,6 +131,8 @@ struct superblock_error_notification { >> __u32 error_cookie; >> __u64 inode; >> __u64 block; >> + char function[SB_NOTIFICATION_FNAME_LEN]; >> + __u16 line; >> char desc[0]; >> }; > > As Darrick said, this is a UAPI breaker, so you shouldn't do this (you can, > however, merge this ahead a patch). Also, I would put the __u16 before the > char[]. > > That said, I'm not sure whether it's useful to include the function name and > line. Both fields are liable to change over kernel commits, so it's not > something userspace can actually interpret. I think you're better off dumping > those into dmesg. > > Further, this reduces the capacity of desc[] significantly - I don't know if > that's a problem. Yes, that is a big problem as desc is already quite limited. I don't think it is a problem for them to change between kernel versions, as the monitoring userspace can easily associate it with the running kernel. The alternative would be generating something like unique IDs for each error notification in the filesystem, no? > And yet further, there's no room for addition of new fields with the desc[] > buffer on the end. Now maybe you're planning on making use of desc[] for > text-encoding? Yes. I would like to be able to provide more details on the error, without having a unique id. For instance, desc would have the formatted string below, describing the warning: ext4_warning(inode->i_sb, "couldn't mark inode dirty (err %d)", err); > > David > -- Gabriel Krisman Bertazi