summaryrefslogtreecommitdiffstats
path: root/fs/hpfs/hpfs_fn.h
diff options
context:
space:
mode:
authorMikulas Patocka <mikulas@twibright.com>2015-09-02 22:50:12 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2015-09-03 11:55:30 -0700
commita64eefaac1c5cc8dbc6995228fe08a61b8e1d26b (patch)
tree0945e739dbe805c12f5d24170ae8486f6df79a43 /fs/hpfs/hpfs_fn.h
parent64291f7db5bd8150a74ad2036f1037e6a0428df2 (diff)
downloadblackbird-op-linux-a64eefaac1c5cc8dbc6995228fe08a61b8e1d26b.tar.gz
blackbird-op-linux-a64eefaac1c5cc8dbc6995228fe08a61b8e1d26b.zip
hpfs: support hotfixes
When the OS/2 driver hits a disk write error, it writes the sector to another location and adds the sector mapping to the hotfix map. This patch makes the hpfs driver understand the hotfix map and remap accesses accoring to it. Signed-off-by: Mikulas Patocka <mikulas@twibright.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/hpfs/hpfs_fn.h')
-rw-r--r--fs/hpfs/hpfs_fn.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/hpfs/hpfs_fn.h b/fs/hpfs/hpfs_fn.h
index c4867b5116dd..975654a63c13 100644
--- a/fs/hpfs/hpfs_fn.h
+++ b/fs/hpfs/hpfs_fn.h
@@ -88,6 +88,10 @@ struct hpfs_sb_info {
unsigned sb_max_fwd_alloc; /* max forwad allocation */
int sb_timeshift;
struct rcu_head rcu;
+
+ unsigned n_hotfixes;
+ secno hotfix_from[256];
+ secno hotfix_to[256];
};
/* Four 512-byte buffers and the 2k block obtained by concatenating them */
@@ -217,6 +221,8 @@ void hpfs_remove_fnode(struct super_block *, fnode_secno fno);
/* buffer.c */
+secno hpfs_search_hotfix_map(struct super_block *s, secno sec);
+unsigned hpfs_search_hotfix_map_for_range(struct super_block *s, secno sec, unsigned n);
void hpfs_prefetch_sectors(struct super_block *, unsigned, int);
void *hpfs_map_sector(struct super_block *, unsigned, struct buffer_head **, int);
void *hpfs_get_sector(struct super_block *, unsigned, struct buffer_head **);
@@ -285,6 +291,7 @@ __le32 *hpfs_map_bitmap(struct super_block *, unsigned, struct quad_buffer_head
void hpfs_prefetch_bitmap(struct super_block *, unsigned);
unsigned char *hpfs_load_code_page(struct super_block *, secno);
__le32 *hpfs_load_bitmap_directory(struct super_block *, secno bmp);
+void hpfs_load_hotfix_map(struct super_block *s, struct hpfs_spare_block *spareblock);
struct fnode *hpfs_map_fnode(struct super_block *s, ino_t, struct buffer_head **);
struct anode *hpfs_map_anode(struct super_block *s, anode_secno, struct buffer_head **);
struct dnode *hpfs_map_dnode(struct super_block *s, dnode_secno, struct quad_buffer_head *);
OpenPOWER on IntegriCloud