From mboxrd@z Thu Jan 1 00:00:00 1970 From: Artem Bityutskiy Subject: Re: [PATCHv4 17/17] writeback: lessen sync_supers wakeup count Date: Mon, 31 May 2010 17:07:00 +0300 Message-ID: <1275314820.2678.153.camel@localhost> References: <1274795352-3551-1-git-send-email-dedekind1@gmail.com> <1274795352-3551-18-git-send-email-dedekind1@gmail.com> <20100527065041.GA31073@ZenIV.linux.org.uk> Reply-To: dedekind1@gmail.com Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: LKML , Jens Axboe , linux-fsdevel@vger.kernel.org To: Al Viro Return-path: Received: from smtp.nokia.com ([192.100.122.230]:16797 "EHLO mgw-mx03.nokia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755342Ab0EaOJW (ORCPT ); Mon, 31 May 2010 10:09:22 -0400 In-Reply-To: <20100527065041.GA31073@ZenIV.linux.org.uk> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Thu, 2010-05-27 at 07:50 +0100, Al Viro wrote: > Note, e.g., that in your series you've touched udf; it can set s_dirt > until the cows come home, but without ->write_super() it'll be ignore= d > by everything in VFS and fs/udf itself never looks at the damn thing. >=20 > A look around it shows fs/sysv, where we never clean the damn flag an= ymore > for r/w mounts. Yes, really (got broken a year ago, nobody noticed). >=20 > Or, e.g., BFS - there we have ->write_super() mark the buffer_head th= at > contains on-disk sb dirty, and the only place that sets ->s_dirt is d= oing > that immediately after having marked the same bh dirty itself. Inter= esting > place, at that - bfs_fill_super() at r/w mount time... Note that ->s= ync_fs() > there does *not* wait for anything, which is not the right thing to d= o. >=20 > IOW, this thing is a good topic for code review; I suspect that quite= a few > users might be gone as the result. Al, you requested me to review s_dirt usage, well, I'm trying now. One thin= g I do not understand is s_dirt serialization, which seems to be just absent in some FSes. I checked affs and ext2. E.g., affs does: affs_alloc_block() { mark_buffer_dirty(bh); sb->s_dirt =3D 1; } vs affs_write_super() { affs_commit_super(); /* YYY: what if sb is marked as dirty right here? */ sb->s_dirt =3D 0; } vs /* This wakes up periodically */ sync_super() { if (sb->s_root && sb->s_dirt) sb->s_op->write_super(sb); } ext2 seems to be doing something similar. It seems to me that FSes should serialize s_dirt changes somehow, but they don't? Why this is no= t a problem? --=20 Best Regards, Artem Bityutskiy (=D0=90=D1=80=D1=82=D1=91=D0=BC =D0=91=D0=B8=D1=82=D1=8E= =D1=86=D0=BA=D0=B8=D0=B9) -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel= " in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html