+/*
+ * Copyright (C) 2007 Oracle. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public
+ * License v2 as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public
+ * License along with this program; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 021110-1307, USA.
+ */
+
#include <linux/module.h>
#include <linux/fs.h>
#include <linux/blkdev.h>
{
struct btrfs_node *node = btrfs_buffer_node(buf);
if (bh_blocknr(buf) != btrfs_header_blocknr(&node->header)) {
- printk(KERN_CRIT "bh_blocknr(buf) is %Lu, header is %Lu\n",
- bh_blocknr(buf), btrfs_header_blocknr(&node->header));
+ printk(KERN_CRIT "bh_blocknr(buf) is %llu, header is %llu\n",
+ (unsigned long long)bh_blocknr(buf),
+ (unsigned long long)btrfs_header_blocknr(&node->header));
return 1;
}
return 0;
int err;
u64 first_block = index << (PAGE_CACHE_SHIFT - blockbits);
- page = grab_cache_page(mapping, index);
+ page = find_or_create_page(mapping, index, GFP_NOFS);
if (!page)
return NULL;
return ret;
if (verify) {
if (memcmp(bh->b_data, result, BTRFS_CRC32_SIZE)) {
- printk("checksum verify failed on %Lu\n",
- bh_blocknr(bh));
+ printk("btrfs: %s checksum verify failed on %llu\n",
+ root->fs_info->sb->s_id,
+ (unsigned long long)bh_blocknr(bh));
return 1;
}
} else {