Messages in this thread | | | Date | Tue, 10 Oct 2006 18:28:51 -0700 | From | Joel Becker <> | Subject | Re: [ckrm-tech] [PATCH 0/5] Allow more than PAGESIZE data read in configfs |
| |
On Tue, Oct 10, 2006 at 05:49:59PM -0700, Matt Helsley wrote: > We want to be able to export a sequence of small (<< 1 page), > homogenous, unstructured (scalar), attributes through configfs using the > same file. While this is rather specific, I'd guess it would be a common > occurrence.
Pray tell, why? "One attribute per file" is the mantra here. You really should think hard before you break it. Simple heuristic: would you have to parse the buffer? Then it's wrong.
> Yes, keeping track of writing to these sequences (add, remove, replace) > is a problem. But that's what the file position is for. configfs could > > Does this seem reasonable?
No. It adds complexity to an interface that is supposed to be simple. Now, I'm not sure what you are trying to do here, so I don't know how it fits in. Is it really "multiple attributes per file", or "this attribute is a list of entries"? An example. If you had to set an IP address and a port, here's your scenarios:
[Right] echo "10.0.0.1" > /sys/kernel/config/subsys/item/address echo "8000" > /sys/kernel/config/subsys/item/port
[Wrong] echo 10.0.0.1\n8000" > /sys/kernel/config/subsys/item/address-and-port
But perhaps you are not setting two distinct attributes. I don't understand what you are doing, so some detail would be nice.
Joel
--
Life's Little Instruction Book #407
"Every once in a while, take the scenic route."
Joel Becker Principal Software Developer Oracle E-mail: joel.becker@oracle.com Phone: (650) 506-8127 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |