Re: [RFC][PATCH] fs: configfs: programmatically create config groups

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Dec 10, 2012 at 03:17:34PM +0100, Andrzej Pietrasiewicz wrote:
> @Joel in particular: please see my comment in the bottom.

<snip>

> I forgot to mention, representing udcs (USB Device Controllers) in
> configfs is similar to interfaces/endpoints: the user needs to guess
> what name to use in mkdir, e.g. in:
> 
> $ mkdir ....../udcs/s3c-hsotg

	Again, discoverability.  Userspace should not need to guess.  So
some part of the system (configfs, sysfs, procfs, $dontcare) needs to
know what the available choices are.

> the poor user needs to know that the udc is actually called s3c-hsotg.
> And after the udc goes away from the system, the s3c-hsotg directory
> remains in the filesystem until the user deletes it (as nobody else
> but the user can do it). Again, an attribute like available_udcs in
> the udcs directory can help. But still, there will be times when
> its contents will not be consistent with the directories actually
> present.

	How does the system know there is an s3c-hsotg?  Is this from
scanning?

> @Joel: Any thoughts about it? Commitable items? E.g. the user creates
> whatever they want, so the "uncommitted" directory contains "garbage",
> that is directories which do not have to correspond to anything
> actually present in the system, but on commiting the gadget's item
> (group in fact) everything is verified and only "correct" gadgets
> are actually bound? Then, in the "uncommitted" directory the user
> can still do whatever they want, but this is not effective until
> uncommitting the old gadget and committing it again? There is just
> a tiny issue with committable items: Are they implemented? :O

	Committable items are not implemented, because everyone uses the
'enable' pattern:

  $ mkdir foo
  $ echo 1024 >foo/attr1
  $ echo 2048 >foo/attr2
  $ echo 1 >foo/enable

In o2hb, we don't have an explicit "enable" attribute.  Instead, we
enable when the block device's file descriptor is stored.  If the other
attributes aren't set yet, we fail the store.

Joel

-- 

Life's Little Instruction Book #451

	"Don't be afraid to say, 'I'm sorry.'"

			http://www.jlbec.org/
			jlbec@xxxxxxxxxxxx
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux