[LU-6401] Untangle lustre userland and kernel headers Created: 25/Mar/15 Updated: 29/May/19 Resolved: 13/Aug/17 |
|
| Status: | Resolved |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | Lustre 2.8.0 |
| Fix Version/s: | Lustre 2.11.0 |
| Type: | Improvement | Priority: | Minor |
| Reporter: | James A Simmons | Assignee: | Ben Evans (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | patch, upstream | ||
| Issue Links: |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
| Epic/Theme: | upstream | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| Rank (Obsolete): | 9223372036854775807 | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| Description |
|
Much like the current situation with libcfs the headers for lustre being used internally for the kernel and for userland utilites is heavly intertwined. This work will look to unravel this mess and create a clear separation between lustre kernel space and lustre user land. |
| Comments |
| Comment by Jian Yu [ 26/Mar/15 ] |
|
Hi James, |
| Comment by James A Simmons [ 26/Mar/15 ] |
|
Yes soon but they are not ready. Wanted this ticket has a place holder until then. |
| Comment by Ben Evans (Inactive) [ 03/Aug/15 ] |
|
I'm working on a bunch of changes for this. What would be the best way of submitting them, the deltas here are pretty large (mostly cutting+pasting). |
| Comment by Jian Yu [ 03/Aug/15 ] |
|
Hi Ben, |
| Comment by James A Simmons [ 03/Aug/15 ] |
|
Thank you for doing this work. Please break up the patches as small as possible where each patch does one specific change. The reason for this is these patches will be going upstream and very large patches that doing many things will be rejected since it is hard to inspect such a patch. Also any tabs or style changes should be patches in themselves. Don't be afraid to push what you have now. I will gladly review your patches. |
| Comment by Gerrit Updater [ 11/Aug/15 ] |
|
Ben Evans (bevans@cray.com) uploaded a new patch: http://review.whamcloud.com/15952 |
| Comment by James A Simmons [ 11/Aug/15 ] |
|
Ben looking at the patch could you place that new header in lustre/include/lustre/* since it used by wiretest which is a user land app. |
| Comment by Ben Evans (Inactive) [ 11/Aug/15 ] |
|
No problem, reworking the patch because it didn't get submitted correctly. Moving it to lustre/include/lustre is no problem. |
| Comment by Ben Evans (Inactive) [ 13/Aug/15 ] |
|
Given the comments in the patch I created from John Hammond, how should I proceed here? Giant include files like lustre_idl.h and lustre_user.h are pretty clunky, and really don't keep things organized in any easily maintainable and understandable way, and they tend to be the "easy out" for development (just include the one giant thing and be done with it). My idea for separating things into files by function, and including all the "on the wire" data structures #include'd there seems to me to be a good way of cleaning up the code, and making it more maintainable. |
| Comment by Gerrit Updater [ 02/Sep/15 ] |
|
Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/15952/ |
| Comment by James A Simmons [ 02/Sep/15 ] |
|
I wish this was fixed but a lot more work needs to be done. Could you reopen this ticket and remove the Fix Version field. |
| Comment by Joseph Gmitter (Inactive) [ 02/Sep/15 ] |
|
James, |
| Comment by Gerrit Updater [ 09/Sep/15 ] |
|
Ben Evans (bevans@cray.com) uploaded a new patch: http://review.whamcloud.com/16339 |
| Comment by Ben Evans (Inactive) [ 09/Sep/15 ] |
|
Should I create separate LUs for each one of these patches I do? I expect there to be a long series of them. |
| Comment by James A Simmons [ 10/Sep/15 ] |
|
That would be a lot of patches. I think it is okay to keep them under this ticket. |
| Comment by James A Simmons [ 18/Sep/15 ] |
|
Building some of test apps I hit |
| Comment by Gerrit Updater [ 20/Sep/15 ] |
|
James Simmons (uja.ornl@yahoo.com) uploaded a new patch: http://review.whamcloud.com/16494 |
| Comment by Gerrit Updater [ 02/Oct/15 ] |
|
Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/16494/ |
| Comment by Gerrit Updater [ 22/Oct/15 ] |
|
Ben Evans (bevans@cray.com) uploaded a new patch: http://review.whamcloud.com/16917 |
| Comment by Gerrit Updater [ 23/Dec/15 ] |
|
James Simmons (uja.ornl@yahoo.com) uploaded a new patch: http://review.whamcloud.com/17720 |
| Comment by Gerrit Updater [ 07/Jan/16 ] |
|
Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/17720/ |
| Comment by Gerrit Updater [ 14/Jan/16 ] |
|
Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/16339/ |
| Comment by Gerrit Updater [ 10/Mar/16 ] |
|
Ben Evans (bevans@cray.com) uploaded a new patch: http://review.whamcloud.com/18863 |
| Comment by Gerrit Updater [ 23/Mar/16 ] |
|
Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/16917/ |
| Comment by Gerrit Updater [ 31/Mar/16 ] |
|
Ben Evans (bevans@cray.com) uploaded a new patch: http://review.whamcloud.com/19266 |
| Comment by Gerrit Updater [ 11/Apr/16 ] |
|
Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/18863/ |
| Comment by Gerrit Updater [ 11/May/16 ] |
|
Ben Evans (bevans@cray.com) uploaded a new patch: http://review.whamcloud.com/20120 |
| Comment by Gerrit Updater [ 05/Jul/16 ] |
|
Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/19266/ |
| Comment by Gerrit Updater [ 11/Jul/16 ] |
|
Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/20120/ |
| Comment by Jian Yu [ 19/Jul/16 ] |
|
Hi Ben, |
| Comment by James A Simmons [ 19/Jul/16 ] |
|
Its far from being done. |
| Comment by Ben Evans (Inactive) [ 20/Jul/16 ] |
|
There is a lot left to do. I'll indicate when this process is done. |
| Comment by Jian Yu [ 20/Jul/16 ] |
|
Thank you James and Ben. |
| Comment by Gerrit Updater [ 22/Jul/16 ] |
|
Ben Evans (bevans@cray.com) uploaded a new patch: http://review.whamcloud.com/21484 |
| Comment by Gerrit Updater [ 22/Aug/16 ] |
|
Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/21484/ |
| Comment by Gerrit Updater [ 15/Sep/16 ] |
|
James Simmons (uja.ornl@yahoo.com) uploaded a new patch: http://review.whamcloud.com/22522 |
| Comment by Gerrit Updater [ 23/Sep/16 ] |
|
Ben Evans (bevans@cray.com) uploaded a new patch: http://review.whamcloud.com/22712 |
| Comment by Gerrit Updater [ 29/Sep/16 ] |
|
Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/22522/ |
| Comment by Gerrit Updater [ 13/Dec/16 ] |
|
James Simmons (uja.ornl@yahoo.com) uploaded a new patch: https://review.whamcloud.com/24323 |
| Comment by Gerrit Updater [ 13/Dec/16 ] |
|
James Simmons (uja.ornl@yahoo.com) uploaded a new patch: https://review.whamcloud.com/24325 |
| Comment by Gerrit Updater [ 15/Dec/16 ] |
|
James Simmons (uja.ornl@yahoo.com) uploaded a new patch: https://review.whamcloud.com/24374 |
| Comment by Gerrit Updater [ 01/Jan/17 ] |
|
Oleg Drokin (oleg.drokin@intel.com) merged in patch https://review.whamcloud.com/22712/ |
| Comment by Gerrit Updater [ 01/Jan/17 ] |
|
Oleg Drokin (oleg.drokin@intel.com) merged in patch https://review.whamcloud.com/24323/ |
| Comment by Gerrit Updater [ 01/Jan/17 ] |
|
James Simmons (uja.ornl@yahoo.com) uploaded a new patch: https://review.whamcloud.com/24568 |
| Comment by Gerrit Updater [ 01/Jan/17 ] |
|
James Simmons (uja.ornl@yahoo.com) uploaded a new patch: https://review.whamcloud.com/24569 |
| Comment by Gerrit Updater [ 01/Feb/17 ] |
|
James Simmons (uja.ornl@yahoo.com) uploaded a new patch: https://review.whamcloud.com/25194 |
| Comment by Gerrit Updater [ 03/Feb/17 ] |
|
James Simmons (uja.ornl@yahoo.com) uploaded a new patch: https://review.whamcloud.com/25246 |
| Comment by Gerrit Updater [ 30/Mar/17 ] |
|
Oleg Drokin (oleg.drokin@intel.com) merged in patch https://review.whamcloud.com/25194/ |
| Comment by Gerrit Updater [ 01/May/17 ] |
|
Oleg Drokin (oleg.drokin@intel.com) merged in patch https://review.whamcloud.com/24568/ |
| Comment by Gerrit Updater [ 01/May/17 ] |
|
Oleg Drokin (oleg.drokin@intel.com) merged in patch https://review.whamcloud.com/24569/ |
| Comment by Gerrit Updater [ 05/May/17 ] |
|
James Simmons (uja.ornl@yahoo.com) uploaded a new patch: https://review.whamcloud.com/26966 |
| Comment by Gerrit Updater [ 20/May/17 ] |
|
Oleg Drokin (oleg.drokin@intel.com) merged in patch https://review.whamcloud.com/24325/ |
| Comment by James A Simmons [ 24/May/17 ] |
|
One outstanding patch and I have the final one in the works. Almost done but I'm down to one last issue. For lustre_ioctl.h which is an UAPI headers to have CONFIG_LUSTRE_OBD_MAX_IOCTL_BUFFER is a big no no. So I see two ways this can be handled. One is make OBD_MAX_IOCTL_BUFFER a constant or make this a module parameter. Which approach should be done? |
| Comment by Andreas Dilger [ 25/May/17 ] |
|
Can you explain what is wrong with that parameter? I honestly don't think we'll change it any time soon, so it could be moved to an internal header. That said, what is wrong with exposing this constant to userspace? |
| Comment by John Hammond [ 25/May/17 ] |
0 lustre/include/uapi/linux/lustre_ioctl.h <global> 65 #define OBD_MAX_IOCTL_BUFFER CONFIG_LUSTRE_OBD_MAX_IOCTL_BUFFER
1 lustre/obdclass/linux/linux-module.c obd_ioctl_getdata 167 if (hdr.ioc_len > OBD_MAX_IOCTL_BUFFER) {
2 lustre/obdclass/linux/linux-module.c obd_ioctl_getdata 169 hdr.ioc_len, OBD_MAX_IOCTL_BUFFER);
3 lustre/utils/liblustreapi.c cb_migrate_mdt_init 3853 char raw[OBD_MAX_IOCTL_BUFFER] = {'\0'};
4 lustre/utils/liblustreapi.c llapi_obd_fstatfs 4167 char raw[OBD_MAX_IOCTL_BUFFER] = {'\0'};
5 lustre/utils/obd.c jt_obd_lov_getconfig 2219 desc.ld_tgt_count =
((OBD_MAX_IOCTL_BUFFER-sizeof(data)-sizeof(desc)) /
In cb_migrate_mdt_init() and llapi_obd_fstatfs() use of OBD_MAX_IOCTL_BUFFER can easily be replaced by using dynamic allocation from obd_ioctl_pack(). lctl lov_getconfig should just be deleted. But if that's not politically feasible then all of the information it prints can be gotten from lov proc. Then there are no more uses of OBD_MAX_IOCTL_BUFFER in userspace. |
| Comment by James A Simmons [ 26/May/17 ] |
|
Last two patches have been updated that will finish this ticket !!!! |
| Comment by Jian Yu [ 26/May/17 ] |
|
Thank you James! |
| Comment by Gerrit Updater [ 07/Jun/17 ] |
|
Oleg Drokin (oleg.drokin@intel.com) merged in patch https://review.whamcloud.com/26966/ |
| Comment by Chris Horn [ 12/Jul/17 ] |
|
Was it intentional to remove the 8 character filesystem name limit in commit 424e56abd685c5eabc6a276154dec1c031cf5044 ?
And if so, is there an LUDOC for that change? |
| Comment by Chris Horn [ 12/Jul/17 ] |
|
If that change was intentional then there's a bug with mkfs.lustre rename option that restricts a rename to 8 characters. |
| Comment by Cory Spitz [ 12/Jul/17 ] |
|
8 vs 16 length issue reported at |
| Comment by Gerrit Updater [ 13/Aug/17 ] |
|
Oleg Drokin (oleg.drokin@intel.com) merged in patch https://review.whamcloud.com/25246/ |
| Comment by James A Simmons [ 13/Aug/17 ] |
|
After 3 years of work this is complete. |
| Comment by Colin Faber [X] (Inactive) [ 29/May/19 ] |
|
And nearly 3 years later it's still not closed =) |
| Comment by James A Simmons [ 29/May/19 ] |
|
Oops. Forgot to close it out. |