On 01/23/2013 04:16 PM, levin li wrote: > + > + spin_lock_init(&dev->que_lock); > + spin_lock_init(&dev->dev_lock); > + spin_lock_init(&dev->sd_req_lock); > + rwlock_init(&dev->creating_lock); > + rwlock_init(&dev->sock_lock);
I think we should rethink if the so many locks is necessary. > + init_waitqueue_head(&dev->req_wait); > + init_waitqueue_head(&dev->fin_wait); > + init_waitqueue_head(&dev->creating_wait); > + INIT_LIST_HEAD(&dev->pending_list); > + INIT_LIST_HEAD(&dev->finish_list); > + INIT_LIST_HEAD(&dev->dev_list); > + INIT_LIST_HEAD(&dev->deletion_list); > + INIT_LIST_HEAD(&dev->sd_req_list); It looks that you support multiple users to the same block device, which shouldn't be the case we'd care about. We should only allow one users to use one block device only. Thanks, Yuan -- sheepdog mailing list sheepdog@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/sheepdog