diff options
author | Takashi Sato <t-sato@yk.jp.nec.com> | 2009-01-09 19:40:59 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-09 19:54:42 -0500 |
commit | fcccf502540e3d752d33b2d8e976034dee81f9f7 (patch) | |
tree | 401be4ad2fc3c535a2fc77e413b1be4a736f320c /include/linux/buffer_head.h | |
parent | c4be0c1dc4cdc37b175579be1460f15ac6495e9a (diff) |
filesystem freeze: implement generic freeze feature
The ioctls for the generic freeze feature are below.
o Freeze the filesystem
int ioctl(int fd, int FIFREEZE, arg)
fd: The file descriptor of the mountpoint
FIFREEZE: request code for the freeze
arg: Ignored
Return value: 0 if the operation succeeds. Otherwise, -1
o Unfreeze the filesystem
int ioctl(int fd, int FITHAW, arg)
fd: The file descriptor of the mountpoint
FITHAW: request code for unfreeze
arg: Ignored
Return value: 0 if the operation succeeds. Otherwise, -1
Error number: If the filesystem has already been unfrozen,
errno is set to EINVAL.
[akpm@linux-foundation.org: fix CONFIG_BLOCK=n]
Signed-off-by: Takashi Sato <t-sato@yk.jp.nec.com>
Signed-off-by: Masayuki Hamaguchi <m-hamaguchi@ys.jp.nec.com>
Cc: <xfs-masters@oss.sgi.com>
Cc: <linux-ext4@vger.kernel.org>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Dave Kleikamp <shaggy@austin.ibm.com>
Cc: Dave Chinner <david@fromorbit.com>
Cc: Alasdair G Kergon <agk@redhat.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/buffer_head.h')
-rw-r--r-- | include/linux/buffer_head.h | 11 |
1 files changed, 10 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 */ |