Fundamental semantic difference to the previous variant is that the flag is only cleared on recycle, meaning a forcibly removed device will still be reported as a disk.
Callers which need an exact answer can use vn_isdisk_error.
Differential D26119
vfs: add cheaper vn_isdisk by indicating the state with the VIRF_ISDISK flag mjg on Aug 19 2020, 2:53 AM. Authored by Tags None Referenced Files
Subscribers
Details
Diff Detail
Event TimelineComment Actions I do not think this should go as is, esp. the change to vn_isdisk. Callers should be converted one-by-one. I rechecked all callers in vfs_bio.c and vnode_pager.c, they can use new vn_isdisk. Other users should be left at old vn_isdisk.
Comment Actions I think kib’s concerns should be addressed but the general idea lgtm.
|