From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx2.suse.de ([195.135.220.15]:37826 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030549AbcDMJsX (ORCPT ); Wed, 13 Apr 2016 05:48:23 -0400 Date: Wed, 13 Apr 2016 11:48:21 +0200 From: Jan Kara To: Jens Axboe Cc: linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org, jack@suse.cz Subject: Re: [PATCH 1/3] writeback: propagate the various reasons for writeback Message-ID: <20160413094821.GG15098@quack2.suse.cz> References: <1460486633-26099-1-git-send-email-axboe@fb.com> <1460486633-26099-2-git-send-email-axboe@fb.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1460486633-26099-2-git-send-email-axboe@fb.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: 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... Honza -- Jan Kara SUSE Labs, CR