Re: [PATCH] target/file: Set is_nonrot attribute

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

 



On Tue, 2013-02-26 at 11:28 +0800, Asias He wrote:
> Set is_nonrot attribute according to the block queue if the backend
> device is a block device.
> 
> Signed-off-by: Asias He <asias@xxxxxxxxxx>
> ---
>  drivers/target/target_core_file.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/target/target_core_file.c b/drivers/target/target_core_file.c
> index 7838c0a..91fdbeb 100644
> --- a/drivers/target/target_core_file.c
> +++ b/drivers/target/target_core_file.c
> @@ -187,6 +187,9 @@ static int fd_configure_device(struct se_device *dev)
>  			pr_debug("IFILE: BLOCK Discard support available,"
>  					" disabled by default\n");
>  		}
> +
> +		if (blk_queue_nonrot(q))
> +			dev->dev_attrib.is_nonrot = 1;
>  	} else {
>  		if (!(fd_dev->fbd_flags & FBDF_HAS_SIZE)) {
>  			pr_err("FILEIO: Missing fd_dev_size="

Applied to target-pending/queue for the moment, on top of the other
FILEIO UNMAP patches.

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