gfs2.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Jeff Layton <jlayton@kernel.org>
To: Alexander Aring <aahringo@redhat.com>, teigland@redhat.com
Cc: gfs2@lists.linux.dev
Subject: Re: [PATCH v6.7-rc1 2/3] dlm: use FL_SLEEP to determine blocking vs non-blocking
Date: Mon, 13 Nov 2023 16:27:00 -0500	[thread overview]
Message-ID: <7d0d278ee30c09c868c59c80ef6a4cf9dee5683c.camel@kernel.org> (raw)
In-Reply-To: <20231113212411.4187690-2-aahringo@redhat.com>

On Mon, 2023-11-13 at 16:24 -0500, Alexander Aring wrote:
> This patch uses the FL_SLEEP flag in struct file_lock to determine if
> the lock request is a blocking or non-blocking request. Before dlm was
> using IS_SETLKW() was being used which is not usable for lock requests
> coming from lockd when EXPORT_OP_SAFE_ASYNC_LOCK inside the export flags
> is set.
> 
> Signed-off-by: Alexander Aring <aahringo@redhat.com>
> ---
>  fs/dlm/plock.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/dlm/plock.c b/fs/dlm/plock.c
> index ee6e0236d4f8..d814c5121367 100644
> --- a/fs/dlm/plock.c
> +++ b/fs/dlm/plock.c
> @@ -140,7 +140,7 @@ int dlm_posix_lock(dlm_lockspace_t *lockspace, u64 number, struct file *file,
>  	op->info.optype		= DLM_PLOCK_OP_LOCK;
>  	op->info.pid		= fl->fl_pid;
>  	op->info.ex		= (fl->fl_type == F_WRLCK);
> -	op->info.wait		= IS_SETLKW(cmd);
> +	op->info.wait		= !!(fl->fl_flags & FL_SLEEP);
>  	op->info.fsid		= ls->ls_global_id;
>  	op->info.number		= number;
>  	op->info.start		= fl->fl_start;

Reviewed-by: Jeff Layton <jlayton@kernel.org>

  reply	other threads:[~2023-11-13 21:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-13 21:24 [PATCH v6.7-rc1 1/3] dlm: use fl_owner from lockd Alexander Aring
2023-11-13 21:24 ` [PATCH v6.7-rc1 2/3] dlm: use FL_SLEEP to determine blocking vs non-blocking Alexander Aring
2023-11-13 21:27   ` Jeff Layton [this message]
2023-11-13 21:24 ` [PATCH v6.7-rc1 3/3] dlm: implement EXPORT_OP_ASYNC_LOCK Alexander Aring

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7d0d278ee30c09c868c59c80ef6a4cf9dee5683c.camel@kernel.org \
    --to=jlayton@kernel.org \
    --cc=aahringo@redhat.com \
    --cc=gfs2@lists.linux.dev \
    --cc=teigland@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).