# HG changeset patch # User Pascal Bellard # Date 1509959898 -3600 # Node ID dc5d2db248871c66933f7860a0232ee791f9100a # Parent 52b498d67ad8a0f4afe628fcb7d867c132a2046d linux-cloop: tiny patch diff -r 52b498d67ad8 -r dc5d2db24887 linux-cloop/receipt --- a/linux-cloop/receipt Mon Nov 06 11:12:40 2017 +0200 +++ b/linux-cloop/receipt Mon Nov 06 10:18:18 2017 +0100 @@ -22,6 +22,9 @@ compile_rules() { patch -p0 < $stuff/cloop.u + # use f_inode with linux > 3.19 + sed -i -e 's|f_dentry->d_inode|f_inode|' \ + -e 's|.*blk_queue_merge_bvec.*|#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 3, 0)\n&\n#endif|' cloop.c make KERNEL_DIR="/usr/src/linux" cloop.ko && xz cloop.ko } diff -r 52b498d67ad8 -r dc5d2db24887 linux-cloop/stuff/cloop.u --- a/linux-cloop/stuff/cloop.u Mon Nov 06 11:12:40 2017 +0200 +++ b/linux-cloop/stuff/cloop.u Mon Nov 06 10:18:18 2017 +0100 @@ -112,7 +112,7 @@ /* We buffer some uncompressed blocks for performance */ int buffered_blocknum[BUFFERED_BLOCKS]; -@@ -256,11 +263,11 @@ +@@ -260,11 +267,11 @@ return i; } @@ -126,7 +126,7 @@ buflen = ntohl(clo->head.block_size); -@@ -275,9 +282,9 @@ +@@ -279,9 +286,9 @@ if (ret != 0) { printk(KERN_ERR "%s: zlib decompression error %i uncompressing block %u %u/%lu/%u/%u " @@ -138,7 +138,7 @@ clo->buffered_blocknum[clo->current_bufnum] = -1; return -1; } -@@ -489,30 +496,73 @@ +@@ -493,30 +500,73 @@ cloop_name, ntohl(clo->head.block_size)); error=-EBADF; goto error_release; } @@ -230,7 +230,7 @@ if (!clo->offsets) { printk(KERN_ERR "%s: out of kernel mem for offsets\n", cloop_name); -@@ -521,19 +571,22 @@ +@@ -525,19 +575,22 @@ } num_readable = MIN(total_offsets - offsets_read, (clo->underlying_blksize - offset) @@ -260,7 +260,7 @@ ntohl(clo->head.block_size), clo->largest_block); } /* Combo kmalloc used too large chunks (>130000). */ -@@ -565,16 +618,6 @@ +@@ -569,16 +622,6 @@ error=-ENOMEM; goto error_release_free_all; } zlib_inflateInit(&clo->zstream); @@ -277,7 +277,7 @@ { int i; for(i=0; ibuffered_blocknum[i] = -1; -@@ -653,7 +696,7 @@ +@@ -657,7 +700,7 @@ } } error_release_free: