Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp788305pxb; Tue, 14 Sep 2021 08:44:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw+cTkQb7WoEK6erjuggZlDrvOMVaGgefQrbJH0MLKTI8vPyb03TJlDUzsXAdmSeazxDfo6 X-Received: by 2002:ac2:5d71:: with SMTP id h17mr13342719lft.670.1631634297578; Tue, 14 Sep 2021 08:44:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631634297; cv=none; d=google.com; s=arc-20160816; b=jnF9oakHkdAo8aNoI/DkFxa72tcv/fxbWgMUig2MEwPoCUYhxm21smz4+W7L871KVt ivJIv8IlC8Umxo8krN9wBlA9wlU+bUzNtA1KcLt1tVpdq+fPSEakmieNRzgd4F16gWJE K7Xoq0rO+xDDK5ObW0OabXSoyivc/D5OiOEBaUX5LE56DU4ESnsDgZjj2u871zpgNbre V4PhQkj/jHCqXoCNsgNpczOi4XxRku6ZJ47iJm/vkHkvoWfbLexCuuagGIctmpTpbFdx Wq7pM59Wv6KrzEbaPL+IZYjcVRK0+5ooVjh5tyzlEQgPkA0EpBEc/+BgJeSKQyvYKaVS 8HnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=AEJU/RE9EAsbEpG3HMlMGvsj6qOidNPqtZvAK5eyCUg=; b=yUGhpfa4IsJrIIkWKGwMm4EQ9tNuSfL3Bynv5xqagSoj78JlHDWXHDSfpUKLc7wyX+ yiinctjqiyPd1RuthvENe6kivII/uv08MLDsWswzoxKxnVKU4Ka9s/GlmNTeTK3ov4Kd 46iK28wKzDFmtL7YTHI6Sq2u8oWVO8oD8RJzVEwI0H/uxECglRsn1lYBA/AVgTB6P38T EfQ0NPQxQt/QRYQOTpjBYOIEPTJC9XfzKhnv6cQNrgPM8CpgeDSuuaSpdWke0BtFViX1 kBUHi+Cro3qh0LBEEh2+RFTiUftYeNy1Q6RDDgjeyE93vZ7TxN12RfWPR9TAiYvpDk6J +RWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=CMsNilTI; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z12si9656801lfr.491.2021.09.14.08.44.27; Tue, 14 Sep 2021 08:44:57 -0700 (PDT) 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=@linuxfoundation.org header.s=korg header.b=CMsNilTI; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234786AbhINPnC (ORCPT + 99 others); Tue, 14 Sep 2021 11:43:02 -0400 Received: from mail.kernel.org ([198.145.29.99]:40682 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234803AbhINPm5 (ORCPT ); Tue, 14 Sep 2021 11:42:57 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 2CD3A60E9B; Tue, 14 Sep 2021 15:41:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1631634099; bh=V6SyrZ3vPVHh40d+w/uevjVMUXwmNmk4y04a1VhSuNY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=CMsNilTIuECmzmoxX++29DydrSWX03iJ65SmrVPT0kvIf75zOd6/O+QOvp4m4hLSD 7J1Usmf/DbcoyV7w7RYk9WKK6qCxjjSjVCMXpiAx8Kkl6/J3Jz/J+OjyOGSl8sUHkN 1VKuQGCf1ViTtBu0RQEflFYd76oJdVBPoZWOng/4= Date: Tue, 14 Sep 2021 17:41:37 +0200 From: Greg Kroah-Hartman To: Christoph Hellwig Cc: "Rafael J. Wysocki" , Alexander Viro , Jens Axboe , Tejun Heo , linux-block@vger.kernel.org, linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 13/13] xfs: convert xfs_sysfs attrs to use ->seq_show Message-ID: References: <20210913054121.616001-1-hch@lst.de> <20210913054121.616001-14-hch@lst.de> <20210914073003.GA31077@lst.de> <20210914153011.GA815@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210914153011.GA815@lst.de> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 14, 2021 at 05:30:11PM +0200, Christoph Hellwig wrote: > On Tue, Sep 14, 2021 at 05:28:08PM +0200, Greg Kroah-Hartman wrote: > > We can "force" it by not allowing buffers to be bigger than that, which > > is what the code has always done. I think we want to keep that for now > > and not add the new seq_show api. > > The buffer already is not larger than that. The problem is that > sysfs_emit does not actually work for the non-trivial attributes, > which generally are the source of bugs. They huge majority of sysfs attributes are "trivial". So for maybe at least 95% of the users, if not more, using sysfs_emit() is just fine as all you "should" be doing is emitting a single value. For those that are non-trivial, yes, that will be harder, but as the xfs discussion shows, those are not normal at all, and I do not want to make creating them easier as that is not the model that sysfs was designed for if at all possible. thanks, greg k-h