Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp460860pxu; Wed, 25 Nov 2020 07:29:52 -0800 (PST) X-Google-Smtp-Source: ABdhPJwAqY6O2en7a5++g/878s6igXE9DZlM15KdBLBchz8AQrN6z2rsE5y7MSX1uYn4fm42Echc X-Received: by 2002:a17:906:6d8e:: with SMTP id h14mr3623806ejt.522.1606318191870; Wed, 25 Nov 2020 07:29:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606318191; cv=none; d=google.com; s=arc-20160816; b=VdeyLIMyewO2qZ+Lfz3P9bVHYh9PBBuQRM2tY1auNS+dDZxdRaVuvnrDkHkDU3Dwbh SZTb+E4T8EW64qdGAKP/ZZ2h1jf/Y4GYgPa8EpUttIXqtvCzcskSvnbp+YBKEtlLbX6k HCyJlEEjP3rdRgu05KUKMJAfdJBmLVPJRPN93nJXr8EmgG9oyIB3AlpnL5uhJvjk5Sd6 +gb/tt0SNb+FXisOws5YtutSntAh4jbj+17I1Pus6sPq5rLocHgxA6ggM06kAQrhNMaa pjTzjxAQtdY0qDqsHBijc2ajeW9w+3ceHeMUpcRVQ/TQoZ+ly13JUl/pI/vQ3aYnbfFL +gTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=/nqjuILf6kmx0MZe7cAUEaugBXSYSmokY24T3KrBU+0=; b=Z9+Lop1uXhq269sF/vjFns3ne3xiV7bFB5n0UeFczh09iwyZO5hAanAwyoOOazuYfE GE8vLakjG2EiDCtPQLfM05yNT4mZceZaQoFqvu2s8RFavNuHitIQIIozb2U7PbnAuK/u k9O2R3bgC6rhR9jXzEVN7rpMpiJ/ZYCIPiqA5aitark96pP2yDKlpr1sVFYiDytJIk8V HlP6G3Njd2rNseEwlDU9FVc924RGGGOp/olEqHndZ7oMY2LEkTSzx3s/ZUhvwlygp8Y3 vCHSmVs9WotvvpAbbTr+4TafbMZIdEziJ0QTn8mVPNP+fejn+qQamZswiciOV/mdU44y a3Pg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=dYdV4mCU; 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 62si1403613edc.231.2020.11.25.07.29.27; Wed, 25 Nov 2020 07:29:51 -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=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=dYdV4mCU; 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 S1730169AbgKYPXy (ORCPT + 99 others); Wed, 25 Nov 2020 10:23:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48168 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729153AbgKYPXx (ORCPT ); Wed, 25 Nov 2020 10:23:53 -0500 Received: from mail-wm1-x344.google.com (mail-wm1-x344.google.com [IPv6:2a00:1450:4864:20::344]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D2D4DC0613D4 for ; Wed, 25 Nov 2020 07:23:37 -0800 (PST) Received: by mail-wm1-x344.google.com with SMTP id w24so2517029wmi.0 for ; Wed, 25 Nov 2020 07:23:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=/nqjuILf6kmx0MZe7cAUEaugBXSYSmokY24T3KrBU+0=; b=dYdV4mCUth5JHcnXV/T3D3rsP+YIJHBqyReikTaq4cZJramK4zU+0uWUTc+5lIr7p+ zlUedoUfcb09F9ZVbwpUf8gHzEHEDnl2DaUm+4OIXU5OErUxOaSVD6KqxJmRe4H8+EOV Cfzc+9ju8GRIUWfi5M+5nB5bjXNVVX/RP2XA11OhF0So7+gEJCnMKTRMGW6LSqbPD/IW maMAGiMjNK47DDGEXMAYpU9bp1Hbx284f1ck3OSFXSDuq6BrXU1g5j7A+8B0dfh/pNiJ JJJkpxDMA/okF19bF58S9q7exPZdHW+TMGIoo07VPmKx4VLoE/43QxrxIFwzbMhvP1kn Rc0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=/nqjuILf6kmx0MZe7cAUEaugBXSYSmokY24T3KrBU+0=; b=bwZ7/oFxcLS5oWGfsUOGOXIykjWHmAI9mvJWGM22BPBU0ISBi0ylPf1hDM5uchlVHr BpUJ7vgMJGqMertAVAbofqsu873z5nLnWuAEY3yEu64RHM5HbtgZjNmBkdGQlKy/8KKI EWg2ML3drcEFxTI77tmyXdNQ5Epckn5UorDlMpN9aD1q2r4Xh9zRg/JkpFN3sLhOYkN/ YeTkmtNBcDlZsdSLJWJKoZc6LKlzZm0JMivvPOX95XEvy1hFR6QjU0XuSSEWdnIw0m6j hNxYnZo6tVQns33TdUDewQSOzFLX+oiugUTkvFwohdcSzIFOdYaNqxAzGe+1COM9/UZG oo5g== X-Gm-Message-State: AOAM532apKcoURGFfY6AaTQ1czPMNFSXt6Z+776RC8U8OWeo/QcxMRNJ dr1DYuonZzqyciPQFwjSpg6apfOVs6HUYQ== X-Received: by 2002:a7b:cbcc:: with SMTP id n12mr4530107wmi.115.1606317816565; Wed, 25 Nov 2020 07:23:36 -0800 (PST) Received: from debian-brgl.home (amarseille-656-1-4-167.w90-8.abo.wanadoo.fr. [90.8.158.167]) by smtp.gmail.com with ESMTPSA id 9sm4896731wmo.34.2020.11.25.07.23.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Nov 2020 07:23:35 -0800 (PST) From: Bartosz Golaszewski To: Joel Becker , Christoph Hellwig Cc: linux-kernel@vger.kernel.org, Bartosz Golaszewski Subject: [PATCH 0/4] configfs: implement committable items and add sample code Date: Wed, 25 Nov 2020 16:22:43 +0100 Message-Id: <20201125152247.30809-1-brgl@bgdev.pl> X-Mailer: git-send-email 2.29.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Bartosz Golaszewski Committable items in configfs are well defined and documented but unfortunately so far never implemented. The use-case we have over at the GPIO subsystem is using configfs in conjunction with sysfs to replace our current gpio-mockup testing module with one that will be much more flexible and will allow complete coverage of the GPIO uAPI. The current gpio-mockup module is controlled using module parameters which forces the user to reload it everytime they need to change the chip configuration or layout and makes it difficult to extend its functionality. Testing module based on configfs would allow fine-grained control over dummy GPIO chips but since GPIO devices must be configured before they are instantiated, we need committable items. This implements them and adds code examples to configfs_sample module. The first two patches are just cosmetic. Bartosz Golaszewski (4): configfs: increase the item name length configfs: use BIT() for internal flags configfs: implement committable items samples: configfs: add a committable group Documentation/filesystems/configfs.rst | 6 +- fs/configfs/configfs_internal.h | 22 +-- fs/configfs/dir.c | 239 ++++++++++++++++++++++++- fs/configfs/file.c | 8 + include/linux/configfs.h | 3 +- samples/configfs/configfs_sample.c | 150 ++++++++++++++++ 6 files changed, 408 insertions(+), 20 deletions(-) -- 2.29.1