RFC target: add sysfs support
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest5 patches 10 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/5 | target: add sysfs supportdrivers/ drivers/ drivers/ +1 more | +58 | 2 replies | |
| 2/5 | target: add sysfs session helper functionsdrivers/ drivers/ drivers/ +4 more | +168 | 5 replies | |
| 3/5 | target: add target_setup_session sysfs supportdrivers/ drivers/ drivers/ +10 more | +73 | 3 replies | |
| 4/5 | iscsi target: use session sysfs helpersdrivers/ drivers/ drivers/ +3 more | +22 | 0 replies | |
| 5/5 | target: drop sess_get_indexdrivers/ drivers/ drivers/ +11 more | +1 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [RFC PATCH 0/5] target: add sysfs support
The following patches made over Linus's current tree allow lio to export info about structs that the kernel initiates creation of via events like initiator login where there is no user interaction like a mkdir. These patches specificially focus on the I_T_nexus/session but could be used for other objects if we want.
Why sysfs when we have configfs?
I started with configfs and hit bugs like:
commit cc57c07343bd071cdf1915a91a24ab7d40c9b590
Author: Mike Christie <[email protected]> Date: Sun Jul 15 18:16:17 2018 -0500
configfs: fix registered group removal
but it turns out that bug was not really a bug and was just how configfs was meant to work. It seems it was not meant to be used where the kernel initiates creation of dirs/files as a result of some internal action. It's more geared to the user initiating the creation, and my patch just lead to other bugs and was reverted:
commit f19e4ed1e1edbfa3c9ccb9fed17759b7d6db24c6
Author: Al Viro <[email protected]> Date: Thu Aug 29 23:13:30 2019 -0400
configfs_register_group() shouldn't be (and isn't) called in
rmdirable parts
So to export the session info we have debugfs, sysfs, ioctl, netlink, etc. sysfs just seemed like a decent fit since one of the primary users is rtslib and it already has lots of file/dir handling code.