[Devel] [PATCH rh7 1/2] fs/writeback: prepare for per-CT writeback

Vladimir Davydov vdavydov at virtuozzo.com
Mon Jan 18 03:35:26 PST 2016


On Fri, Jan 15, 2016 at 06:17:24PM +0300, Andrey Ryabinin wrote:
> @@ -51,6 +51,7 @@ struct wb_writeback_work {
>  
>  	struct list_head list;		/* pending work list */
>  	struct completion *done;	/* set if the caller waits */
> +	struct user_beancounter *ub;

You add a new field to this struct, but never use it in this patch, only
in the patch that follows. Please fix/re-split.

>  };
>  
>  /*
> @@ -130,7 +131,8 @@ out_unlock:
>  
>  static void
>  __bdi_start_writeback(struct backing_dev_info *bdi, long nr_pages,
> -		      bool range_cyclic, enum wb_reason reason)
> +			bool range_cyclic, enum wb_reason reason,
> +			struct user_beancounter *ub)
>  {
>  	struct wb_writeback_work *work;
>  
> @@ -149,6 +151,8 @@ __bdi_start_writeback(struct backing_dev_info *bdi, long nr_pages,
>  	work->nr_pages	= nr_pages;
>  	work->range_cyclic = range_cyclic;
>  	work->reason	= reason;
> +	work->ub = ub;
> +	work->for_background = (reason == WB_REASON_BACKGROUND);

for_background works are ignored unless the system exceeded the global
dirty limit and there are no foreground works - see wb_writeback, so
this won't work.

>  
>  	bdi_queue_work(bdi, work);
>  }


More information about the Devel mailing list