From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0b-00082601.pphosted.com ([67.231.153.30]:54826 "EHLO mx0b-00082601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932272AbcDNPnQ (ORCPT ); Thu, 14 Apr 2016 11:43:16 -0400 Subject: Re: [PATCH 1/3] writeback: propagate the various reasons for writeback To: Jan Kara References: <1460486633-26099-1-git-send-email-axboe@fb.com> <1460486633-26099-2-git-send-email-axboe@fb.com> <20160413094821.GG15098@quack2.suse.cz> CC: , From: Jens Axboe Message-ID: <570FBA89.1060802@fb.com> Date: Thu, 14 Apr 2016 09:43:05 -0600 MIME-Version: 1.0 In-Reply-To: <20160413094821.GG15098@quack2.suse.cz> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On 04/13/2016 03:48 AM, Jan Kara wrote: > On Tue 12-04-16 12:43:51, Jens Axboe wrote: >> Avoid losing context by propagating the various reason why we >> initiate writeback. If we are doing more important reclaim or >> synchronous writeback, the lower levels should know about it. >> >> No intended functional changes in this patch. > > So far 'reason' is only used for tracing and I'd strongly prefer to keep it > as such - otherwise the mix of flags like for_sync, for_backround, ... and > 'reason' gets really messy. If you need more information propagated via > wb_start_writeback() just add more flag arguments (currently there is only > range_cyclic flag). Since there would be already three flag arguments, > maybe it would warrant using a 'flags' argument which would be a standard > bitmask of desired flags... It'd be nicer if the tracing just ran off the functional parts, instead of having a separate argument just for tracing. It's both confusing and fragile to have two separate sets of information in there, and it's harder to keep in sync. But that's probably better left for another cleanup series. I'll flag this separately. -- Jens Axboe