Re: [Bug 20072] tapeinfo reports MaxBlock: 16777215 but writes with blocksize >2M fail

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

 



On Wed, 13 Oct 2010, bugzilla-daemon@xxxxxxxxxxxxxxxxxxx wrote:

> https://bugzilla.kernel.org/show_bug.cgi?id=20072
> 
> 
> 
> 
> 
> --- Comment #2 from lkolbe@xxxxxxxxxxxxxxxxxxxxxxxx  2010-10-11 11:25:15 ---
> This is what dmesg has to say about the earlier tries to write to the device
> with higher than 2MiB blocksizes:
> 
> [92315.076956] st0: Block limits 1 - 16777215 bytes.
> [92445.438048] st0: Can't allocate 15728640 byte tape buffer.
> [92457.973733] st0: Can't allocate 16777215 byte tape buffer.
> [92460.990589] st0: Can't allocate 16777214 byte tape buffer.
> 
> --- Comment #3 from lkolbe@xxxxxxxxxxxxxxxxxxxxxxxx  2010-10-13 09:50:22 ---
> When instructing bacula to use the advertised tape blocksize of 16M, we get the
> following errors everytime it tries to access the tape:
> 
> 13-Oct 11:48 sd1.techfak JobId 2692: Error: block.c:1002 Read error on fd=5 at
> file:blk 0:0 on device "drv2" (/dev/nst0). ERR=Cannot allocate memory.
> 
> Is there some limit/sysctl we might have to adapt to the native tape drive
> blocksize of 16M?
> 
There is a limit that comes from physical constraints and memory 
fragmentation. Because of fragmentation, it is often not possible to find 
larger chunks of free memory than one page (e.g., 4 kB). The SCSI HBA 
supports often only a certain number of scatter/gather segments. Let's 
assume that this limit is 256. This means that the largest possible SCSI 
data buffer is 256 x 4 kB = 1 MB. This limits the possible block size. 
Depending on the state of fragmentation, the actual limit may be larger 
but this is the limit of the block size you can always use.

The st driver (with defaults) first tries to map the user buffer to the 
number of available scatter/gather segments. If this fails, the driver 
tries to allocate a local buffer using as large chunks of memory as it can 
get. If this succeeds, the request may still fail because of SCSI midlevel 
limits (I don't know what the limits currently are, but, if there are 
limits, they are tunable).

I have been able to read and write 16MB-1 blocks with my system. What you 
can actually reach depends on the things above.

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