Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 128988
b: refs/heads/master
c: cfbc246
h: refs/heads/master
v: v3
  • Loading branch information
Chris Mason committed Oct 30, 2008
1 parent 620b59a commit 1f004a4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 87ef2bb46bfc4be0b40799e68115cbe28d80a1bd
refs/heads/master: cfbc246eaae2a1089911016094b74b3055e8a906
7 changes: 5 additions & 2 deletions trunk/fs/btrfs/compression.c
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ int btrfs_submit_compressed_write(struct inode *inode, u64 start,

/* create and submit bios for the compressed pages */
bytes_left = compressed_len;
while(bytes_left > 0) {
for (page_index = 0; page_index < cb->nr_pages; page_index++) {
page = compressed_pages[page_index];
page->mapping = inode->i_mapping;
if (bio->bi_size)
Expand Down Expand Up @@ -324,7 +324,10 @@ int btrfs_submit_compressed_write(struct inode *inode, u64 start,
bio->bi_end_io = end_compressed_bio_write;
bio_add_page(bio, page, PAGE_CACHE_SIZE, 0);
}
page_index++;
if (bytes_left < PAGE_CACHE_SIZE) {
printk("bytes left %lu compress len %lu nr %lu\n",
bytes_left, cb->compressed_len, cb->nr_pages);
}
bytes_left -= PAGE_CACHE_SIZE;
first_byte += PAGE_CACHE_SIZE;
}
Expand Down
2 changes: 1 addition & 1 deletion trunk/fs/btrfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ static int cow_file_range(struct inode *inode, struct page *locked_page,
if (!btrfs_test_flag(inode, NOCOMPRESS) &&
btrfs_test_opt(root, COMPRESS)) {
WARN_ON(pages);
pages = kmalloc(sizeof(struct page *) * nr_pages, GFP_NOFS);
pages = kzalloc(sizeof(struct page *) * nr_pages, GFP_NOFS);

/* we want to make sure the amount of IO required to satisfy
* a random read is reasonably small, so we limit the size
Expand Down

0 comments on commit 1f004a4

Please sign in to comment.