* [PATCH 0/3] libceph: target_copy() fixups
@ 2020-06-16 7:44 Ilya Dryomov
2020-06-16 7:44 ` [PATCH 1/3] libceph: don't omit recovery_deletes in target_copy() Ilya Dryomov
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Ilya Dryomov @ 2020-06-16 7:44 UTC (permalink / raw)
To: ceph-devel; +Cc: Jeff Layton
Hello,
Split into three commits for backporting reasons: the first two can be
picked up by stable, the third should get some soak time in testing.
Thanks,
Ilya
Ilya Dryomov (3):
libceph: don't omit recovery_deletes in target_copy()
libceph: don't omit used_replica in target_copy()
libceph: use target_copy() in send_linger()
net/ceph/osd_client.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
--
2.19.2
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/3] libceph: don't omit recovery_deletes in target_copy()
2020-06-16 7:44 [PATCH 0/3] libceph: target_copy() fixups Ilya Dryomov
@ 2020-06-16 7:44 ` Ilya Dryomov
2020-06-16 7:44 ` [PATCH 2/3] libceph: don't omit used_replica " Ilya Dryomov
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Ilya Dryomov @ 2020-06-16 7:44 UTC (permalink / raw)
To: ceph-devel; +Cc: Jeff Layton
Currently target_copy() is used only for sending linger pings, so
this doesn't come up, but generally omitting recovery_deletes can
result in unneeded resends (force_resend in calc_target()).
Fixes: ae78dd8139ce ("libceph: make RECOVERY_DELETES feature create a new interval")
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
---
net/ceph/osd_client.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/ceph/osd_client.c b/net/ceph/osd_client.c
index a37d159019a0..8f7fbe861dff 100644
--- a/net/ceph/osd_client.c
+++ b/net/ceph/osd_client.c
@@ -445,6 +445,7 @@ static void target_copy(struct ceph_osd_request_target *dest,
dest->size = src->size;
dest->min_size = src->min_size;
dest->sort_bitwise = src->sort_bitwise;
+ dest->recovery_deletes = src->recovery_deletes;
dest->flags = src->flags;
dest->paused = src->paused;
--
2.19.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/3] libceph: don't omit used_replica in target_copy()
2020-06-16 7:44 [PATCH 0/3] libceph: target_copy() fixups Ilya Dryomov
2020-06-16 7:44 ` [PATCH 1/3] libceph: don't omit recovery_deletes in target_copy() Ilya Dryomov
@ 2020-06-16 7:44 ` Ilya Dryomov
2020-06-16 7:44 ` [PATCH 3/3] libceph: use target_copy() in send_linger() Ilya Dryomov
2020-06-16 11:33 ` [PATCH 0/3] libceph: target_copy() fixups Jeff Layton
3 siblings, 0 replies; 5+ messages in thread
From: Ilya Dryomov @ 2020-06-16 7:44 UTC (permalink / raw)
To: ceph-devel; +Cc: Jeff Layton
Currently target_copy() is used only for sending linger pings, so
this doesn't come up, but generally omitting used_replica can hang
the client as we wouldn't notice the acting set change (legacy_change
in calc_target()) or trigger a warning in handle_reply().
Fixes: 117d96a04f00 ("libceph: support for balanced and localized reads")
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
---
net/ceph/osd_client.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/ceph/osd_client.c b/net/ceph/osd_client.c
index 8f7fbe861dff..2db8b44e70c2 100644
--- a/net/ceph/osd_client.c
+++ b/net/ceph/osd_client.c
@@ -448,6 +448,7 @@ static void target_copy(struct ceph_osd_request_target *dest,
dest->recovery_deletes = src->recovery_deletes;
dest->flags = src->flags;
+ dest->used_replica = src->used_replica;
dest->paused = src->paused;
dest->epoch = src->epoch;
--
2.19.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 3/3] libceph: use target_copy() in send_linger()
2020-06-16 7:44 [PATCH 0/3] libceph: target_copy() fixups Ilya Dryomov
2020-06-16 7:44 ` [PATCH 1/3] libceph: don't omit recovery_deletes in target_copy() Ilya Dryomov
2020-06-16 7:44 ` [PATCH 2/3] libceph: don't omit used_replica " Ilya Dryomov
@ 2020-06-16 7:44 ` Ilya Dryomov
2020-06-16 11:33 ` [PATCH 0/3] libceph: target_copy() fixups Jeff Layton
3 siblings, 0 replies; 5+ messages in thread
From: Ilya Dryomov @ 2020-06-16 7:44 UTC (permalink / raw)
To: ceph-devel; +Cc: Jeff Layton
Instead of copying just oloc, oid and flags, copy the entire
linger target. This is more for consistency than anything else,
as send_linger() -> submit_request() -> __submit_request() sends
the request regardless of what calc_target() says (i.e. both on
CALC_TARGET_NO_ACTION and CALC_TARGET_NEED_RESEND).
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
---
net/ceph/osd_client.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/net/ceph/osd_client.c b/net/ceph/osd_client.c
index 2db8b44e70c2..db6abb5a5511 100644
--- a/net/ceph/osd_client.c
+++ b/net/ceph/osd_client.c
@@ -3076,9 +3076,7 @@ static void send_linger(struct ceph_osd_linger_request *lreq)
cancel_linger_request(req);
request_reinit(req);
- ceph_oid_copy(&req->r_base_oid, &lreq->t.base_oid);
- ceph_oloc_copy(&req->r_base_oloc, &lreq->t.base_oloc);
- req->r_flags = lreq->t.flags;
+ target_copy(&req->r_t, &lreq->t);
req->r_mtime = lreq->mtime;
mutex_lock(&lreq->lock);
--
2.19.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 0/3] libceph: target_copy() fixups
2020-06-16 7:44 [PATCH 0/3] libceph: target_copy() fixups Ilya Dryomov
` (2 preceding siblings ...)
2020-06-16 7:44 ` [PATCH 3/3] libceph: use target_copy() in send_linger() Ilya Dryomov
@ 2020-06-16 11:33 ` Jeff Layton
3 siblings, 0 replies; 5+ messages in thread
From: Jeff Layton @ 2020-06-16 11:33 UTC (permalink / raw)
To: Ilya Dryomov, ceph-devel
On Tue, 2020-06-16 at 09:44 +0200, Ilya Dryomov wrote:
> Hello,
>
> Split into three commits for backporting reasons: the first two can be
> picked up by stable, the third should get some soak time in testing.
>
> Thanks,
>
> Ilya
>
>
> Ilya Dryomov (3):
> libceph: don't omit recovery_deletes in target_copy()
> libceph: don't omit used_replica in target_copy()
> libceph: use target_copy() in send_linger()
>
> net/ceph/osd_client.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
These all look sane to me:
Reviewed-by: Jeff Layton <jlayton@kernel.org>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-06-16 11:33 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-16 7:44 [PATCH 0/3] libceph: target_copy() fixups Ilya Dryomov
2020-06-16 7:44 ` [PATCH 1/3] libceph: don't omit recovery_deletes in target_copy() Ilya Dryomov
2020-06-16 7:44 ` [PATCH 2/3] libceph: don't omit used_replica " Ilya Dryomov
2020-06-16 7:44 ` [PATCH 3/3] libceph: use target_copy() in send_linger() Ilya Dryomov
2020-06-16 11:33 ` [PATCH 0/3] libceph: target_copy() fixups Jeff Layton
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 NNTP newsgroup(s).