On Wed, Nov 10, 2010 at 1:19 PM, Arun R Bharadwaj <a...@linux.vnet.ibm.com> wrote: > +static void v9fs_process_post_ops(void *arg) > +{ > + int count = 0; > + struct V9fsPostOp *post_op; > + int ret; > + char byte; > + > + qemu_mutex_lock(&v9fs_async_struct.lock);
I don't think it is necessary to lock across rfd/wfd read()/write(). rfd/wfd are never changed once v9fs_async_struct has been set up. Only post_op_list needs to be protected. > + do { > + ret = read(v9fs_async_struct.rfd, &byte, sizeof(byte)); > + } while (ret > 1 || (ret == -1 && errno == EINTR)); ret > 1 looks like a typo, should be ret > 0. sizeof(byte) == 1 means ret > 1 is impossible. Stefan