Details
-
Improvement
-
Resolution: Unresolved
-
Minor
-
None
-
None
-
None
-
3
-
9223372036854775807
Description
Lustre device handling is split between the legacy OBD infrastructure and the newer LU device infrastructure. Each subsystem in Lustre is a strange mix of these different paradigms. With very little standardization across Lustre, it's difficult to understand how each component of Lustre is started and stopped during mount and umounts. As a result, the mount state machine is difficult to debug and error prone. Further, the process of writing extensions to Lustre (notably OSDs) is frustrated by the lack of clear and consistent documentation and mechanism around create Lustre devices.
In no particular order, I've documented a number of tasks that can meaningfully improve Lustre's device handling:
- The methods `>o_process_config` and `>ldo_process_config` need to be deprecated in favor of proper generics. Explicit callers of these functions need to avoid crafting their own `llog` to run operations on devices.
- `lu_device` needs to have a proper `kref`.
- `lu_device_init()` and `lu_device_fini()` should be consolidated. The device init should probably happen immediately after `ldto_device_alloc()` and the device fini immediately before `ldto_device_free()`
- OBD and other child devices need to align their life cycles to LU. `>o_setup` and `>o_cleanup` should be removed in favor of `lu_device` methods. The child devices should be allocated and free'd alongside their parent `lu_device`.
- `class_` and `obd_` methods need to be de-duplicated (or at least reviewed).
- Userspace setup/cleanup should be disabled. It isn’t safe, often tested, or useful. Often times, manipulating the devices from userspace can be dangerous.
- `lu_site` should probably be tied to the actual Lustre super-block.
- OBD health check could be more useful (i.e. return the reason for the device failing).
- The client and server-side mount paths should be split entirely. The `lustre` and `lustre_tgt` difference could be handled in userspace.
- Fix the `lockdep` issues during the Lustre mount
- Fix naming. I'm pretty sure bottom device for lu_site is always an OSD - never anything else.