On Fri, Mar 02 2001, Mario Hermann wrote:
> But with old 2.2 - Material stored on DVD-RAM. 
> 
>   losetup -e blowfish /dev/loop0 /dev/sr3
>   lsoetup -e serpent /dev/loop1 /dev/loop0
> 
> it doesn't work.

(replied to Mario earlier, for reference here's the patch).

Yet another miscount and IV off, I apparently missed the latter
when the other IV calculations were fixed. I've verified block
crypto here now.

-- 
Jens Axboe

--- /opt/kernel/linux-2.4.2-ac10/drivers/block/loop.c   Sat Mar  3 04:16:23 2001
+++ drivers/block/loop.c        Sat Mar  3 04:18:54 2001
@@ -345,8 +345,6 @@
                struct buffer_head *rbh = bh->b_private;
 
                rbh->b_end_io(rbh, uptodate);
-               if (atomic_dec_and_test(&lo->lo_pending))
-                       up(&lo->lo_bh_mutex);
                loop_put_buffer(bh);
        } else
                loop_add_bh(lo, bh);
@@ -479,6 +477,7 @@
 
                IV = (bh->b_rsector / (bh->b_size >> 9));
                IV += lo->lo_offset / bh->b_size;
+               IV >>= 2;
 
                ret = lo_do_transfer(lo, READ, bh->b_data, rbh->b_data,
                                     bh->b_size, IV);

Reply via email to