[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201201112656.GA32252@lst.de>
Date: Tue, 1 Dec 2020 12:26:56 +0100
From: Christoph Hellwig <hch@....de>
To: Bartosz Golaszewski <brgl@...ev.pl>
Cc: Joel Becker <jlbec@...lplan.org>, Christoph Hellwig <hch@....de>,
linux-kernel@...r.kernel.org,
Bartosz Golaszewski <bgolaszewski@...libre.com>
Subject: Re: [PATCH v2 3/4] configfs: implement committable items
On Mon, Nov 30, 2020 at 05:47:03PM +0100, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <bgolaszewski@...libre.com>
>
> This implements configfs committable items. We mostly follow the
> documentation except that we extend config_group_ops with uncommit_item()
> callback for reverting the changes made by commit_item().
>
> Each committable group has two sub-directories: pending and live. New
> items can only be created in pending/. Attributes can only be modified
> while the item is in pending/. Once it's ready to be committed, it must
> be moved over to live/ using the rename() system call. This is when the
> commit_item() function will be called.
>
> Implementation-wise: we reuse the default group mechanism to elegantly
> plug the new pseude-groups into configfs. The pending group inherits the
> parent group's operations so that config_items can be seamlesly created
> in it using the callbacks supplied by the user as part of the committable
> group itself.
This looks pretty awkward in the hierachy, but I can't really think
of anything else. One idea would be to require fsync to stage updates,
but that isn't really very well discoverable.
Powered by blists - more mailing lists