Commit 06de42c5 authored by David Sterba's avatar David Sterba

btrfs: rename __extent_writepage() and drop double underscores

The function does not follow the pattern where the underscores would be
justified, so rename it.
Reviewed-by: default avatarQu Wenruo <wqu@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 22b4ef50
...@@ -1177,7 +1177,7 @@ int btrfs_read_folio(struct file *file, struct folio *folio) ...@@ -1177,7 +1177,7 @@ int btrfs_read_folio(struct file *file, struct folio *folio)
} }
/* /*
* helper for __extent_writepage, doing all of the delayed allocation setup. * helper for extent_writepage(), doing all of the delayed allocation setup.
* *
* This returns 1 if btrfs_run_delalloc_range function did all the work required * This returns 1 if btrfs_run_delalloc_range function did all the work required
* to write the page (copy into inline extent). In this case the IO has * to write the page (copy into inline extent). In this case the IO has
...@@ -1398,18 +1398,18 @@ static int submit_one_sector(struct btrfs_inode *inode, ...@@ -1398,18 +1398,18 @@ static int submit_one_sector(struct btrfs_inode *inode,
} }
/* /*
* helper for __extent_writepage. This calls the writepage start hooks, * Helper for extent_writepage(). This calls the writepage start hooks,
* and does the loop to map the page into extents and bios. * and does the loop to map the page into extents and bios.
* *
* We return 1 if the IO is started and the page is unlocked, * We return 1 if the IO is started and the page is unlocked,
* 0 if all went well (page still locked) * 0 if all went well (page still locked)
* < 0 if there were errors (page still locked) * < 0 if there were errors (page still locked)
*/ */
static noinline_for_stack int __extent_writepage_io(struct btrfs_inode *inode, static noinline_for_stack int extent_writepage_io(struct btrfs_inode *inode,
struct folio *folio, struct folio *folio,
u64 start, u32 len, u64 start, u32 len,
struct btrfs_bio_ctrl *bio_ctrl, struct btrfs_bio_ctrl *bio_ctrl,
loff_t i_size) loff_t i_size)
{ {
struct btrfs_fs_info *fs_info = inode->root->fs_info; struct btrfs_fs_info *fs_info = inode->root->fs_info;
unsigned long range_bitmap = 0; unsigned long range_bitmap = 0;
...@@ -1500,7 +1500,7 @@ static noinline_for_stack int __extent_writepage_io(struct btrfs_inode *inode, ...@@ -1500,7 +1500,7 @@ static noinline_for_stack int __extent_writepage_io(struct btrfs_inode *inode,
* Return 0 if everything goes well. * Return 0 if everything goes well.
* Return <0 for error. * Return <0 for error.
*/ */
static int __extent_writepage(struct folio *folio, struct btrfs_bio_ctrl *bio_ctrl) static int extent_writepage(struct folio *folio, struct btrfs_bio_ctrl *bio_ctrl)
{ {
struct inode *inode = folio->mapping->host; struct inode *inode = folio->mapping->host;
const u64 page_start = folio_pos(folio); const u64 page_start = folio_pos(folio);
...@@ -1509,7 +1509,7 @@ static int __extent_writepage(struct folio *folio, struct btrfs_bio_ctrl *bio_ct ...@@ -1509,7 +1509,7 @@ static int __extent_writepage(struct folio *folio, struct btrfs_bio_ctrl *bio_ct
loff_t i_size = i_size_read(inode); loff_t i_size = i_size_read(inode);
unsigned long end_index = i_size >> PAGE_SHIFT; unsigned long end_index = i_size >> PAGE_SHIFT;
trace___extent_writepage(folio, inode, bio_ctrl->wbc); trace_extent_writepage(folio, inode, bio_ctrl->wbc);
WARN_ON(!folio_test_locked(folio)); WARN_ON(!folio_test_locked(folio));
...@@ -1534,8 +1534,8 @@ static int __extent_writepage(struct folio *folio, struct btrfs_bio_ctrl *bio_ct ...@@ -1534,8 +1534,8 @@ static int __extent_writepage(struct folio *folio, struct btrfs_bio_ctrl *bio_ct
if (ret) if (ret)
goto done; goto done;
ret = __extent_writepage_io(BTRFS_I(inode), folio, folio_pos(folio), ret = extent_writepage_io(BTRFS_I(inode), folio, folio_pos(folio),
PAGE_SIZE, bio_ctrl, i_size); PAGE_SIZE, bio_ctrl, i_size);
if (ret == 1) if (ret == 1)
return 0; return 0;
...@@ -2202,7 +2202,7 @@ static int extent_write_cache_pages(struct address_space *mapping, ...@@ -2202,7 +2202,7 @@ static int extent_write_cache_pages(struct address_space *mapping,
continue; continue;
} }
ret = __extent_writepage(folio, bio_ctrl); ret = extent_writepage(folio, bio_ctrl);
if (ret < 0) { if (ret < 0) {
done = 1; done = 1;
break; break;
...@@ -2293,8 +2293,8 @@ void extent_write_locked_range(struct inode *inode, const struct folio *locked_f ...@@ -2293,8 +2293,8 @@ void extent_write_locked_range(struct inode *inode, const struct folio *locked_f
if (pages_dirty && folio != locked_folio) if (pages_dirty && folio != locked_folio)
ASSERT(folio_test_dirty(folio)); ASSERT(folio_test_dirty(folio));
ret = __extent_writepage_io(BTRFS_I(inode), folio, cur, cur_len, ret = extent_writepage_io(BTRFS_I(inode), folio, cur, cur_len,
&bio_ctrl, i_size); &bio_ctrl, i_size);
if (ret == 1) if (ret == 1)
goto next_page; goto next_page;
......
...@@ -747,7 +747,7 @@ static noinline int cow_file_range_inline(struct btrfs_inode *inode, ...@@ -747,7 +747,7 @@ static noinline int cow_file_range_inline(struct btrfs_inode *inode,
/* /*
* In the successful case (ret == 0 here), cow_file_range will return 1. * In the successful case (ret == 0 here), cow_file_range will return 1.
* *
* Quite a bit further up the callstack in __extent_writepage, ret == 1 * Quite a bit further up the callstack in extent_writepage(), ret == 1
* is treated as a short circuited success and does not unlock the folio, * is treated as a short circuited success and does not unlock the folio,
* so we must do it here. * so we must do it here.
* *
......
...@@ -705,7 +705,7 @@ void btrfs_folio_assert_not_dirty(const struct btrfs_fs_info *fs_info, ...@@ -705,7 +705,7 @@ void btrfs_folio_assert_not_dirty(const struct btrfs_fs_info *fs_info,
* - Page locked by plain lock_page() * - Page locked by plain lock_page()
* It should not have any subpage::writers count. * It should not have any subpage::writers count.
* Can be unlocked by unlock_page(). * Can be unlocked by unlock_page().
* This is the most common locked page for __extent_writepage() called * This is the most common locked page for extent_writepage() called
* inside extent_write_cache_pages(). * inside extent_write_cache_pages().
* Rarer cases include the @locked_page from extent_write_locked_range(). * Rarer cases include the @locked_page from extent_write_locked_range().
* *
...@@ -829,7 +829,7 @@ bool btrfs_subpage_find_writer_locked(const struct btrfs_fs_info *fs_info, ...@@ -829,7 +829,7 @@ bool btrfs_subpage_find_writer_locked(const struct btrfs_fs_info *fs_info,
* Unlike btrfs_folio_end_writer_lock() which unlocks a specified subpage range, * Unlike btrfs_folio_end_writer_lock() which unlocks a specified subpage range,
* this ends all writer locked ranges of a page. * this ends all writer locked ranges of a page.
* *
* This is for the locked page of __extent_writepage(), as the locked page * This is for the locked page of extent_writepage(), as the locked page
* can contain several locked subpage ranges. * can contain several locked subpage ranges.
*/ */
void btrfs_folio_end_all_writers(const struct btrfs_fs_info *fs_info, struct folio *folio) void btrfs_folio_end_all_writers(const struct btrfs_fs_info *fs_info, struct folio *folio)
......
...@@ -721,7 +721,7 @@ DECLARE_EVENT_CLASS(btrfs__writepage, ...@@ -721,7 +721,7 @@ DECLARE_EVENT_CLASS(btrfs__writepage,
__entry->writeback_index) __entry->writeback_index)
); );
DEFINE_EVENT(btrfs__writepage, __extent_writepage, DEFINE_EVENT(btrfs__writepage, extent_writepage,
TP_PROTO(const struct folio *folio, const struct inode *inode, TP_PROTO(const struct folio *folio, const struct inode *inode,
const struct writeback_control *wbc), const struct writeback_control *wbc),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment