• Home
  • Raw
  • Download

Lines Matching full:rsb

39    Stage 2, xxxx_lock(), just finds and locks the relevant rsb which is
46 given rsb and lkb and queues callbacks.
172 printk(KERN_ERR "rsb: nodeid %d master %d dir %d flags %lx first %x " in dlm_print_rsb()
185 printk(KERN_ERR "rsb: root_list empty %d recover_list empty %d\n", in dlm_dump_rsb()
187 printk(KERN_ERR "rsb lookup list\n"); in dlm_dump_rsb()
190 printk(KERN_ERR "rsb grant queue:\n"); in dlm_dump_rsb()
193 printk(KERN_ERR "rsb convert queue:\n"); in dlm_dump_rsb()
196 printk(KERN_ERR "rsb wait queue:\n"); in dlm_dump_rsb()
328 * Basic operations on rsb's and lkb's
332 a valid reference to the rsb, so there's no need for locking. */
344 /* When all references to the rsb are gone it's transferred to
396 Otherwise, take an rsb off the list and return it. */
470 static int rsb_insert(struct dlm_rsb *rsb, struct rb_root *tree) in rsb_insert() argument
481 rc = rsb_cmp(cur, rsb->res_name, rsb->res_length); in rsb_insert()
488 dlm_dump_rsb(rsb); in rsb_insert()
494 rb_link_node(&rsb->res_hashnode, parent, newn); in rsb_insert()
495 rb_insert_color(&rsb->res_hashnode, tree); in rsb_insert()
500 * Find rsb in rsbtbl and potentially create/add one
502 * Delaying the release of rsb's has a similar benefit to applications keeping
503 * NL locks on an rsb, but without the guarantee that the cached master value
504 * will still be valid when the rsb is reused. Apps aren't always smart enough
505 * to keep NL locks on an rsb that they may lock again shortly; this can lead
508 * Searching for an rsb means looking through both the normal list and toss
509 * list. When found on the toss list the rsb is moved to the normal list with
512 * rsb's on the keep list are being used locally and refcounted.
513 * rsb's on the toss list are not being used locally, and are not refcounted.
515 * The toss list rsb's were either
522 * The purpose of find_rsb() is to return a refcounted rsb for local use.
523 * So, if the given rsb is on the toss list, it is moved to the keep list
526 * toss_rsb() happens when all local usage of the rsb is done, i.e. no
527 * more refcounts exist, so the rsb is moved from the keep list to the
530 * rsb's on both keep and toss lists are used for doing a name to master
531 * lookups. rsb's that are in use locally (and being refcounted) are on
532 * the keep list, rsb's that are not in use locally (not refcounted) and
535 * rsb's on the toss list who's dir_nodeid is not local can have stale
536 * name/master mappings. So, remote requests on such rsb's can potentially
539 * first_lkid is to keep only a single outstanding request on an rsb
540 * while that rsb has a potentially stale master.)
570 * create the rsb; dlm_recover_process_copy() will handle EBADR in find_rsb_dir()
574 * not find the rsb anywhere, then recreate it. This happens if in find_rsb_dir()
575 * someone sends us a request after we have removed/freed an rsb in find_rsb_dir()
577 * because they are using an rsb from their toss list.) in find_rsb_dir()
599 * rsb is active, so we can't check master_nodeid without lock_rsb. in find_rsb_dir()
613 * rsb found inactive (master_nodeid may be out of date unless in find_rsb_dir()
615 * is using this rsb because it's on the toss list, so we can in find_rsb_dir()
620 /* our rsb was not master, and another node (not the dir node) in find_rsb_dir()
642 /* Because we have held no locks on this rsb, in find_rsb_dir()
655 * rsb not found in find_rsb_dir()
744 * rsb is active, so we can't check master_nodeid without lock_rsb. in find_rsb_nodir()
757 * rsb found inactive. No other thread is using this rsb because in find_rsb_nodir()
763 /* our rsb is not master, and another node has sent us a in find_rsb_nodir()
774 /* our rsb is not master, and we are dir; may as well fix it; in find_rsb_nodir()
790 * rsb not found in find_rsb_nodir()
853 /* our rsb is not master, and another node (not the dir node) in validate_master_nodeid()
865 /* our rsb is not master, but the dir nodeid has sent us a in validate_master_nodeid()
897 * remote node sends back the rsb names it is master of and we are dir of
899 * we either create new rsb setting remote node as master, or find existing
900 * rsb and set master to be the remote node.
949 /* because the rsb is active, we need to lock_rsb before in dlm_master_lookup()
962 /* because the rsb is inactive (on toss list), it's not refcounted in dlm_master_lookup()
978 rsb even though the res_nodeid is no longer removed. */ in dlm_master_lookup()
1014 up the master for this rsb */ in dlm_master_lookup()
1025 finds the rsb on the keep list and ignores the remove, in dlm_master_lookup()
1040 /* the rsb was inactive (on toss list) */ in dlm_master_lookup()
1043 /* the rsb was active */ in dlm_master_lookup()
1164 /* Attaching/detaching lkb's from rsb's is for rsb reference counting.
1165 The rsb must exist as long as any lkb's for it do. */
1242 /* __put_lkb() is used when an lkb may not have an rsb attached to
1310 /* add/remove lkb to rsb's grant/convert/wait queue */
1622 /* If there's an rsb for the same resource being removed, ensure
1673 /* If we're the directory record for this rsb, and in shrink_bucket()
1695 /* We're the master of this rsb but we're not in shrink_bucket()
1710 log_error(ls, "tossed rsb in use %s", r->res_name); in shrink_bucket()
1725 * While searching for rsb's to free, we found some that require in shrink_bucket()
1732 * From the time the rsb is removed from toss until just after in shrink_bucket()
1733 * send_remove, the rsb name is saved in ls_remove_name. A new in shrink_bucket()
1852 and then lock rsb because of lock ordering in add_timeout. We may need
1953 b=0 lvb written to rsb or invalidated in set_lvb_lock()
2049 /* Manipulate lkb's on rsb's convert/granted/waiting queues
2344 * locks for a recovered rsb, on which lkb's have been rebuilt. in _can_be_granted()
2694 lkb using the nodeid field in the given rsb. If the rsb's nodeid is
2696 0. If the rsb's nodeid is _not_ known, it needs to be looked up
2699 When the rsb nodeid is being looked up remotely, the initial lkb
2701 lookup reply. Other lkb's waiting for the same rsb lookup are kept
2702 on the rsb's res_lookup list until the master is verified.
2705 0: nodeid is set in rsb/lkb and the caller should go ahead and use it
2706 1: the rsb master is not available and the lkb has been placed on
2770 /* confirm_master -- confirm (or deny) an rsb's master nodeid */
2861 an active lkb cannot be modified before locking the rsb */ in set_lock_args()
2961 /* an lkb may be waiting for an rsb lookup to complete where the in validate_unlock_args()
3226 /* add a new lkb to a possibly new rsb, called by requesting process */
3696 /* FIXME: if this lkb is the only lock we hold on the rsb, then set
3697 MASTER_UNCERTAIN to force the next request on the rsb to confirm
3973 /* This is called after the rsb is locked so that we can safely inspect
4107 for this rsb or not, so if the master sends us a request, we should in receive_request()
4108 recreate the rsb if we've destroyed it. This race happens when we in receive_request()
4110 node sends us a request for the rsb. */ in receive_request()
4429 recreate the master rsb when it gets a request from the dir node for in receive_remove()
4430 an rsb it doesn't have. */ in receive_remove()
4442 /* verify the rsb is on keep list per comment above */ in receive_remove()
4480 log_error(ls, "receive_remove from %d rsb ref error", in receive_remove()
4558 /* find_rsb failed to find rsb or rsb wasn't master */ in receive_request_reply()
4820 rsb before we've received the dir node's loookup_reply for it. in receive_lookup_reply()
5513 * previously blocked locks to now be granted. The subset of rsb's
5517 * Simplest would be to go through each master rsb and check for non-empty
5521 * rsb's very inefficient. So, we rely on earlier recovery routines
5522 * to set RECOVER_GRANT on any rsb's that we should attempt to grant
5622 until all locks have been rebuilt on the rsb (recover_conversion) */ in receive_rcom_lock_args()
5635 to check if the rsb already has an lkb with the given remote nodeid/lkid.
5657 /* In general we expect the rsb returned to be R_MASTER, but we don't in dlm_recover_master_copy()
5660 locks before we've made ourselves master of this rsb. We can still in dlm_recover_master_copy()
6133 granted. Regardless of what rsb queue the lock is on, it's removed and