diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/buffer_head.h | 11 | ||||
| -rw-r--r-- | include/linux/fs.h | 7 |
2 files changed, 17 insertions, 1 deletions
diff --git a/include/linux/buffer_head.h b/include/linux/buffer_head.h index 8605f8a74df9..bd7ac793be19 100644 --- a/include/linux/buffer_head.h +++ b/include/linux/buffer_head.h | |||
| @@ -171,7 +171,7 @@ void __wait_on_buffer(struct buffer_head *); | |||
| 171 | wait_queue_head_t *bh_waitq_head(struct buffer_head *bh); | 171 | wait_queue_head_t *bh_waitq_head(struct buffer_head *bh); |
| 172 | int fsync_bdev(struct block_device *); | 172 | int fsync_bdev(struct block_device *); |
| 173 | struct super_block *freeze_bdev(struct block_device *); | 173 | struct super_block *freeze_bdev(struct block_device *); |
| 174 | void thaw_bdev(struct block_device *, struct super_block *); | 174 | int thaw_bdev(struct block_device *, struct super_block *); |
| 175 | int fsync_super(struct super_block *); | 175 | int fsync_super(struct super_block *); |
| 176 | int fsync_no_super(struct block_device *); | 176 | int fsync_no_super(struct block_device *); |
| 177 | struct buffer_head *__find_get_block(struct block_device *bdev, sector_t block, | 177 | struct buffer_head *__find_get_block(struct block_device *bdev, sector_t block, |
| @@ -346,6 +346,15 @@ static inline int remove_inode_buffers(struct inode *inode) { return 1; } | |||
| 346 | static inline int sync_mapping_buffers(struct address_space *mapping) { return 0; } | 346 | static inline int sync_mapping_buffers(struct address_space *mapping) { return 0; } |
| 347 | static inline void invalidate_bdev(struct block_device *bdev) {} | 347 | static inline void invalidate_bdev(struct block_device *bdev) {} |
| 348 | 348 | ||
| 349 | static inline struct super_block *freeze_bdev(struct block_device *sb) | ||
| 350 | { | ||
| 351 | return NULL; | ||
| 352 | } | ||
| 353 | |||
| 354 | static inline int thaw_bdev(struct block_device *bdev, struct super_block *sb) | ||
| 355 | { | ||
| 356 | return 0; | ||
| 357 | } | ||
| 349 | 358 | ||
| 350 | #endif /* CONFIG_BLOCK */ | 359 | #endif /* CONFIG_BLOCK */ |
| 351 | #endif /* _LINUX_BUFFER_HEAD_H */ | 360 | #endif /* _LINUX_BUFFER_HEAD_H */ |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 3e59182de9df..6022f44043f2 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
| @@ -234,6 +234,8 @@ struct inodes_stat_t { | |||
| 234 | #define BMAP_IOCTL 1 /* obsolete - kept for compatibility */ | 234 | #define BMAP_IOCTL 1 /* obsolete - kept for compatibility */ |
| 235 | #define FIBMAP _IO(0x00,1) /* bmap access */ | 235 | #define FIBMAP _IO(0x00,1) /* bmap access */ |
| 236 | #define FIGETBSZ _IO(0x00,2) /* get the block size used for bmap */ | 236 | #define FIGETBSZ _IO(0x00,2) /* get the block size used for bmap */ |
| 237 | #define FIFREEZE _IOWR('X', 119, int) /* Freeze */ | ||
| 238 | #define FITHAW _IOWR('X', 120, int) /* Thaw */ | ||
| 237 | 239 | ||
| 238 | #define FS_IOC_GETFLAGS _IOR('f', 1, long) | 240 | #define FS_IOC_GETFLAGS _IOR('f', 1, long) |
| 239 | #define FS_IOC_SETFLAGS _IOW('f', 2, long) | 241 | #define FS_IOC_SETFLAGS _IOW('f', 2, long) |
| @@ -591,6 +593,11 @@ struct block_device { | |||
| 591 | * care to not mess up bd_private for that case. | 593 | * care to not mess up bd_private for that case. |
| 592 | */ | 594 | */ |
| 593 | unsigned long bd_private; | 595 | unsigned long bd_private; |
| 596 | |||
| 597 | /* The counter of freeze processes */ | ||
| 598 | int bd_fsfreeze_count; | ||
| 599 | /* Mutex for freeze */ | ||
| 600 | struct mutex bd_fsfreeze_mutex; | ||
| 594 | }; | 601 | }; |
| 595 | 602 | ||
| 596 | /* | 603 | /* |
