ceph: fix the debug message for calc_layout
RFC PATCH 1/1 ceph: fix the debug message for calc_layout
From: Xiubo Li <[email protected]>
Signed-off-by Xiubo Li <[email protected]>
--- net/ceph/osd_client.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
net/ceph/osd_client.c +3 -2
@@ -113,10 +113,11 @@ static int calc_layout(struct ceph_file_layout *layout, u64 off, u64 *plen,if (*objlen < orig_len) { *plen = *objlen;dout (" skipping last %llu, final file extent %llu~%llu\n" , - orig_len - *plen, off, *plen); + orig_len - *plen, off, off + *plen); } -dout ("calc_layout objnum=%llx %llu~%llu\n" , *objnum, *objoff, *objlen); +dout ("calc_layout objnum=%llx, object extent %llu~%llu\n" , *objnum, + *objoff, *objoff + *objlen);return 0 ; }
Signature · 1 line
2.21.0
Ilya Dryomov
maintainerQuoted 13 lines · On Mon, Feb 3, 2020 at 5:02 AM <[email protected]> wrote:
From: Xiubo Li <[email protected]>
Signed-off-by Xiubo Li <[email protected]>--- net/ceph/osd_client.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)net/ceph/osd_client.c +0
-0
net/ceph/osd_client.c static int calc_layout(struct ceph_file_layout *layout, u64 off, u64 *plen, · line 120
Quoted 10 lines
net/ceph/osd_client.c +3
-2@@ -113,10 +113,11 @@ static int calc_layout(struct ceph_file_layout *layout, u64 off, u64 *plen,if (*objlen < orig_len) { *plen = *objlen;dout (" skipping last %llu, final file extent %llu~%llu\n" , - orig_len - *plen, off, *plen); + orig_len - *plen, off, off + *plen); } -dout ("calc_layout objnum=%llx %llu~%llu\n" , *objnum, *objoff, *objlen); +dout ("calc_layout objnum=%llx, object extent %llu~%llu\n" , *objnum, + *objoff, *objoff + *objlen);
Hi Xiubo,
offset~length is how extents are printed both on the OSD side and elsewhere in the kernel client.
Thanks,
Ilya
Quoted 20 lines · Ilya Dryomov
Quoted 19 lines · On Mon, Feb 3, 2020 at 5:02 AM <[email protected]> wrote:
From: Xiubo Li <[email protected]>
Signed-off-by Xiubo Li <[email protected]>--- net/ceph/osd_client.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)net/ceph/osd_client.c +1
-1@@ -113,10 +113,11 @@ static int calc_layout(struct ceph_file_layout *layout, u64 off, u64 *plen,if (*objlen < orig_len) { *plen = *objlen;dout (" skipping last %llu, final file extent %llu~%llu\n" , - orig_len - *plen, off, *plen); + orig_len - *plen, off, off + *plen); }
Quoted 7 lines
net/ceph/osd_client.c static int calc_layout(struct ceph_file_layout *layout, u64 off, u64 *plen, · line 120
Quoted 3 lines
net/ceph/osd_client.c +2
-1-dout ("calc_layout objnum=%llx %llu~%llu\n" , *objnum, *objoff, *objlen); +dout ("calc_layout objnum=%llx, object extent %llu~%llu\n" , *objnum, + *objoff, *objoff + *objlen);Hi Xiubo,
offset~length is how extents are printed both on the OSD side and elsewhere in the kernel client.
Okay, so my understanding is not correct then.
Thanks.
Quoted 4 lines
Thanks,
Ilya