On Tue, Jan 19, 2010 at 12:57:35PM +0100, Kevin Wolf wrote: > It's needed to be able to distinguish between the case where the > clusters are already allocated (0/NULL) and the case where the request > depends on another one (0/non-NULL). This check previously used the > return value (cluster_offset for success, 0 for failure) and I didn't > want to overload m->cluster_offset with such a meaning. This is the > change in the caller: > > /* Need to wait for another request? If so, we are done for now. */ > - if (!acb->cluster_offset && acb->l2meta.depends_on != NULL) { > + if (acb->l2meta.nb_clusters == 0 && acb->l2meta.depends_on != NULL) { > > The alternative would have been to keep using the return value and > hijack some errno value. This would possibly conflict with real > read/write errors though, so I decided to leave the return value alone.
Ok, makes sense.