Re: Ramdisk - null device

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

 



On Fri, 2013-12-06 at 10:59 -0800, Prasanna Ponnada wrote:
> I'd like to test raw iSER wire performance (similar to this:
> http://permalink.gmane.org/gmane.linux.scsi.target.devel/4002) and was
> wondering how I could create a ramdisk to act as a null device? Any
> pointers would be greatly helpful.
> 

This is still a bit tricky to do from userspace, so I'd recommend the
following small patch to set NULLIO for all ramdisks.

--nab

diff --git a/drivers/target/target_core_rd.c b/drivers/target/target_core_rd.c
index 4ffe5f2..45bba9e 100644
--- a/drivers/target/target_core_rd.c
+++ b/drivers/target/target_core_rd.c
@@ -226,6 +226,7 @@ static int rd_configure_device(struct se_device *dev)
                pr_debug("Missing rd_pages= parameter\n");
                return -EINVAL;
        }
+       rd_dev->rd_flags |= RDF_NULLIO;
 
        ret = rd_build_device_space(rd_dev);
        if (ret < 0)

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