diff options
author | Jaegeuk Kim <jaegeuk.kim@samsung.com> | 2013-01-17 06:30:23 -0500 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk.kim@samsung.com> | 2013-01-21 20:48:58 -0500 |
commit | c01e54b770e69c65525295eb2668be3dc0822406 (patch) | |
tree | a654dbd90478aa41c26a841f80d0e58754c43c35 /fs/f2fs | |
parent | 692bb55d1ab5b278181ff2e65f09eb0be6d50669 (diff) |
f2fs: support swapfile
This patch adds f2fs_bmap operation to the data address space.
This enables f2fs to support swapfile.
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
Diffstat (limited to 'fs/f2fs')
-rw-r--r-- | fs/f2fs/data.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index b1347fc6d688..7bd22a201125 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c | |||
@@ -698,6 +698,11 @@ static int f2fs_set_data_page_dirty(struct page *page) | |||
698 | return 0; | 698 | return 0; |
699 | } | 699 | } |
700 | 700 | ||
701 | static sector_t f2fs_bmap(struct address_space *mapping, sector_t block) | ||
702 | { | ||
703 | return generic_block_bmap(mapping, block, get_data_block_ro); | ||
704 | } | ||
705 | |||
701 | const struct address_space_operations f2fs_dblock_aops = { | 706 | const struct address_space_operations f2fs_dblock_aops = { |
702 | .readpage = f2fs_read_data_page, | 707 | .readpage = f2fs_read_data_page, |
703 | .readpages = f2fs_read_data_pages, | 708 | .readpages = f2fs_read_data_pages, |
@@ -709,4 +714,5 @@ const struct address_space_operations f2fs_dblock_aops = { | |||
709 | .invalidatepage = f2fs_invalidate_data_page, | 714 | .invalidatepage = f2fs_invalidate_data_page, |
710 | .releasepage = f2fs_release_data_page, | 715 | .releasepage = f2fs_release_data_page, |
711 | .direct_IO = f2fs_direct_IO, | 716 | .direct_IO = f2fs_direct_IO, |
717 | .bmap = f2fs_bmap, | ||
712 | }; | 718 | }; |