diff options
author | Arnd Bergmann <arnd@arndb.de> | 2012-02-28 07:39:56 -0500 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2012-02-28 07:40:01 -0500 |
commit | 4d8cfec692e988b844dcaeaeb76b5780b7ef9d28 (patch) | |
tree | 67d43adab2afd18a74d08f347e3676ae1a64193f /fs/btrfs/disk-io.c | |
parent | a3a3c4664184f86ef964323d106c62158e2b3f25 (diff) | |
parent | 1d8c38c3d1b48eeb9cfaa42a8be13a1423569eb2 (diff) |
Merge branch 'cleanup-3.4' of git://github.com/hzhuang1/linux into next/cleanup
* 'cleanup-3.4' of git://github.com/hzhuang1/linux: (2 commits)
rtc: sa1100: remove verification code of alarm
rtc: sa1100: remove periodic code
(update to v3.3-rc5)
Diffstat (limited to 'fs/btrfs/disk-io.c')
-rw-r--r-- | fs/btrfs/disk-io.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 811d9f918b1c..534266fe505f 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c | |||
@@ -2260,6 +2260,12 @@ int open_ctree(struct super_block *sb, | |||
2260 | goto fail_sb_buffer; | 2260 | goto fail_sb_buffer; |
2261 | } | 2261 | } |
2262 | 2262 | ||
2263 | if (sectorsize < PAGE_SIZE) { | ||
2264 | printk(KERN_WARNING "btrfs: Incompatible sector size " | ||
2265 | "found on %s\n", sb->s_id); | ||
2266 | goto fail_sb_buffer; | ||
2267 | } | ||
2268 | |||
2263 | mutex_lock(&fs_info->chunk_mutex); | 2269 | mutex_lock(&fs_info->chunk_mutex); |
2264 | ret = btrfs_read_sys_array(tree_root); | 2270 | ret = btrfs_read_sys_array(tree_root); |
2265 | mutex_unlock(&fs_info->chunk_mutex); | 2271 | mutex_unlock(&fs_info->chunk_mutex); |
@@ -2301,6 +2307,12 @@ int open_ctree(struct super_block *sb, | |||
2301 | 2307 | ||
2302 | btrfs_close_extra_devices(fs_devices); | 2308 | btrfs_close_extra_devices(fs_devices); |
2303 | 2309 | ||
2310 | if (!fs_devices->latest_bdev) { | ||
2311 | printk(KERN_CRIT "btrfs: failed to read devices on %s\n", | ||
2312 | sb->s_id); | ||
2313 | goto fail_tree_roots; | ||
2314 | } | ||
2315 | |||
2304 | retry_root_backup: | 2316 | retry_root_backup: |
2305 | blocksize = btrfs_level_size(tree_root, | 2317 | blocksize = btrfs_level_size(tree_root, |
2306 | btrfs_super_root_level(disk_super)); | 2318 | btrfs_super_root_level(disk_super)); |