Re: [PATCH 1a/7] dlm: core locking

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 4/25/05, David Teigland <[email protected]> wrote:
> [Apologies, patch 1 was too large on its own.]
> 
> The core dlm functions.  Processes dlm_lock() and dlm_unlock() requests.
> Creates lockspaces which give applications separate contexts/namespaces in
> which to do their locking.  Manages locks on resources' grant/convert/wait
> queues.  Sends and receives high level locking operations between nodes.
> Delivers completion and blocking callbacks (ast's) to lock holders.
> Manages the distributed directory that tracks the current master node for
> each resource.
> 
> Signed-Off-By: Dave Teigland <[email protected]>
> Signed-Off-By: Patrick Caulfield <[email protected]>

<snip>

> --- a/drivers/dlm/lockspace.c   1970-01-01 07:30:00.000000000 +0730
> +++ b/drivers/dlm/lockspace.c   2005-04-25 22:52:03.956816760 +0800

<snip>

> +int dlm_scand(void *data)
> +{
> +       struct dlm_ls *ls;
> +
> +       while (!kthread_should_stop()) {
> +               list_for_each_entry(ls, &lslist, ls_list)
> +                       dlm_scan_rsbs(ls);
> +               set_current_state(TASK_INTERRUPTIBLE);
> +               schedule_timeout(DLM_SCAN_SECS * HZ);
> +       }
> +       return 0;
> +}

<snip>

> +static void remove_lockspace(struct dlm_ls *ls)
> +{
> +       for (;;) {
> +               spin_lock(&lslist_lock);
> +               if (ls->ls_count == 0) {
> +                       list_del(&ls->ls_list);
> +                       spin_unlock(&lslist_lock);
> +                       return;
> +               }
> +               spin_unlock(&lslist_lock);
> +               set_current_state(TASK_INTERRUPTIBLE);
> +               schedule_timeout(HZ);
> +       }
> +}

<snip>

These can both be msleep_interruptible() calls?

Thanks,
Nish
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux