device_pager: rename the un_pager.devp.dev field to handle because it is not neccessary struct cdev *. vm_object: do not assume that un_pager.devp.dev is cdev It is subtype-specific handle. Mark OBJT_DEVICE that do fill cdev into the handle, with a new object flag OBJ_CDEVH. PR: 282533
Details
Details
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Comment Actions
There are two additional useful things to do there:
- stop using devp.handle for handle, it seems to always copy the actual handle. Then, the entry can be renamed back to dev and guaranteed to be either NULL or cdev, and it can be cdev in more cases.
- add cdev pager method to return user-visible name, to fill into procstat and vmstat -o.
For now I believe my fix is good to stay.
sys/vm/vm_object.c | ||
---|---|---|
2519 | So for now at least, it is not possible to have a MGTDEVICE object with CDEVH set. A possible enhancement would be to add a "name" field to struct cdev_pager_ops, and use that as the path when available. |