wok-next rev 20236

linux-cloop: tiny patch
author Pascal Bellard <pascal.bellard@slitaz.org>
date Mon Nov 06 10:18:18 2017 +0100 (2017-11-06)
parents 52b498d67ad8
children 62dada09eb77
files linux-cloop/receipt linux-cloop/stuff/cloop.u
line diff
     1.1 --- a/linux-cloop/receipt	Mon Nov 06 11:12:40 2017 +0200
     1.2 +++ b/linux-cloop/receipt	Mon Nov 06 10:18:18 2017 +0100
     1.3 @@ -22,6 +22,9 @@
     1.4  compile_rules()
     1.5  {
     1.6  	patch -p0 < $stuff/cloop.u
     1.7 +	# use f_inode with linux > 3.19
     1.8 +	sed -i  -e 's|f_dentry->d_inode|f_inode|' \
     1.9 +		-e 's|.*blk_queue_merge_bvec.*|#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 3, 0)\n&\n#endif|' cloop.c
    1.10  	make KERNEL_DIR="/usr/src/linux" cloop.ko && xz cloop.ko
    1.11  }
    1.12  	
     2.1 --- a/linux-cloop/stuff/cloop.u	Mon Nov 06 11:12:40 2017 +0200
     2.2 +++ b/linux-cloop/stuff/cloop.u	Mon Nov 06 10:18:18 2017 +0100
     2.3 @@ -112,7 +112,7 @@
     2.4   
     2.5    /* We buffer some uncompressed blocks for performance */
     2.6    int buffered_blocknum[BUFFERED_BLOCKS];
     2.7 -@@ -256,11 +263,11 @@
     2.8 +@@ -260,11 +267,11 @@
     2.9       return i;
    2.10      }
    2.11   
    2.12 @@ -126,7 +126,7 @@
    2.13   
    2.14    buflen = ntohl(clo->head.block_size);
    2.15   
    2.16 -@@ -275,9 +282,9 @@
    2.17 +@@ -279,9 +286,9 @@
    2.18    if (ret != 0)
    2.19     {
    2.20      printk(KERN_ERR "%s: zlib decompression error %i uncompressing block %u %u/%lu/%u/%u "
    2.21 @@ -138,7 +138,7 @@
    2.22      clo->buffered_blocknum[clo->current_bufnum] = -1;
    2.23      return -1;
    2.24     }
    2.25 -@@ -489,30 +496,73 @@
    2.26 +@@ -493,30 +500,73 @@
    2.27                 cloop_name, ntohl(clo->head.block_size));
    2.28          error=-EBADF; goto error_release;
    2.29         }
    2.30 @@ -230,7 +230,7 @@
    2.31        if (!clo->offsets)
    2.32         {
    2.33          printk(KERN_ERR "%s: out of kernel mem for offsets\n", cloop_name);
    2.34 -@@ -521,19 +571,22 @@
    2.35 +@@ -525,19 +575,22 @@
    2.36       }
    2.37      num_readable = MIN(total_offsets - offsets_read,
    2.38                         (clo->underlying_blksize - offset) 
    2.39 @@ -260,7 +260,7 @@
    2.40             ntohl(clo->head.block_size), clo->largest_block);
    2.41     }
    2.42   /* Combo kmalloc used too large chunks (>130000). */
    2.43 -@@ -565,16 +618,6 @@
    2.44 +@@ -569,16 +622,6 @@
    2.45      error=-ENOMEM; goto error_release_free_all;
    2.46     }
    2.47    zlib_inflateInit(&clo->zstream);
    2.48 @@ -277,7 +277,7 @@
    2.49    {
    2.50     int i;
    2.51     for(i=0; i<BUFFERED_BLOCKS; i++) clo->buffered_blocknum[i] = -1;
    2.52 -@@ -653,7 +696,7 @@
    2.53 +@@ -657,7 +700,7 @@
    2.54      }
    2.55    }
    2.56   error_release_free: