Re: [PATCH 7/8] SCSI: add a field to scsi_device to count open file references

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2008-03-05 at 16:24 -0500, Alan Stern wrote:
> On Wed, 5 Mar 2008, James Bottomley wrote:
> 
> > OK, I looked through the patch series.  It really looks like the
> > in-kernel thing is the wrong approach.
> > 
> > Why not export this want_persist flag via sysfs and then have hal and
> > udev update it when they see a filesystem on an underlying usb device
> > mounted (and zero it out on unmount)?  That way you always have the
> > exactly correct state and there's no need to go fishing for information
> > in layers that are difficult to get to.
> 
> The flag (or rather, a similar one named "persist_enabled") already is
> exported via sysfs.
> 
> Having hal+udev set it automatically as you describe never occurred 
> to me.  The reason for doing all of this within the kernel is that 
> Linus said (off-list) that the kernel should handle this automatically.  
> Whether he considered userspace tools taking over the responsibility, I 
> can't say.  (But he might object to having to wait for the tools to add 
> the extra functionality.)
> 
> Now, it has to be mentioned that mounted filesystems on a USB device
> account for something like 90% of the objections against USB-PERSIST.  
> If we go ahead and enable it automatically in that case, there is
> really very little reason not to enable it for every USB device, 
> mounted or not.
> 
> In fact, the only other important reason for not turning it on by
> default (or always!) is because the USB spec says not to.  By adding
> this check for mounted filesystems, we are trying to adhere as closely
> as possible to the spec -- but only in cases where we don't care since
> it doesn't matter!
> 
> Whether to enable USB-PERSIST for mounted devices is a policy decision.  
> Whether that policy should be set by the kernel or by userspace is
> outside my jursidiction.  If you think this approach is wrong-headed
> and you can convince Linus to go along, I'll be willing to drop the
> last three patches in this series.

So make it default to one now and also put the processes in train to
update hal and udev.  That way everything should work immediately and we
come back to spec compliance later.

James


--
To unsubscribe from this list: 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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux