segment.c (a468f0ef516fda9c7d91bb550d458e853d76955e) | segment.c (aaec2b1d18792a5f27b69ff37f34f43f89f5aa3b) |
---|---|
1/* 2 * fs/f2fs/segment.c 3 * 4 * Copyright (c) 2012 Samsung Electronics Co., Ltd. 5 * http://www.samsung.com/ 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License version 2 as --- 1787 unchanged lines hidden (view full) --- 1796 return 0; 1797} 1798 1799static int restore_curseg_summaries(struct f2fs_sb_info *sbi) 1800{ 1801 int type = CURSEG_HOT_DATA; 1802 int err; 1803 | 1/* 2 * fs/f2fs/segment.c 3 * 4 * Copyright (c) 2012 Samsung Electronics Co., Ltd. 5 * http://www.samsung.com/ 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License version 2 as --- 1787 unchanged lines hidden (view full) --- 1796 return 0; 1797} 1798 1799static int restore_curseg_summaries(struct f2fs_sb_info *sbi) 1800{ 1801 int type = CURSEG_HOT_DATA; 1802 int err; 1803 |
1804 if (is_set_ckpt_flags(F2FS_CKPT(sbi), CP_COMPACT_SUM_FLAG)) { | 1804 if (is_set_ckpt_flags(sbi, CP_COMPACT_SUM_FLAG)) { |
1805 int npages = npages_for_summary_flush(sbi, true); 1806 1807 if (npages >= 2) 1808 ra_meta_pages(sbi, start_sum_block(sbi), npages, 1809 META_CP, true); 1810 1811 /* restore for compacted data summary */ 1812 if (read_compacted_summaries(sbi)) --- 80 unchanged lines hidden (view full) --- 1893 end = type + NR_CURSEG_NODE_TYPE; 1894 1895 for (i = type; i < end; i++) 1896 write_current_sum_page(sbi, i, blkaddr + (i - type)); 1897} 1898 1899void write_data_summaries(struct f2fs_sb_info *sbi, block_t start_blk) 1900{ | 1805 int npages = npages_for_summary_flush(sbi, true); 1806 1807 if (npages >= 2) 1808 ra_meta_pages(sbi, start_sum_block(sbi), npages, 1809 META_CP, true); 1810 1811 /* restore for compacted data summary */ 1812 if (read_compacted_summaries(sbi)) --- 80 unchanged lines hidden (view full) --- 1893 end = type + NR_CURSEG_NODE_TYPE; 1894 1895 for (i = type; i < end; i++) 1896 write_current_sum_page(sbi, i, blkaddr + (i - type)); 1897} 1898 1899void write_data_summaries(struct f2fs_sb_info *sbi, block_t start_blk) 1900{ |
1901 if (is_set_ckpt_flags(F2FS_CKPT(sbi), CP_COMPACT_SUM_FLAG)) | 1901 if (is_set_ckpt_flags(sbi, CP_COMPACT_SUM_FLAG)) |
1902 write_compacted_summaries(sbi, start_blk); 1903 else 1904 write_normal_summaries(sbi, start_blk, CURSEG_HOT_DATA); 1905} 1906 1907void write_node_summaries(struct f2fs_sb_info *sbi, block_t start_blk) 1908{ 1909 write_normal_summaries(sbi, start_blk, CURSEG_HOT_NODE); --- 783 unchanged lines hidden --- | 1902 write_compacted_summaries(sbi, start_blk); 1903 else 1904 write_normal_summaries(sbi, start_blk, CURSEG_HOT_DATA); 1905} 1906 1907void write_node_summaries(struct f2fs_sb_info *sbi, block_t start_blk) 1908{ 1909 write_normal_summaries(sbi, start_blk, CURSEG_HOT_NODE); --- 783 unchanged lines hidden --- |