On Thu, 2005-08-11 at 13:05 -0400, Salyzyn, Mark wrote: > RAID management applications have no idea what other applications are > doing and can not exercise such control over them. From my (flawed?) > view, there is no way to ask the OS if the target happens to be unused > and quiesced at this instant of time. But we have userspace tools, like fuser that can get the answers > Asking the (various) applications (of which one of them is the > filesystem mounts) this question is an exercise in anger management > currently. All attempts to add such 'busy' interrogation code to the > ioctl of the driver are rejected. This code resides in the 'Adaptec > Branch' of the aacraid driver as one of our OEM added values. That's because such questions are 1) racy and 2) flawed. I could export the device ref count sure enough, but it's not useful. It's internal bookkeeping only. It could be 1 if there's a filesystem mounted, in which case you don't want to force an ejection without unmounting or it could be 1 because someone's sitting in the sysfs directory, in which case an ejection is fine. Regardless, userspace is supposed to clean up nicely, so you use /proc/mounts and fuser to check to see if the thing is really in use and by whom and the user takes action accordingly (either say wait for me to clean up manually or go ahead and kill everything to clean this up). James - : send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html