libceph: target_copy() fixups
Ilya Dryomov
maintainercover libceph: target_copy() fixups
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(-)
Signature · 1 line
2.19.2
Ilya Dryomov
maintainerPATCH 1/3 libceph: don't omit recovery_deletes in target_copy()
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()).
--- net/ceph/osd_client.c | 1 + 1 file changed, 1 insertion(+)
net/ceph/osd_client.c +1 -0
@@ -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;
Signature · 1 line
2.19.2
Ilya Dryomov
maintainerPATCH 2/3 libceph: don't omit used_replica in target_copy()
In reply to Ilya DryomovCurrently 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().
--- net/ceph/osd_client.c | 1 + 1 file changed, 1 insertion(+)
net/ceph/osd_client.c +1 -0
@@ -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;
Signature · 1 line
2.19.2
Ilya Dryomov
maintainerPATCH 3/3 libceph: use target_copy() in send_linger()
In reply to Ilya DryomovInstead 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).
--- net/ceph/osd_client.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
net/ceph/osd_client.c +1 -3
@@ -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);
Signature · 1 line
2.19.2
Quoted 10 lines · Ilya Dryomov
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
Quoted 8 lines
Ilya Dryomov (3):
libceph: don't omitrecovery_deletesintarget_copy()
libceph: don't omitused_replicaintarget_copy()
libceph: usetarget_copy()insend_linger()net/ceph/osd_client.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
These all look sane to me: