Re: [PATCH 2/2] target/rd: fix or rewrite the copy routine

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

 



On Wed, 2011-11-30 at 10:48 +0100, Sebastian Andrzej Siewior wrote:
> * Nicholas A. Bellinger | 2011-11-30 00:26:09 [-0800]:
> 
> >Mmmm, this patch doesn't apply against recent lio-core.git/master.  What
> >HEAD commit are you using..?
> 
> I'm using 
> |commit c387271e860c14d91c99be42ab4564e4b865fd87
> |Author: Nicholas Bellinger <nab@xxxxxxxxxxxxxxx>
> |Date:   Mon Nov 28 16:58:47 2011 -0800
> |
> |    Revert "iscsi-target: Make kernel_setsockopt value endian-safe"
> from git://git.kernel.org/pub/scm/linux/kernel/git/nab/lio-core.git
> 
> >When you have a moment, please check this applies against master. 
> >Otherwise I'm fine with merging it by hand.
> 
> I just looked over the patch. You probably get a conflict you need don't
> apply "target/rd: simplify the page/offset computation". Jörn been
> suggesting using ">> PAGE_SHIFT" and " & ~PAGE_MASK" instead of the
> do_div() macro. The compiler should do this kind of replacement.
> So if you like another version, please let me know.
> In the meantime I merged the two parts of this patch (sg_next()
> replacement and copy rewrite) and here it is in case you don't want
> break bisecting and  I can't prove that it is correct since it never
> worked for me
> 

Using do_div() is fine

> So the code assumes that the sg list is only a array while in reality
> somebody chained it. Using sg_next() works properly and patch makes such
> a change.
> With this patch the bug goes away. However after umount/mount of the
> device my files are gone. So something is still not right. After looking
> at it for a while I decided to rewrite the that part of the code and now
> things do work for me.
> For reference:
> - http://article.gmane.org/gmane.linux.scsi.target.devel/595
>   the sg_next() conversion
> - http://article.gmane.org/gmane.linux.scsi.target.devel/602
>   the rewrite of the copy code
> 
> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx>
> ---
>  drivers/target/target_core_rd.c |  245 +++++++--------------------------------
>  1 files changed, 40 insertions(+), 205 deletions(-)
> 

Applied and lightly tested with ramdisk_mcp and loopback LUNs.

Thanks alot Sebastian!

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