mirror of
https://github.com/torvalds/linux.git
synced 2026-05-27 16:44:58 +02:00
f2fs: Add f2fs_get_sum_folio()
Convert f2fs_get_sum_page() to f2fs_get_sum_folio() and add a f2fs_get_sum_page() wrapper. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Reviewed-by: Chao Yu <chao@kernel.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
parent
6b5c4a0359
commit
4a2c49d2cb
|
|
@ -3821,7 +3821,7 @@ int f2fs_allocate_new_segments(struct f2fs_sb_info *sbi);
|
|||
int f2fs_trim_fs(struct f2fs_sb_info *sbi, struct fstrim_range *range);
|
||||
bool f2fs_exist_trim_candidates(struct f2fs_sb_info *sbi,
|
||||
struct cp_control *cpc);
|
||||
struct page *f2fs_get_sum_page(struct f2fs_sb_info *sbi, unsigned int segno);
|
||||
struct folio *f2fs_get_sum_folio(struct f2fs_sb_info *sbi, unsigned int segno);
|
||||
void f2fs_update_meta_page(struct f2fs_sb_info *sbi, void *src,
|
||||
block_t blk_addr);
|
||||
void f2fs_do_write_meta_page(struct f2fs_sb_info *sbi, struct folio *folio,
|
||||
|
|
@ -3877,6 +3877,12 @@ static inline struct inode *fio_inode(struct f2fs_io_info *fio)
|
|||
return page_folio(fio->page)->mapping->host;
|
||||
}
|
||||
|
||||
static inline
|
||||
struct page *f2fs_get_sum_page(struct f2fs_sb_info *sbi, unsigned int segno)
|
||||
{
|
||||
return &f2fs_get_sum_folio(sbi, segno)->page;
|
||||
}
|
||||
|
||||
#define DEF_FRAGMENT_SIZE 4
|
||||
#define MIN_FRAGMENT_SIZE 1
|
||||
#define MAX_FRAGMENT_SIZE 512
|
||||
|
|
|
|||
|
|
@ -2681,13 +2681,13 @@ int f2fs_npages_for_summary_flush(struct f2fs_sb_info *sbi, bool for_ra)
|
|||
}
|
||||
|
||||
/*
|
||||
* Caller should put this summary page
|
||||
* Caller should put this summary folio
|
||||
*/
|
||||
struct page *f2fs_get_sum_page(struct f2fs_sb_info *sbi, unsigned int segno)
|
||||
struct folio *f2fs_get_sum_folio(struct f2fs_sb_info *sbi, unsigned int segno)
|
||||
{
|
||||
if (unlikely(f2fs_cp_error(sbi)))
|
||||
return ERR_PTR(-EIO);
|
||||
return &f2fs_get_meta_folio_retry(sbi, GET_SUM_BLOCK(sbi, segno))->page;
|
||||
return f2fs_get_meta_folio_retry(sbi, GET_SUM_BLOCK(sbi, segno));
|
||||
}
|
||||
|
||||
void f2fs_update_meta_page(struct f2fs_sb_info *sbi,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user