Re: fileio, only 512kb writeable?

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

 



Hi Viljami,

On Thu, 2013-03-07 at 13:53 +0200, Viljami Ilola wrote:
> I encountered this problem while trying to install OS.
> 
> Kernel gave me messages like:
> [12015.915146] SCSI OP 2ah with too big sectors 1347 exceeds backend  
> hw_max_sectors: 1024
> [12015.977744] SCSI OP 2ah with too big sectors 2048 exceeds backend  
> hw_max_sectors: 1024
> 

Thanks for reporting!

> This seems to fix problem for me now, but I guess there is better solution.
> --- target_core_file.c~	2013-03-04 01:11:05.000000000 +0200
> +++ target_core_file.c	2013-03-07 12:48:52.058447827 +0200
> @@ -175,7 +175,8 @@
>   		}
> 
>   		dev->dev_attrib.hw_block_size = FD_BLOCKSIZE;
> -		dev->dev_attrib.hw_max_sectors = FD_MAX_SECTORS;
> +		dev->dev_attrib.hw_max_sectors = fd_dev->fd_dev_size / FD_BLOCKSIZE;
>   	}
> 
>   	fd_dev->fd_block_size = dev->dev_attrib.hw_block_size;
> 
> --

This value is actually limited by the total number of iovecs that
vfs_writev() + vfs_readv() can accept (1024) in a single function call
after the >= v3.5 kernel se_task removal.

As you've seen with the block_size=512 default, this is currently
limited to 512K payloads with FD_MAX_SECTORS=1024.  So I think the
proper resolution here is to go ahead and use a larger FD_MAX_SECTORS
default (8192) for the block_size=512 FILEIO case, and then reduce
hw_max_sectors as larger block_sizes are enabled via configfs on a per
device backend basis

I'll be sending out a patch to address this soon.

Thanks!

--nab

--
To unsubscribe from this list: send the line "unsubscribe target-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux SCSI]     [Kernel Newbies]     [Linux SCSI Target Infrastructure]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Device Mapper]

  Powered by Linux