[Bug 12207] block reads/writes > 122880 bytes to USB tape drive gives EBUSY

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

 



http://bugzilla.kernel.org/show_bug.cgi?id=12207





--- Comment #31 from Kai Mäkisara <kai.makisara@xxxxxxxxxxx>  2009-04-11 06:11:59 ---
On Sat, 11 Apr 2009, bugzilla-daemon@xxxxxxxxxxxxxxxxxxx wrote:

> http://bugzilla.kernel.org/show_bug.cgi?id=12207
> 
> 
> 
> 
> 
> --- Comment #30 from Alan Stern <stern@xxxxxxxxxxxxxxxxxxx>  2009-04-11 02:38:27 ---
> On Fri, 10 Apr 2009 bugzilla-daemon@xxxxxxxxxxxxxxxxxxx wrote:
> 
> > Maybe you should check your facts before telling others where to look. 
> > max_sectors_kb etc. exist only for block devices (in the Unix sense). 
> > Tapes are character devices.
> 
> There's no need to be rude.  Besides, how would you suggest I check my 
> facts (bearing in mind that I don't have access to any SCSI or USB tape 
> drives)?
> 
I am sorry. My words were inappropriate. But even without a tape drive it 
is possible to read the code.

> As the author of st.c, you certainly are the authority on how this
> works.  And it's definitely true that tapes are char devices.
> 
> But isn't it also true that SCSI tapes, like all SCSI devices, have
> their device queue set up by scsi_alloc_queue(), which calls
> blk_init_queue(), which registers the queue's kobject using
> blk_queue_ktype, whose default attributes include both
> queue_max_sectors_entry.attr and queue_max_hw_sectors_entry.attr?  And
> doesn't this mean that SCSI tapes _do_ have max_sectors_kb etc.  
> attributes?
> 
Yes, SCSI uses the (Linux) block layer and the attributes do exist within 
the kernel. They just are not visible in sysfs for character devices. Last 
night I read the code to find out why. Your analysis is correct but it 
only shows that the kobject exists. The kobject is added to sysfs using 
kobject_add() in blk_register_queue() called by add_disk(), which is only 
called by disk drivers.

Whether character devices should add the kobject somewhere in sysfs is 
getting beyond the original topic in this bugzilla entry. This is a more 
general problem because there is no /sys/char directory. My current 
opinion is that it would be nice to see these attributes somewhere, but 
probably not worth the trouble.

Kai

-- 
Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.--
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