aboutsummaryrefslogtreecommitdiffstats
path: root/fs/hfsplus/hfsplus_fs.h
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@tuxera.com>2010-11-23 08:37:47 -0500
committerChristoph Hellwig <hch@lst.de>2010-11-23 08:37:47 -0500
commit52399b171dfaea02b6944cd6feba49b624147126 (patch)
tree199eda8c91a51fa1d4e3c792abd97d9c0a50ae26 /fs/hfsplus/hfsplus_fs.h
parent3b5ce8ae31e3c66655207907527476bbd3e5063b (diff)
hfsplus: use raw bio access for the volume headers
The hfsplus backup volume header is located two blocks from the end of the device. In case of device sizes that are not 4k aligned this means we can't access it using buffer_heads when using the default 4k block size. Switch to using raw bios to read/write all buffer headers. We were not relying on any caching behaviour of the buffer heads anyway. Additionally always read in the backup volume header during mount to verify that we can actually read it. Signed-off-by: Christoph Hellwig <hch@tuxera.com>
Diffstat (limited to 'fs/hfsplus/hfsplus_fs.h')
-rw-r--r--fs/hfsplus/hfsplus_fs.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/fs/hfsplus/hfsplus_fs.h b/fs/hfsplus/hfsplus_fs.h
index f07aa640c27d..276ddb0fd0fd 100644
--- a/fs/hfsplus/hfsplus_fs.h
+++ b/fs/hfsplus/hfsplus_fs.h
@@ -107,8 +107,8 @@ struct hfsplus_vh;
107struct hfs_btree; 107struct hfs_btree;
108 108
109struct hfsplus_sb_info { 109struct hfsplus_sb_info {
110 struct buffer_head *s_vhbh;
111 struct hfsplus_vh *s_vhdr; 110 struct hfsplus_vh *s_vhdr;
111 struct hfsplus_vh *s_backup_vhdr;
112 struct hfs_btree *ext_tree; 112 struct hfs_btree *ext_tree;
113 struct hfs_btree *cat_tree; 113 struct hfs_btree *cat_tree;
114 struct hfs_btree *attr_tree; 114 struct hfs_btree *attr_tree;
@@ -118,7 +118,8 @@ struct hfsplus_sb_info {
118 118
119 /* Runtime variables */ 119 /* Runtime variables */
120 u32 blockoffset; 120 u32 blockoffset;
121 u32 sect_count; 121 sector_t part_start;
122 sector_t sect_count;
122 int fs_shift; 123 int fs_shift;
123 124
124 /* immutable data from the volume header */ 125 /* immutable data from the volume header */
@@ -385,8 +386,9 @@ int hfsplus_compare_dentry(struct dentry *dentry, struct qstr *s1, struct qstr *
385 386
386/* wrapper.c */ 387/* wrapper.c */
387int hfsplus_read_wrapper(struct super_block *); 388int hfsplus_read_wrapper(struct super_block *);
388
389int hfs_part_find(struct super_block *, sector_t *, sector_t *); 389int hfs_part_find(struct super_block *, sector_t *, sector_t *);
390int hfsplus_submit_bio(struct block_device *bdev, sector_t sector,
391 void *data, int rw);
390 392
391/* access macros */ 393/* access macros */
392static inline struct hfsplus_sb_info *HFSPLUS_SB(struct super_block *sb) 394static inline struct hfsplus_sb_info *HFSPLUS_SB(struct super_block *sb)