Lines Matching defs:rsb

39    Stage 2, xxxx_lock(), just finds and locks the relevant rsb which is
46 given rsb and lkb and queues callbacks.
173 printk(KERN_ERR "rsb: nodeid %d master %d dir %d flags %lx first %x "
186 printk(KERN_ERR "rsb: root_list empty %d recover_list empty %d\n",
188 printk(KERN_ERR "rsb lookup list\n");
191 printk(KERN_ERR "rsb grant queue:\n");
194 printk(KERN_ERR "rsb convert queue:\n");
197 printk(KERN_ERR "rsb wait queue:\n");
320 * Basic operations on rsb's and lkb's
324 a valid reference to the rsb, so there's no need for locking. */
336 /* When all references to the rsb are gone it's transferred to
390 Otherwise, take an rsb off the list and return it. */
465 static int rsb_insert(struct dlm_rsb *rsb, struct rb_root *tree)
476 rc = rsb_cmp(cur, rsb->res_name, rsb->res_length);
483 dlm_dump_rsb(rsb);
489 rb_link_node(&rsb->res_hashnode, parent, newn);
490 rb_insert_color(&rsb->res_hashnode, tree);
495 * Find rsb in rsbtbl and potentially create/add one
497 * Delaying the release of rsb's has a similar benefit to applications keeping
498 * NL locks on an rsb, but without the guarantee that the cached master value
499 * will still be valid when the rsb is reused. Apps aren't always smart enough
500 * to keep NL locks on an rsb that they may lock again shortly; this can lead
503 * Searching for an rsb means looking through both the normal list and toss
504 * list. When found on the toss list the rsb is moved to the normal list with
507 * rsb's on the keep list are being used locally and refcounted.
508 * rsb's on the toss list are not being used locally, and are not refcounted.
510 * The toss list rsb's were either
517 * The purpose of find_rsb() is to return a refcounted rsb for local use.
518 * So, if the given rsb is on the toss list, it is moved to the keep list
521 * toss_rsb() happens when all local usage of the rsb is done, i.e. no
522 * more refcounts exist, so the rsb is moved from the keep list to the
525 * rsb's on both keep and toss lists are used for doing a name to master
526 * lookups. rsb's that are in use locally (and being refcounted) are on
527 * the keep list, rsb's that are not in use locally (not refcounted) and
530 * rsb's on the toss list who's dir_nodeid is not local can have stale
531 * name/master mappings. So, remote requests on such rsb's can potentially
534 * first_lkid is to keep only a single outstanding request on an rsb
535 * while that rsb has a potentially stale master.)
565 * create the rsb; dlm_recover_process_copy() will handle EBADR
569 * not find the rsb anywhere, then recreate it. This happens if
570 * someone sends us a request after we have removed/freed an rsb
572 * because they are using an rsb from their toss list.)
594 * rsb is active, so we can't check master_nodeid without lock_rsb.
607 * rsb found inactive (master_nodeid may be out of date unless
609 * is using this rsb because it's on the toss list, so we can
614 /* our rsb was not master, and another node (not the dir node)
636 /* Because we have held no locks on this rsb,
649 * rsb not found
738 * rsb is active, so we can't check master_nodeid without lock_rsb.
751 * rsb found inactive. No other thread is using this rsb because
757 /* our rsb is not master, and another node has sent us a
768 /* our rsb is not master, and we are dir; may as well fix it;
784 * rsb not found
848 /* our rsb is not master, and another node (not the dir node)
860 /* our rsb is not master, but the dir nodeid has sent us a
894 * rsb even though the res_nodeid is no longer removed.
931 * up the master for this rsb
943 * finds the rsb on the keep list and ignores the remove,
974 * remote node sends back the rsb names it is master of and we are dir of
976 * we either create new rsb setting remote node as master, or find existing
977 * rsb and set master to be the remote node.
1024 /* because the rsb is active, we need to lock_rsb before
1035 /* the rsb was active */
1046 /* because the rsb is inactive (on toss list), it's not refcounted
1054 /* the rsb was inactive (on toss list) */
1173 /* Attaching/detaching lkb's from rsb's is for rsb reference counting.
1174 The rsb must exist as long as any lkb's for it do. */
1258 /* __put_lkb() is used when an lkb may not have an rsb attached to
1335 /* add/remove lkb to rsb's grant/convert/wait queue */
1600 /* If we're the directory record for this rsb, and
1622 /* We're the master of this rsb but we're not
1637 log_error(ls, "tossed rsb in use %s", r->res_name);
1652 * While searching for rsb's to free, we found some that require
1730 b=0 lvb written to rsb or invalidated
1826 /* Manipulate lkb's on rsb's convert/granted/waiting queues
2121 * locks for a recovered rsb, on which lkb's have been rebuilt.
2471 lkb using the nodeid field in the given rsb. If the rsb's nodeid is
2473 0. If the rsb's nodeid is _not_ known, it needs to be looked up
2476 When the rsb nodeid is being looked up remotely, the initial lkb
2478 lookup reply. Other lkb's waiting for the same rsb lookup are kept
2479 on the rsb's res_lookup list until the master is verified.
2482 0: nodeid is set in rsb/lkb and the caller should go ahead and use it
2483 1: the rsb master is not available and the lkb has been placed on
2545 /* confirm_master -- confirm (or deny) an rsb's master nodeid */
2635 an active lkb cannot be modified before locking the rsb */
2737 /* an lkb may be waiting for an rsb lookup to complete where the
3019 /* add a new lkb to a possibly new rsb, called by requesting process */
3497 /* FIXME: if this lkb is the only lock we hold on the rsb, then set
3498 MASTER_UNCERTAIN to force the next request on the rsb to confirm
3781 /* This is called after the rsb is locked so that we can safely inspect
3858 for this rsb or not, so if the master sends us a request, we should
3859 recreate the rsb if we've destroyed it. This race happens when we
3861 node sends us a request for the rsb. */
4168 recreate the master rsb when it gets a request from the dir node for
4169 an rsb it doesn't have. */
4181 /* verify the rsb is on keep list per comment above */
4219 log_error(ls, "receive_remove from %d rsb ref error",
4298 /* find_rsb failed to find rsb or rsb wasn't master */
4570 rsb before we've received the dir node's loookup_reply for it.
5308 * previously blocked locks to now be granted. The subset of rsb's
5312 * Simplest would be to go through each master rsb and check for non-empty
5316 * rsb's very inefficient. So, we rely on earlier recovery routines
5317 * to set RECOVER_GRANT on any rsb's that we should attempt to grant
5417 until all locks have been rebuilt on the rsb (recover_conversion) */
5430 to check if the rsb already has an lkb with the given remote nodeid/lkid.
5456 /* In general we expect the rsb returned to be R_MASTER, but we don't
5459 locks before we've made ourselves master of this rsb. We can still
5951 granted. Regardless of what rsb queue the lock is on, it's removed and