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=-10.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable 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 522E8C4361B for ; Tue, 8 Dec 2020 12:52:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 13B9F23A31 for ; Tue, 8 Dec 2020 12:52:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729637AbgLHMwo (ORCPT ); Tue, 8 Dec 2020 07:52:44 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:32223 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725881AbgLHMwn (ORCPT ); Tue, 8 Dec 2020 07:52:43 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1607431877; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=LdxI1aFzATHmCTQ4qY4lTwkjlL93IzNY1JKWmh6317E=; b=fjeimcTO1viU7UENPRlI6sAOpefBlHh1vHfh3kAP9jsmAeEgjUJ/mPxQEBChXAAOxvrdyr EXXZ5JZRV7AaEpD2rIsto0+Bp05slqSVWlB6qlcplrYHt87x6ahEbmufJ5qQvasS2ScoLX P8SG4D8W+zo2GMr5uXgxq3N5JslMEtA= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-41-USMaAIxCNxi7sLC_Omt8PQ-1; Tue, 08 Dec 2020 07:51:13 -0500 X-MC-Unique: USMaAIxCNxi7sLC_Omt8PQ-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 80D5D107ACE4; Tue, 8 Dec 2020 12:51:11 +0000 (UTC) Received: from warthog.procyon.org.uk (ovpn-116-67.rdu2.redhat.com [10.10.116.67]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2A6C65C1A3; Tue, 8 Dec 2020 12:51:09 +0000 (UTC) Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells In-Reply-To: <20201208003117.342047-6-krisman@collabora.com> References: <20201208003117.342047-6-krisman@collabora.com> <20201208003117.342047-1-krisman@collabora.com> To: Gabriel Krisman Bertazi Cc: dhowells@redhat.com, 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 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <952749.1607431868.1@warthog.procyon.org.uk> Date: Tue, 08 Dec 2020 12:51:08 +0000 Message-ID: <952750.1607431868@warthog.procyon.org.uk> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org 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. 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? David