Messages in this thread | | | Date | Fri, 30 Sep 2005 14:40:55 -0700 | From | Joel Becker <> | Subject | Re: I request inclusion of SAS Transport Layer and AIC-94xx into the kernel |
| |
On Fri, Sep 30, 2005 at 03:15:50PM -0600, Andrew Patterson wrote: > But again, this may be just a goal and not a hard and fast rule. I can > definitely see a use for binary attributes in sysfs. Configfs seems to > be designed for this sort of thing.
Configfs is designed for ascii or readable attributes. It drops the bin_attribute type that sysfs still supports. So if you are looking to fill a 64K binary attribute, configfs isn't the place you're going to be going.
> > fd = open(smp_portal, ...); > > write(fd, smp_req, smp_req_size); > > read(fd, smp_resp, smp_resp_size); > > close(fd); > > Process A opens an attribute and writes to it. Process B opens another > attribute and writes to it, affecting the result that process A will see > from its subsequent read. I suppose you could lock every attribute, but > that would be very error-prone, and not allow much concurrency.
Check out nfsctl.c and its transaction_file design. process A and process B get different buffers on filp->f_private, and cannot influence each other's read/write operations.
Joel
--
Life's Little Instruction Book #347
"Never waste the oppourtunity to tell someone you love them."
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/
| |