diff options
author | Changman Lee <cm224.lee@samsung.com> | 2013-01-29 18:30:07 +0900 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk.kim@samsung.com> | 2013-02-12 07:15:00 +0900 |
commit | d6212a5f18c8f9f9cc884070a96e11907711217f (patch) | |
tree | d1c579ecdeb7c2ffc94bffbe0b51af4d2e3c49f3 /fs/f2fs/inode.c | |
parent | a2617dc6863b21a8109c199ab533b3dbfe178f27 (diff) | |
download | linux-stable-d6212a5f18c8f9f9cc884070a96e11907711217f.tar.gz linux-stable-d6212a5f18c8f9f9cc884070a96e11907711217f.tar.bz2 linux-stable-d6212a5f18c8f9f9cc884070a96e11907711217f.zip |
f2fs: add un/freeze_fs into super_operations
This patch supports ioctl FIFREEZE and FITHAW to snapshot filesystem.
Before calling f2fs_freeze, all writers would be suspended and sync_fs
would be completed. So no f2fs has to do something.
Just background gc operation should be skipped due to generate dirty
nodes and data until unfreeze.
Signed-off-by: Changman Lee <cm224.lee@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
Diffstat (limited to 'fs/f2fs/inode.c')
-rw-r--r-- | fs/f2fs/inode.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/f2fs/inode.c b/fs/f2fs/inode.c index 340a21be5a76..62433c63e2db 100644 --- a/fs/f2fs/inode.c +++ b/fs/f2fs/inode.c @@ -278,6 +278,7 @@ void f2fs_evict_inode(struct inode *inode) if (inode->i_nlink || is_bad_inode(inode)) goto no_delete; + sb_start_intwrite(inode->i_sb); set_inode_flag(F2FS_I(inode), FI_NO_ALLOC); i_size_write(inode, 0); @@ -285,6 +286,7 @@ void f2fs_evict_inode(struct inode *inode) f2fs_truncate(inode); remove_inode_page(inode); + sb_end_intwrite(inode->i_sb); no_delete: clear_inode(inode); } |