From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kara Subject: Re: Lazytime feature bugs Date: Thu, 26 Feb 2015 15:38:28 +0100 Message-ID: <20150226143828.GA21485@quack.suse.cz> References: <20150218131931.GA10424@quack.suse.cz> <20150224183103.GA13024@quack.suse.cz> <20150225145258.GB11217@thunk.org> <20150225162506.GE22736@quack.suse.cz> <20150226043304.GC11217@thunk.org> <20150226083455.GA10894@quack.suse.cz> <20150226134553.GF11217@thunk.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Jan Kara , Linus Torvalds , linux-fsdevel , Alexander Viro To: Theodore Ts'o Return-path: Received: from cantor2.suse.de ([195.135.220.15]:48435 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752978AbbBZOib (ORCPT ); Thu, 26 Feb 2015 09:38:31 -0500 Content-Disposition: inline In-Reply-To: <20150226134553.GF11217@thunk.org> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Thu 26-02-15 08:45:53, Ted Tso wrote: > On Thu, Feb 26, 2015 at 09:34:55AM +0100, Jan Kara wrote: > > I don't think you can reset i_dirty_time_when to "now" in b) because in > > that case continually dirtied files won't ever have timestamps written (you > > are completely loosing track of when you last wrote timestamps to disk). > > In the case of continually dirtied files, in my proposal we would be > checking to see if i_dirty_time_when is older when we scan files in > b_io, which means that we would discover files with stale timestamps > on disk, and they would get written out. But you wrote you'll reset i_dirty_time_when to "now" when queueing into b_dirty_time. Thus frequently dirtied inodes will just travel back and forth between b_dirty and b_dirty_time lists and i_dirty_time will be continuously reset. And you never end up writing it. That's why I suggested to reset i_dirted_when instead (since it would be unused in b_dirty_time list anyway). > This was the same as (4) in your propsal: > > > > 4) When processing inodes on b_io list we also check whether > > i_dirty_time_when is older than 12 hours. If so, we writeout inode. > > But your mechanism would work as well; I preferred to keep > i_dirty_when to only mean when the pages were dirtied, but the > important thing is that we have to track when the timestamps were > dirtied and when the pages were dirtied as separate things. Honza -- Jan Kara SUSE Labs, CR