On Thu, Jun 13, 2019 at 05:33:49PM -0700, Tejun Heo wrote:
> @@ -1251,12 +1258,29 @@ static int cow_file_range_async(struct inode *inode, 
> struct page *locked_page,
>                * to unlock it.
>                */
>               if (locked_page) {
> +                     /*
> +                      * Depending on the compressibility, the pages
> +                      * might or might not go through async.  We want
> +                      * all of them to be accounted against @wbc once.
> +                      * Let's do it here before the paths diverge.  wbc
> +                      * accounting is used only for foreign writeback
> +                      * detection and doesn't need full accuracy.  Just
> +                      * account the whole thing against the first page.
> +                      */
> +                     wbc_account_io(wbc, locked_page, cur_end - start);
>                       async_chunk[i].locked_page = locked_page;
>                       locked_page = NULL;
>               } else {
>                       async_chunk[i].locked_page = NULL;
>               }
>  
> +             if (blkcg_css != blkcg_root_css) {
> +                     css_get(blkcg_css);

fs/btrfs/inode.c: In function ‘cow_file_range_async’:
fs/btrfs/inode.c:1278:4: error: implicit declaration of function ‘css_get’; did 
you mean ‘css_put’? [-Werror=implicit-function-declaration]
 1278 |    css_get(blkcg_css);
      |    ^~~~~~~
      |    css_put

I don't have CONFIG_CGROUPS enabled in the testing kernel so this probably
needs a wrapper so the ifdef is not in the middle of the function.

Reply via email to