* [PATCH v3] ceph: skip the memories when received a higher version of message
@ 2022-03-01 14:39 xiubli
2022-03-01 14:43 ` Jeff Layton
0 siblings, 1 reply; 4+ messages in thread
From: xiubli @ 2022-03-01 14:39 UTC (permalink / raw)
To: jlayton; +Cc: idryomov, vshankar, ceph-devel, Xiubo Li
From: Xiubo Li <xiubli@redhat.com>
We should skip the extra memories which are from the higher version
just likes the libcephfs client does.
URL: https://tracker.ceph.com/issues/54430
Signed-off-by: Xiubo Li <xiubli@redhat.com>
---
fs/ceph/mds_client.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c
index 94b4c6508044..608d077f2eeb 100644
--- a/fs/ceph/mds_client.c
+++ b/fs/ceph/mds_client.c
@@ -313,6 +313,7 @@ static int parse_reply_info_lease(void **p, void *end,
{
u8 struct_v;
u32 struct_len;
+ void *lend;
if (features == (u64)-1) {
u8 struct_compat;
@@ -332,6 +333,7 @@ static int parse_reply_info_lease(void **p, void *end,
*altname = NULL;
}
+ lend = *p + struct_len;
ceph_decode_need(p, end, struct_len, bad);
*lease = *p;
*p += sizeof(**lease);
@@ -347,6 +349,7 @@ static int parse_reply_info_lease(void **p, void *end,
*altname_len = 0;
}
}
+ *p = lend;
return 0;
bad:
return -EIO;
--
2.27.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v3] ceph: skip the memories when received a higher version of message
2022-03-01 14:39 [PATCH v3] ceph: skip the memories when received a higher version of message xiubli
@ 2022-03-01 14:43 ` Jeff Layton
2022-03-01 14:45 ` Xiubo Li
2022-03-02 6:17 ` Xiubo Li
0 siblings, 2 replies; 4+ messages in thread
From: Jeff Layton @ 2022-03-01 14:43 UTC (permalink / raw)
To: xiubli; +Cc: idryomov, vshankar, ceph-devel
On Tue, 2022-03-01 at 22:39 +0800, xiubli@redhat.com wrote:
> From: Xiubo Li <xiubli@redhat.com>
>
> We should skip the extra memories which are from the higher version
> just likes the libcephfs client does.
>
> URL: https://tracker.ceph.com/issues/54430
> Signed-off-by: Xiubo Li <xiubli@redhat.com>
> ---
> fs/ceph/mds_client.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c
> index 94b4c6508044..608d077f2eeb 100644
> --- a/fs/ceph/mds_client.c
> +++ b/fs/ceph/mds_client.c
> @@ -313,6 +313,7 @@ static int parse_reply_info_lease(void **p, void *end,
> {
> u8 struct_v;
> u32 struct_len;
> + void *lend;
>
> if (features == (u64)-1) {
> u8 struct_compat;
> @@ -332,6 +333,7 @@ static int parse_reply_info_lease(void **p, void *end,
> *altname = NULL;
> }
>
> + lend = *p + struct_len;
> ceph_decode_need(p, end, struct_len, bad);
> *lease = *p;
> *p += sizeof(**lease);
> @@ -347,6 +349,7 @@ static int parse_reply_info_lease(void **p, void *end,
> *altname_len = 0;
> }
> }
> + *p = lend;
> return 0;
> bad:
> return -EIO;
Feel free to fold this into the appropriate patch in wip-fscrypt if you
like...
Reviewed-by: Jeff Layton <jlayton@kernel.org>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v3] ceph: skip the memories when received a higher version of message
2022-03-01 14:43 ` Jeff Layton
@ 2022-03-01 14:45 ` Xiubo Li
2022-03-02 6:17 ` Xiubo Li
1 sibling, 0 replies; 4+ messages in thread
From: Xiubo Li @ 2022-03-01 14:45 UTC (permalink / raw)
To: Jeff Layton; +Cc: idryomov, vshankar, ceph-devel
On 3/1/22 10:43 PM, Jeff Layton wrote:
> On Tue, 2022-03-01 at 22:39 +0800, xiubli@redhat.com wrote:
>> From: Xiubo Li <xiubli@redhat.com>
>>
>> We should skip the extra memories which are from the higher version
>> just likes the libcephfs client does.
>>
>> URL: https://tracker.ceph.com/issues/54430
>> Signed-off-by: Xiubo Li <xiubli@redhat.com>
>> ---
>> fs/ceph/mds_client.c | 3 +++
>> 1 file changed, 3 insertions(+)
>>
>> diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c
>> index 94b4c6508044..608d077f2eeb 100644
>> --- a/fs/ceph/mds_client.c
>> +++ b/fs/ceph/mds_client.c
>> @@ -313,6 +313,7 @@ static int parse_reply_info_lease(void **p, void *end,
>> {
>> u8 struct_v;
>> u32 struct_len;
>> + void *lend;
>>
>> if (features == (u64)-1) {
>> u8 struct_compat;
>> @@ -332,6 +333,7 @@ static int parse_reply_info_lease(void **p, void *end,
>> *altname = NULL;
>> }
>>
>> + lend = *p + struct_len;
>> ceph_decode_need(p, end, struct_len, bad);
>> *lease = *p;
>> *p += sizeof(**lease);
>> @@ -347,6 +349,7 @@ static int parse_reply_info_lease(void **p, void *end,
>> *altname_len = 0;
>> }
>> }
>> + *p = lend;
>> return 0;
>> bad:
>> return -EIO;
> Feel free to fold this into the appropriate patch in wip-fscrypt if you
> like...
>
> Reviewed-by: Jeff Layton <jlayton@kernel.org>
>
Sure.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v3] ceph: skip the memories when received a higher version of message
2022-03-01 14:43 ` Jeff Layton
2022-03-01 14:45 ` Xiubo Li
@ 2022-03-02 6:17 ` Xiubo Li
1 sibling, 0 replies; 4+ messages in thread
From: Xiubo Li @ 2022-03-02 6:17 UTC (permalink / raw)
To: Jeff Layton; +Cc: idryomov, vshankar, ceph-devel
On 3/1/22 10:43 PM, Jeff Layton wrote:
> On Tue, 2022-03-01 at 22:39 +0800, xiubli@redhat.com wrote:
>> From: Xiubo Li <xiubli@redhat.com>
>>
>> We should skip the extra memories which are from the higher version
>> just likes the libcephfs client does.
>>
>> URL: https://tracker.ceph.com/issues/54430
>> Signed-off-by: Xiubo Li <xiubli@redhat.com>
>> ---
>> fs/ceph/mds_client.c | 3 +++
>> 1 file changed, 3 insertions(+)
>>
>> diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c
>> index 94b4c6508044..608d077f2eeb 100644
>> --- a/fs/ceph/mds_client.c
>> +++ b/fs/ceph/mds_client.c
>> @@ -313,6 +313,7 @@ static int parse_reply_info_lease(void **p, void *end,
>> {
>> u8 struct_v;
>> u32 struct_len;
>> + void *lend;
>>
>> if (features == (u64)-1) {
>> u8 struct_compat;
>> @@ -332,6 +333,7 @@ static int parse_reply_info_lease(void **p, void *end,
>> *altname = NULL;
>> }
>>
>> + lend = *p + struct_len;
>> ceph_decode_need(p, end, struct_len, bad);
>> *lease = *p;
>> *p += sizeof(**lease);
>> @@ -347,6 +349,7 @@ static int parse_reply_info_lease(void **p, void *end,
>> *altname_len = 0;
>> }
>> }
>> + *p = lend;
>> return 0;
>> bad:
>> return -EIO;
> Feel free to fold this into the appropriate patch in wip-fscrypt if you
> like...
>
> Reviewed-by: Jeff Layton <jlayton@kernel.org>
Hi Jeff,
Done and I also have rebased wip-fscrypt branch to the testing branch.
Since I need some patches from testing branch to continue my another
snapshot related patch series.
- Xiubo
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-03-02 6:18 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-01 14:39 [PATCH v3] ceph: skip the memories when received a higher version of message xiubli
2022-03-01 14:43 ` Jeff Layton
2022-03-01 14:45 ` Xiubo Li
2022-03-02 6:17 ` Xiubo Li
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox