Re: [PATCH] st: Do not rewind for SG_IO

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

 



On 1.2.2014, at 16.06, Hannes Reinecke <hare@xxxxxxx> wrote:

> On 01/31/2014 05:43 PM, Jeremy Linton wrote:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>> 
>> On 1/31/2014 2:46 AM, Hannes Reinecke wrote:
>> 
>>> This patch make the tape always non-rewinding when SG_IO is used, thus
>>> allowing udev to get a proper device id for tapes.
>> 
>> 	Maybe instead of silently changing the behavior, if you just _HAVE_ to open
>> the st device, add an ioctl or st/mt_op that disables the rewind on close.
>> That way applications have to explicitly disable the rewind on close.
>> 
> Okay, that sounds like a better alternative.
> Point is for udev we simply _have_ to use the given device node.
> And when this happens to be set to rewind on close we're doomed.
> 
I don’t quite understand why it has to use the auto-rewind device instead of the
non-rewind device. From the minor number it can see what the non-rewind device
is. If the problem is that it is not guaranteed that the non-rewind device exits, you
should rather change the order the devices are created.

If you absolutely have to do this, then do it. But new ioctls are deprecated and
also it is a bad habit to change the kernel to make things easier for a single
program.

> I'll be drafting up a patch.
> 
If you do, don’t forget to update the documentation.

Thanks,
Kai

P.S. I don’t like the auto-rewind devices at all. But the Unix systems have those
and so we also must to have those ;-)

--
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