On Sat, 18 Aug 2018, Nuno Gonçalves wrote: > Hi, > > I am trying to get some kind of notification when the host ejects a > f_mass_storage disk. > > When it happens, and the lun is removable, then the config > /sys/kernel/config/usb_gadget/*/functions/*/lun.*/file is cleared. > > I understand that sysfs files can not be monitored with inotify, but > some might be with select/poll/epoll. But this is a configfs. > > I know nothing works for me. I don't know if this is a bug or expected. It is expected. No notifications for host-initiated ejects were ever put into the f_mass_storage driver. I have never tried to use f_mass_storage under configfs. When you do, does the driver create its normal sysfs files? Alan Stern > Any insight? > > Thanks! > Nuno > >