All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ceph: call netfs_subreq_terminated with was_async == false
@ 2022-06-07 18:22 Jeff Layton
  2022-06-11  0:30 ` Xiubo Li
  0 siblings, 1 reply; 2+ messages in thread
From: Jeff Layton @ 2022-06-07 18:22 UTC (permalink / raw)
  To: xiubli; +Cc: idryomov, ceph-devel, David Howells

"was_async" is a bit misleadingly named. It's supposed to indicate
whether it's safe to call blocking operations from the context you're
calling it from, but it sounds like it's asking whether this was done
via async operation. For ceph, this it's always called from kernel
thread context so it should be safe to set this to false.

Cc: David Howells <dhowells@redhat.com>
Signed-off-by: Jeff Layton <jlayton@kernel.org>
---
 fs/ceph/addr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c
index 3489444c55b9..39e2c64d008f 100644
--- a/fs/ceph/addr.c
+++ b/fs/ceph/addr.c
@@ -241,7 +241,7 @@ static void finish_netfs_read(struct ceph_osd_request *req)
 	if (err >= 0 && err < subreq->len)
 		__set_bit(NETFS_SREQ_CLEAR_TAIL, &subreq->flags);
 
-	netfs_subreq_terminated(subreq, err, true);
+	netfs_subreq_terminated(subreq, err, false);
 
 	num_pages = calc_pages_for(osd_data->alignment, osd_data->length);
 	ceph_put_page_vector(osd_data->pages, num_pages, false);
-- 
2.36.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ceph: call netfs_subreq_terminated with was_async == false
  2022-06-07 18:22 [PATCH] ceph: call netfs_subreq_terminated with was_async == false Jeff Layton
@ 2022-06-11  0:30 ` Xiubo Li
  0 siblings, 0 replies; 2+ messages in thread
From: Xiubo Li @ 2022-06-11  0:30 UTC (permalink / raw)
  To: Jeff Layton; +Cc: idryomov, ceph-devel, David Howells


On 6/8/22 2:22 AM, Jeff Layton wrote:
> "was_async" is a bit misleadingly named. It's supposed to indicate
> whether it's safe to call blocking operations from the context you're
> calling it from, but it sounds like it's asking whether this was done
> via async operation. For ceph, this it's always called from kernel
> thread context so it should be safe to set this to false.
>
> Cc: David Howells <dhowells@redhat.com>
> Signed-off-by: Jeff Layton <jlayton@kernel.org>
> ---
>   fs/ceph/addr.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c
> index 3489444c55b9..39e2c64d008f 100644
> --- a/fs/ceph/addr.c
> +++ b/fs/ceph/addr.c
> @@ -241,7 +241,7 @@ static void finish_netfs_read(struct ceph_osd_request *req)
>   	if (err >= 0 && err < subreq->len)
>   		__set_bit(NETFS_SREQ_CLEAR_TAIL, &subreq->flags);
>   
> -	netfs_subreq_terminated(subreq, err, true);
> +	netfs_subreq_terminated(subreq, err, false);
>   
>   	num_pages = calc_pages_for(osd_data->alignment, osd_data->length);
>   	ceph_put_page_vector(osd_data->pages, num_pages, false);

Sorry, I think I missed this one.

LGTM. Thanks Jeff !

-- Xiubo


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-06-11  0:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-07 18:22 [PATCH] ceph: call netfs_subreq_terminated with was_async == false Jeff Layton
2022-06-11  0:30 ` Xiubo Li

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.