Changeset 520 for packages/main
- Timestamp:
- 24/06/2008 10:18:55 (2 months ago)
- Files:
-
- packages/main/cloop/tags/venus/compressed_loop.c (modified) (25 diffs)
- packages/main/cloop/tags/venus/debian/changelog (modified) (1 diff)
- packages/main/cloop/trunk/compressed_loop.c (modified) (25 diffs)
- packages/main/cloop/trunk/debian/changelog (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
packages/main/cloop/tags/venus/compressed_loop.c
r487 r520 21 21 22 22 #define CLOOP_NAME "cloop" 23 #define CLOOP_VERSION "2.62 4"23 #define CLOOP_VERSION "2.625" 24 24 #define CLOOP_MAX 8 25 25 … … 125 125 void *buffer[BUFFERED_BLOCKS]; 126 126 void *compressed_buffer; 127 size_t preload_size; 127 128 void *preload_cache; 128 129 … … 132 133 struct inode *backing_inode; /* for bmap */ 133 134 135 unsigned long largest_block; 134 136 unsigned int underlying_blksize; 135 137 int clo_number; … … 157 159 #endif 158 160 161 /* Use __get_free_pages instead of vmalloc, allows up to 32 pages, 162 * 2MB in one piece */ 163 static void *cloop_malloc(size_t size) 164 { 165 return (void *)__get_free_pages(GFP_KERNEL, get_order(size)); 166 } 167 168 static void cloop_free(void *mem, size_t size) 169 { 170 free_pages((unsigned long)mem, get_order(size)); 171 } 172 159 173 static int uncompress(struct cloop_device *clo, 160 174 unsigned char *dest, unsigned long *destLen, … … 179 193 } 180 194 181 /* This is more complicated than it looks. */182 struct cloop_read_data183 {184 struct cloop_device *clo;185 char *data; /* We need to keep track of where we are in the buffer */186 int bsize;187 };188 189 /* We need this for do_generic_file_read() because the default function */190 /* wants to read into user-space for an unknown reason. :-/ See loop.c. */191 static int cloop_read_actor(read_descriptor_t * desc, struct page *page,192 unsigned long offset, unsigned long size)193 {194 unsigned long count = desc->count;195 struct cloop_read_data *p = (struct cloop_read_data*)desc->arg.data;196 char *kaddr_page;197 if (size > count) size = count;198 kaddr_page = kmap(page);199 memcpy(p->data, kaddr_page + offset, size);200 kunmap(page);201 desc->count = count - size;202 desc->written += size;203 p->data += size;204 return size;205 }206 207 195 static size_t cloop_read_from_file(struct cloop_device *clo, struct file *f, char *buf, 208 196 loff_t pos, size_t buf_len) … … 212 200 { 213 201 size_t size = buf_len - buf_done; 214 struct cloop_read_data cd={ /* do_generic_file_read() needs this. */ 215 clo, /* struct cloop_device *clo */ 216 (char *)(buf + buf_done), /* char *data */ 217 size}; /* Actual data size */ 218 read_descriptor_t desc; 219 desc.written = 0; 220 desc.count = size; 221 desc.arg.data = (char*)&cd; 222 desc.error = 0; 223 #ifdef REDHAT_KERNEL /* Greenshoe Linux */ 224 do_generic_file_read(f, &pos, &desc, cloop_read_actor, 0); 225 #else /* Normal Kernel */ 226 do_generic_file_read(f, &pos, &desc, cloop_read_actor); 227 #endif 228 if(desc.error||desc.written<=0) 229 { 230 int left = size - desc.written; 202 size_t size_read = do_sync_read(f, buf + buf_done, size, &pos); 203 if(size_read <= 0) 204 { 205 size_t left = size - size_read; 231 206 if(left<0) left = 0; /* better safe than sorry */ 232 207 printk(KERN_ERR "%s: Read error at pos %Lu in file %s, " … … 235 210 break; 236 211 } 237 buf_done += desc.written;212 buf_done += size_read; 238 213 } 239 214 return buf_done; 240 215 } 241 242 216 243 217 /* This looks more complicated than it is */ … … 301 275 int buffered_blocknum = -1; 302 276 int preloaded = 0; 303 struct bio *bio;304 277 loff_t offset = (loff_t) req->sector<<9; 305 278 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24) /* New kernel */ … … 352 325 } /* end rq_for_each_segment*/ 353 326 #else /* Old Kernel */ 327 struct bio *bio; 354 328 rq_for_each_bio(bio, req) 355 329 { … … 426 400 { 427 401 int uptodate; 402 unsigned long flags; 428 403 struct request *req; 404 spin_lock_irqsave(&clo->queue_lock, flags); 429 405 req = list_entry(p, struct request, queuelist); 430 spin_lock_irq(&clo->queue_lock);431 406 list_del_init(&req->queuelist); 432 spin_unlock_irq(&clo->queue_lock); 433 /* DEBUGP(KERN_ERR "cloop_handle_request(%p, %p), sector=%d, nr_sectors=%d, current_nr_sectors=%d ", clo, req, (int)req->sector, (int)req->nr_sectors, (int)req->current_nr_sectors); */ 407 spin_unlock_irqrestore(&clo->queue_lock, flags); 434 408 uptodate = cloop_handle_request(clo, req); 435 /* DEBUGP(KERN_ERR "cloop_handle_request done, uptodate=%d\n", uptodate); */ 436 spin_lock_irq(&clo->queue_lock); 409 spin_lock_irqsave(&clo->queue_lock, flags); 410 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,25) /* New kernel */ 411 __blk_end_request(req, uptodate ? 0 : -EIO, req->nr_sectors << 9); 412 #else 437 413 if(!end_that_request_first(req, uptodate, req->nr_sectors)) 438 414 end_that_request_last(req, uptodate); 439 spin_unlock_irq(&clo->queue_lock); 415 #endif 416 spin_unlock_irqrestore(&clo->queue_lock, flags); 440 417 } 418 #if 0 441 419 spin_lock_irq(&clo->queue_lock); 442 420 blk_start_queue(clo->clo_queue); 443 421 spin_unlock_irq(&clo->queue_lock); 422 #endif 444 423 } 445 424 DEBUGP(KERN_ERR "cloop_thread exited.\n"); … … 476 455 } 477 456 blkdev_dequeue_request(req); /* Dequeue request first. */ 457 #if 0 478 458 blk_stop_queue(q); /* Stop queue processing */ 459 #endif 479 460 list_add(&req->queuelist, &clo->clo_list); /* Add to working list for thread */ 480 461 count++; … … 484 465 DEBUGP(KERN_ERR "cloop_do_request: Discarding request %p.\n", req); 485 466 req->errors++; 467 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,25) /* New kernel */ 468 __blk_end_request(req, -EIO, req->nr_sectors << 9); 469 #else 486 470 end_request(req, 0); /* Discard */ 471 #endif 487 472 } 488 473 } … … 495 480 char *bbuf=NULL; 496 481 unsigned int i, offsets_read, total_offsets; 497 unsigned long largest_block=0;498 482 int isblkdev; 499 483 int error = 0; … … 532 516 clo->underlying_blksize = PAGE_SIZE; 533 517 DEBUGP("Underlying blocksize is %u\n", clo->underlying_blksize); 534 bbuf = vmalloc(clo->underlying_blksize);518 bbuf = cloop_malloc(clo->underlying_blksize); 535 519 if(!bbuf) 536 520 { … … 581 565 error=-EBADF; goto error_release; 582 566 } 583 clo->offsets = vmalloc(sizeof(loff_t) * total_offsets);567 clo->offsets = cloop_malloc(sizeof(loff_t) * total_offsets); 584 568 if (!clo->offsets) 585 569 { … … 599 583 { 600 584 loff_t d=be64_to_cpu(clo->offsets[i+1]) - be64_to_cpu(clo->offsets[i]); 601 largest_block=MAX(largest_block,d);585 clo->largest_block=MAX(clo->largest_block,d); 602 586 } 603 587 printk(KERN_INFO "%s: %s: %u blocks, %u bytes/block, largest block is %lu bytes.\n", 604 588 cloop_name, filename, ntohl(clo->head.num_blocks), 605 ntohl(clo->head.block_size), largest_block);589 ntohl(clo->head.block_size), clo->largest_block); 606 590 } 607 591 /* Combo kmalloc used too large chunks (>130000). */ … … 610 594 for(i=0;i<BUFFERED_BLOCKS;i++) 611 595 { 612 clo->buffer[i] = vmalloc(ntohl(clo->head.block_size));596 clo->buffer[i] = cloop_malloc(ntohl(clo->head.block_size)); 613 597 if(!clo->buffer[i]) 614 598 { … … 619 603 } 620 604 } 621 clo->compressed_buffer = vmalloc(largest_block);605 clo->compressed_buffer = cloop_malloc(clo->largest_block); 622 606 if(!clo->compressed_buffer) 623 607 { 624 608 printk(KERN_ERR "%s: out of memory for compressed buffer %lu\n", 625 cloop_name, largest_block);609 cloop_name, clo->largest_block); 626 610 error=-ENOMEM; goto error_release_free_buffer; 627 611 } 628 clo->zstream.workspace = vmalloc(zlib_inflate_workspacesize());612 clo->zstream.workspace = cloop_malloc(zlib_inflate_workspacesize()); 629 613 if(!clo->zstream.workspace) 630 614 { … … 641 625 be64_to_cpu(clo->offsets[ntohl(clo->head.num_blocks)]), 642 626 inode->i_size); 643 vfree(clo->zstream.workspace); clo->zstream.workspace=NULL;627 cloop_free(clo->zstream.workspace, zlib_inflate_workspacesize()); clo->zstream.workspace=NULL; 644 628 goto error_release_free_all; 645 629 } … … 660 644 if(preload > 0) 661 645 { 662 size_tpreload_size = ((preload<=ntohl(clo->head.num_blocks))?preload:ntohl(clo->head.num_blocks))646 clo->preload_size = ((preload<=ntohl(clo->head.num_blocks))?preload:ntohl(clo->head.num_blocks)) 663 647 * ntohl(clo->head.block_size); 664 if((clo->preload_cache = vmalloc(preload_size)) != NULL)648 if((clo->preload_cache = cloop_malloc(clo->preload_size)) != NULL) 665 649 { 666 650 int i; … … 675 659 { 676 660 printk(KERN_WARNING "%s: can't read block %d into preload cache, ignored.\n", cloop_name, i); 677 vfree(clo->preload_cache);661 cloop_free(clo->preload_cache, clo->preload_size); 678 662 clo->preload_cache = NULL; 679 663 break; … … 687 671 return error; 688 672 error_release_free_all: 689 vfree(clo->compressed_buffer);673 cloop_free(clo->compressed_buffer, clo->largest_block); 690 674 clo->compressed_buffer=NULL; 691 675 error_release_free_buffer: … … 696 680 if(clo->buffer[i]) 697 681 { 698 vfree(clo->buffer[i]);682 cloop_free(clo->buffer[i], ntohl(clo->head.block_size)); 699 683 clo->buffer[i]=NULL; 700 684 } … … 702 686 } 703 687 error_release_free: 704 vfree(clo->offsets);688 cloop_free(clo->offsets, sizeof(loff_t) * total_offsets); 705 689 clo->offsets=NULL; 706 690 error_release: 707 if(bbuf) vfree(bbuf);691 if(bbuf) cloop_free(bbuf, clo->underlying_blksize); 708 692 clo->backing_file=NULL; 709 693 return error; … … 741 725 clo->backing_file = NULL; 742 726 clo->backing_inode = NULL; 743 if(clo->offsets) { vfree(clo->offsets); clo->offsets = NULL; }744 if(clo->preload_cache) { vfree(clo->preload_cache); clo->preload_cache = NULL; }727 if(clo->offsets) { cloop_free(clo->offsets, clo->underlying_blksize); clo->offsets = NULL; } 728 if(clo->preload_cache) { cloop_free(clo->preload_cache, clo->preload_size); clo->preload_cache = NULL; } 745 729 for(i=0; i<BUFFERED_BLOCKS; i++) 746 if(clo->buffer[i]) { vfree(clo->buffer[i]); clo->buffer[i]=NULL; }747 if(clo->compressed_buffer) { vfree(clo->compressed_buffer); clo->compressed_buffer = NULL; }730 if(clo->buffer[i]) { cloop_free(clo->buffer[i], ntohl(clo->head.block_size)); clo->buffer[i]=NULL; } 731 if(clo->compressed_buffer) { cloop_free(clo->compressed_buffer, clo->largest_block); clo->compressed_buffer = NULL; } 748 732 zlib_inflateEnd(&clo->zstream); 749 if(clo->zstream.workspace) { vfree(clo->zstream.workspace); clo->zstream.workspace = NULL; }733 if(clo->zstream.workspace) { cloop_free(clo->zstream.workspace, zlib_inflate_workspacesize()); clo->zstream.workspace = NULL; } 750 734 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22) 751 735 if(bdev) invalidate_bdev(bdev, 0); packages/main/cloop/tags/venus/debian/changelog
r489 r520 1 cloop (2.625.venus-1) stable; urgency=low 2 3 * Fix build issue with kernel 2.6.25 4 5 -- Unixmedia S.r.l. (Medianix Devel) <devel@unixmedia.it> Tue, 24 Jun 2008 10:18:31 +0200 6 1 7 cloop (2.624.venus-1) stable; urgency=low 2 8 packages/main/cloop/trunk/compressed_loop.c
r487 r520 21 21 22 22 #define CLOOP_NAME "cloop" 23 #define CLOOP_VERSION "2.62 4"23 #define CLOOP_VERSION "2.625" 24 24 #define CLOOP_MAX 8 25 25 … … 125 125 void *buffer[BUFFERED_BLOCKS]; 126 126 void *compressed_buffer; 127 size_t preload_size; 127 128 void *preload_cache; 128 129 … … 132 133 struct inode *backing_inode; /* for bmap */ 133 134 135 unsigned long largest_block; 134 136 unsigned int underlying_blksize; 135 137 int clo_number; … … 157 159 #endif 158 160 161 /* Use __get_free_pages instead of vmalloc, allows up to 32 pages, 162 * 2MB in one piece */ 163 static void *cloop_malloc(size_t size) 164 { 165 return (void *)__get_free_pages(GFP_KERNEL, get_order(size)); 166 } 167 168 static void cloop_free(void *mem, size_t size) 169 { 170 free_pages((unsigned long)mem, get_order(size)); 171 } 172 159 173 static int uncompress(struct cloop_device *clo, 160 174 unsigned char *dest, unsigned long *destLen, … … 179 193 } 180 194 181 /* This is more complicated than it looks. */182 struct cloop_read_data183 {184 struct cloop_device *clo;185 char *data; /* We need to keep track of where we are in the buffer */186 int bsize;187 };188 189 /* We need this for do_generic_file_read() because the default function */190 /* wants to read into user-space for an unknown reason. :-/ See loop.c. */191 static int cloop_read_actor(read_descriptor_t * desc, struct page *page,192 unsigned long offset, unsigned long size)193 {194 unsigned long count = desc->count;195 struct cloop_read_data *p = (struct cloop_read_data*)desc->arg.data;196 char *kaddr_page;197 if (size > count) size = count;198 kaddr_page = kmap(page);199 memcpy(p->data, kaddr_page + offset, size);200 kunmap(page);201 desc->count = count - size;202 desc->written += size;203 p->data += size;204 return size;205 }206 207 195 static size_t cloop_read_from_file(struct cloop_device *clo, struct file *f, char *buf, 208 196 loff_t pos, size_t buf_len) … … 212 200 { 213 201 size_t size = buf_len - buf_done; 214 struct cloop_read_data cd={ /* do_generic_file_read() needs this. */ 215 clo, /* struct cloop_device *clo */ 216 (char *)(buf + buf_done), /* char *data */ 217 size}; /* Actual data size */ 218 read_descriptor_t desc; 219 desc.written = 0; 220 desc.count = size; 221 desc.arg.data = (char*)&cd; 222 desc.error = 0; 223 #ifdef REDHAT_KERNEL /* Greenshoe Linux */ 224 do_generic_file_read(f, &pos, &desc, cloop_read_actor, 0); 225 #else /* Normal Kernel */ 226 do_generic_file_read(f, &pos, &desc, cloop_read_actor); 227 #endif 228 if(desc.error||desc.written<=0) 229 { 230 int left = size - desc.written; 202 size_t size_read = do_sync_read(f, buf + buf_done, size, &pos); 203 if(size_read <= 0) 204 { 205 size_t left = size - size_read; 231 206 if(left<0) left = 0; /* better safe than sorry */ 232 207 printk(KERN_ERR "%s: Read error at pos %Lu in file %s, " … … 235 210 break; 236 211 } 237 buf_done += desc.written;212 buf_done += size_read; 238 213 } 239 214 return buf_done; 240 215 } 241 242 216 243 217 /* This looks more complicated than it is */ … … 301 275 int buffered_blocknum = -1; 302 276 int preloaded = 0; 303 struct bio *bio;304 277 loff_t offset = (loff_t) req->sector<<9; 305 278 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24) /* New kernel */ … … 352 325 } /* end rq_for_each_segment*/ 353 326 #else /* Old Kernel */ 327 struct bio *bio; 354 328 rq_for_each_bio(bio, req) 355 329 { … … 426 400 { 427 401 int uptodate; 402 unsigned long flags; 428 403 struct request *req; 404 spin_lock_irqsave(&clo->queue_lock, flags); 429 405 req = list_entry(p, struct request, queuelist); 430 spin_lock_irq(&clo->queue_lock);431 406 list_del_init(&req->queuelist); 432 spin_unlock_irq(&clo->queue_lock); 433 /* DEBUGP(KERN_ERR "cloop_handle_request(%p, %p), sector=%d, nr_sectors=%d, current_nr_sectors=%d ", clo, req, (int)req->sector, (int)req->nr_sectors, (int)req->current_nr_sectors); */ 407 spin_unlock_irqrestore(&clo->queue_lock, flags); 434 408 uptodate = cloop_handle_request(clo, req); 435 /* DEBUGP(KERN_ERR "cloop_handle_request done, uptodate=%d\n", uptodate); */ 436 spin_lock_irq(&clo->queue_lock); 409 spin_lock_irqsave(&clo->queue_lock, flags); 410 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,25) /* New kernel */ 411 __blk_end_request(req, uptodate ? 0 : -EIO, req->nr_sectors << 9); 412 #else 437 413 if(!end_that_request_first(req, uptodate, req->nr_sectors)) 438 414 end_that_request_last(req, uptodate); 439 spin_unlock_irq(&clo->queue_lock); 415 #endif 416 spin_unlock_irqrestore(&clo->queue_lock, flags); 440 417 } 418 #if 0 441 419 spin_lock_irq(&clo->queue_lock); 442 420 blk_start_queue(clo->clo_queue); 443 421 spin_unlock_irq(&clo->queue_lock); 422 #endif 444 423 } 445 424 DEBUGP(KERN_ERR "cloop_thread exited.\n"); … … 476 455 } 477 456 blkdev_dequeue_request(req); /* Dequeue request first. */ 457 #if 0 478 458 blk_stop_queue(q); /* Stop queue processing */ 459 #endif 479 460 list_add(&req->queuelist, &clo->clo_list); /* Add to working list for thread */ 480 461 count++; … … 484 465 DEBUGP(KERN_ERR "cloop_do_request: Discarding request %p.\n", req); 485 466 req->errors++; 467 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,25) /* New kernel */ 468 __blk_end_request(req, -EIO, req->nr_sectors << 9); 469 #else 486 470 end_request(req, 0); /* Discard */ 471 #endif 487 472 } 488 473 } … … 495 480 char *bbuf=NULL; 496 481 unsigned int i, offsets_read, total_offsets; 497 unsigned long largest_block=0;498 482 int isblkdev; 499 483 int error = 0; … … 532 516 clo->underlying_blksize = PAGE_SIZE; 533 517 DEBUGP("Underlying blocksize is %u\n", clo->underlying_blksize); 534 bbuf = vmalloc(clo->underlying_blksize);518 bbuf = cloop_malloc(clo->underlying_blksize); 535 519 if(!bbuf) 536 520 { … … 581 565 error=-EBADF; goto error_release; 582 566 } 583 clo->offsets = vmalloc(sizeof(loff_t) * total_offsets);567 clo->offsets = cloop_malloc(sizeof(loff_t) * total_offsets); 584 568 if (!clo->offsets) 585 569 { … … 599 583 { 600 584 loff_t d=be64_to_cpu(clo->offsets[i+1]) - be64_to_cpu(clo->offsets[i]); 601 largest_block=MAX(largest_block,d);585 clo->largest_block=MAX(clo->largest_block,d); 602 586 } 603 587 printk(KERN_INFO "%s: %s: %u blocks, %u bytes/block, largest block is %lu bytes.\n", 604 588 cloop_name, filename, ntohl(clo->head.num_blocks), 605 ntohl(clo->head.block_size), largest_block);589 ntohl(clo->head.block_size), clo->largest_block); 606 590 } 607 591 /* Combo kmalloc used too large chunks (>130000). */ … … 610 594 for(i=0;i<BUFFERED_BLOCKS;i++) 611 595 { 612 clo->buffer[i] = vmalloc(ntohl(clo->head.block_size));596 clo->buffer[i] = cloop_malloc(ntohl(clo->head.block_size)); 613 597 if(!clo->buffer[i]) 614 598 { … … 619 603 } 620 604 } 621 clo->compressed_buffer = vmalloc(largest_block);605 clo->compressed_buffer = cloop_malloc(clo->largest_block); 622 606 if(!clo->compressed_buffer) 623 607 { 624 608 printk(KERN_ERR "%s: out of memory for compressed buffer %lu\n", 625 cloop_name, largest_block);609 cloop_name, clo->largest_block); 626 610 error=-ENOMEM; goto error_release_free_buffer; 627 611 } 628 clo->zstream.workspace = vmalloc(zlib_inflate_workspacesize());612 clo->zstream.workspace = cloop_malloc(zlib_inflate_workspacesize()); 629 613 if(!clo->zstream.workspace) 630 614 { … … 641 625 be64_to_cpu(clo->offsets[ntohl(clo->head.num_blocks)]), 642 626 inode->i_size); 643 vfree(clo->zstream.workspace); clo->zstream.workspace=NULL;627 cloop_free(clo->zstream.workspace, zlib_inflate_workspacesize()); clo->zstream.workspace=NULL; 644 628 goto error_release_free_all; 645 629 } … … 660 644 if(preload > 0) 661 645 { 662 size_tpreload_size = ((preload<=ntohl(clo->head.num_blocks))?preload:ntohl(clo->head.num_blocks))646 clo->preload_size = ((preload<=ntohl(clo->head.num_blocks))?preload:ntohl(clo->head.num_blocks)) 663 647 * ntohl(clo->head.block_size); 664 if((clo->preload_cache = vmalloc(preload_size)) != NULL)648 if((clo->preload_cache = cloop_malloc(clo->preload_size)) != NULL) 665 649 { 666 650 int i; … … 675 659 { 676 660 printk(KERN_WARNING "%s: can't read block %d into preload cache, ignored.\n", cloop_name, i); 677 vfree(clo->preload_cache);661 cloop_free(clo->preload_cache, clo->preload_size); 678 662 clo->preload_cache = NULL; 679 663 break; … … 687 671 return error; 688 672 error_release_free_all: 689 vfree(clo->compressed_buffer);673 cloop_free(clo->compressed_buffer, clo->largest_block); 690 674 clo->compressed_buffer=NULL; 691 675 error_release_free_buffer: … … 696 680 if(clo->buffer[i]) 697 681 { 698 vfree(clo->buffer[i]);682 cloop_free(clo->buffer[i], ntohl(clo->head.block_size)); 699 683 clo->buffer[i]=NULL; 700 684 } … … 702 686 } 703 687 error_release_free: 704 vfree(clo->offsets);688 cloop_free(clo->offsets, sizeof(loff_t) * total_offsets); 705 689 clo->offsets=NULL; 706 690 error_release: 707 if(bbuf) vfree(bbuf);691 if(bbuf) cloop_free(bbuf, clo->underlying_blksize); 708 692 clo->backing_file=NULL; 709 693 return error; … … 741 725 clo->backing_file = NULL; 742 726 clo->backing_inode = NULL; 743 if(clo->offsets) { vfree(clo->offsets); clo->offsets = NULL; }744 if(clo->preload_cache) { vfree(clo->preload_cache); clo->preload_cache = NULL; }727 if(clo->offsets) { cloop_free(clo->offsets, clo->underlying_blksize); clo->offsets = NULL; } 728 if(clo->preload_cache) { cloop_free(clo->preload_cache, clo->preload_size); clo->preload_cache = NULL; } 745 729 for(i=0; i<BUFFERED_BLOCKS; i++) 746 if(clo->buffer[i]) { vfree(clo->buffer[i]); clo->buffer[i]=NULL; }747 if(clo->compressed_buffer) { vfree(clo->compressed_buffer); clo->compressed_buffer = NULL; }730 if(clo->buffer[i]) { cloop_free(clo->buffer[i], ntohl(clo->head.block_size)); clo->buffer[i]=NULL; } 731 if(clo->compressed_buffer) { cloop_free(clo->compressed_buffer, clo->largest_block); clo->compressed_buffer = NULL; } 748 732 zlib_inflateEnd(&clo->zstream); 749 if(clo->zstream.workspace) { vfree(clo->zstream.workspace); clo->zstream.workspace = NULL; }733 if(clo->zstream.workspace) { cloop_free(clo->zstream.workspace, zlib_inflate_workspacesize()); clo->zstream.workspace = NULL; } 750 734 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22) 751 735 if(bdev) invalidate_bdev(bdev, 0); packages/main/cloop/trunk/debian/changelog
r487 r520 1 cloop (2.625) unstable; urgency=low 2 3 * Fix compiling issue for kernel 2.6.25 4 5 -- Unixmedia S.r.l. (Medianix Devel) <devel@unixmedia.it> Tue, 24 Jun 2008 10:16:56 +0200 6 1 7 cloop (2.624) unstable; urgency=low 2 8
