linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Bartosz Golaszewski <brgl@bgdev.pl>
Cc: Joel Becker <jlbec@evilplan.org>, Christoph Hellwig <hch@lst.de>,
	linux-kernel@vger.kernel.org,
	Bartosz Golaszewski <bgolaszewski@baylibre.com>
Subject: Re: [PATCH v2 3/4] configfs: implement committable items
Date: Tue, 1 Dec 2020 12:26:56 +0100	[thread overview]
Message-ID: <20201201112656.GA32252@lst.de> (raw)
In-Reply-To: <20201130164704.22991-4-brgl@bgdev.pl>

On Mon, Nov 30, 2020 at 05:47:03PM +0100, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <bgolaszewski@baylibre.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.

  reply	other threads:[~2020-12-01 11:27 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-30 16:47 [PATCH v2 0/4] configfs: implement committable items and add sample code Bartosz Golaszewski
2020-11-30 16:47 ` [PATCH v2 1/4] configfs: increase the item name length Bartosz Golaszewski
2020-11-30 16:47 ` [PATCH v2 2/4] configfs: use BIT() for internal flags Bartosz Golaszewski
2020-12-01 11:22   ` Christoph Hellwig
2020-12-01 14:08     ` Bartosz Golaszewski
2020-11-30 16:47 ` [PATCH v2 3/4] configfs: implement committable items Bartosz Golaszewski
2020-12-01 11:26   ` Christoph Hellwig [this message]
2020-12-01 14:06     ` Bartosz Golaszewski
2020-11-30 16:47 ` [PATCH v2 4/4] samples: configfs: add a committable group Bartosz Golaszewski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201201112656.GA32252@lst.de \
    --to=hch@lst.de \
    --cc=bgolaszewski@baylibre.com \
    --cc=brgl@bgdev.pl \
    --cc=jlbec@evilplan.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).