The existing patches have landed for 2.1.5 and 2.4. Please open a new ticket to track any further changes needed in this area of code.
Peter Jones
added a comment - The existing patches have landed for 2.1.5 and 2.4. Please open a new ticket to track any further changes needed in this area of code.
I decided to drop the "cfs_" prefix since there are other "sg_" calls in the code which do not use any "cfs_" wrappers. So to be consistent with those calls, I think it's best to leave them with the "sg_" prefix.
Prakash Surya (Inactive)
added a comment - I decided to drop the "cfs_" prefix since there are other "sg_" calls in the code which do not use any "cfs_" wrappers. So to be consistent with those calls, I think it's best to leave them with the "sg_" prefix.
Or maybe cfs_ prefix for this functions.
lnet/klnds/o2iblnd/o2iblnd_cb.c already use initialized sg, and set_page is faster then set_buf, because it skip addr to page conversion.
Alexander Boyko
added a comment - I think it`s better to add something like this to libcfs headers.
#ifndef HAVE_SCATTERLIST_INITTABLE
#define sg_init_table(sg, nents) memset(sg, 0, sizeof(*(sg))*(nents))
#endif
#ifndef HAVE_SCATTERLIST_SETPAGE
sg_set_page(sg, p, len, off) sg_set_buf(sg, page_address(p) + (off & ~CFS_PAGE_MASK), len)
#endif
Or maybe cfs_ prefix for this functions.
lnet/klnds/o2iblnd/o2iblnd_cb.c already use initialized sg, and set_page is faster then set_buf, because it skip addr to page conversion.
Those locations all make a direct call to sg_set_page which might need to change to sg_init_one.
Prakash Surya (Inactive)
added a comment - Some other places which may need similar fixes:
lnet/klnds/o2iblnd/o2iblnd_cb.c:730
lnet/klnds/o2iblnd/o2iblnd_cb.c:773
lustre/obdclass/capa.c:266
lustre/obdclass/capa.c:308
lustre/obdclass/capa.c:311
lustre/obdclass/capa.c:261
lustre/obdclass/capa.c:364
Those locations all make a direct call to sg_set_page which might need to change to sg_init_one.
Alexander, sure I'll merge your fix into mine. I'll update this ticket when I push the new version and add you to the review list. I should be able to do that later today.
Prakash Surya (Inactive)
added a comment - Alexander, sure I'll merge your fix into mine. I'll update this ticket when I push the new version and add you to the review list. I should be able to do that later today.
The existing patches have landed for 2.1.5 and 2.4. Please open a new ticket to track any further changes needed in this area of code.