简体   繁体   English

哪个熔断器连接对应哪个安装座?

[英]Which fuse connection corresponds to which mount?

In Linux /sys/fs/fuse/connections (or anywhere you mount fusectl ) exposes a control interface for fuse metadata.在 Linux /sys/fs/fuse/connections (或您挂载的任何地方fusectl )公开了一个用于保险丝元数据的控制接口。 But how do you know which of your fuse mounts corresponds to which numbered subdirectory in there?但是你怎么知道你的保险丝座对应于那里的哪个编号的子目录?

Alternatively, how can your userspace program that's implementing a specific fuse filesystem know which connection number it has?或者,实现特定熔断器文件系统的用户空间程序如何知道它具有哪个连接号?

The directory is a "device number".该目录是一个“设备号”。 For example:例如:

$ ls /sys/fs/fuse/connections/
44/
$ stat -c %d /run/user/1000/gvfs
44

I guess:我猜:

$ < /proc/mounts cut -d' ' -f2 | xargs stat -c '%d %n' | sort | join -t' ' -11 -21 - <(find /sys/fs/fuse/connections -maxdepth 1 -mindepth 1 -type d -printf '%f\n' | sort)
44 /run/user/1000/gvfs
49 /home/kamil/a
53 /home/kamil/b

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM