![/sys/class/block/*/hidden 파일은 무엇을 의미합니까?](https://linux55.com/image/167631/%2Fsys%2Fclass%2Fblock%2F*%2Fhidden%20%ED%8C%8C%EC%9D%BC%EC%9D%80%20%EB%AC%B4%EC%97%87%EC%9D%84%20%EC%9D%98%EB%AF%B8%ED%95%A9%EB%8B%88%EA%B9%8C%3F.png)
sysfs를 통해 사용자 공간에 노출된 블록 장치(파티션 아님)에 숨겨진 파일이 있지만 어디에도 문서화되어 있지 않습니까?
무슨 뜻이에요?
답변1
이는 플래그의 GENHD_FL_HIDDEN 비트를 반영합니다. 이 설정을 찾을 수 있는 유일한 곳은 drivers/nvme/host/multipath.c 파일에서 다음과 같은 주석이 있습니다.
/*
* If multipathing is enabled we need to always use the subsystem instance
* number for numbering our devices to avoid conflicts between subsystems that
* have multiple controllers and thus use the multipath-aware subsystem node
* and those that have a single controller and use the controller node
* directly.
*/
nvme[0-9]c[0-9]d[0-9] 이름에 대해 다중 경로가 활성화되어 있지만 nvme[0-9]n[0-9] 이름에 대해서는 다중 경로가 활성화되지 않은 경우 코드는 이 비트를 설정합니다.