lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 23 Apr 2009 08:31:27 -0400
From:	Christoph Hellwig <hch@...radead.org>
To:	Jan Kara <jack@...e.cz>
Cc:	LKML <linux-kernel@...r.kernel.org>, linux-fsdevel@...r.kernel.org,
	Andrew Morton <akpm@...ux-foundation.org>,
	Jens Axboe <jens.axboe@...cle.com>
Subject: Re: [PATCH] vfs: Merge sync_supers(), sync_filesystems() and
	sync_blockdevs()

On Wed, Apr 22, 2009 at 05:56:21PM +0200, Jan Kara wrote:
> These three functions are quite similar so merge them to save superblock list
> traversal code. As a bonus we get livelock avoidance for all these superblock
> traversals. Also remove the condition that if wait == 0 and sb->s_dirt is
> not set, then ->sync_fs() is not called. This does not really make much sence
> since s_dirt is generally used by filesystem to mean that ->write_super() needs
> to be called. But ->sync_fs() does different things. I even suspect that some
> filesystems (btrfs?) sets s_dirt just to fool this logic.

Some more comments after looking at it in more details:

 - the FSSYNC_SUPER case really needs to do a trylock on the mutex,
   otherwise any in-progress sync would block pdflush for a long time.
   And as any real sync should write out the superblock it's not needed
   anyway during that time.  (Need to double-check the filesystems,
   though)
 - sync_filesystems really should move to fs/sync.c
 - I get more and more inclined to make sync just case of looping over
   the superblocks and do an fsync_super.  A plain sync fsync_super
   might be too slow so we can try to do an async one first and then
   a sync one as a second pass
 - that wakeup_pdflush in do_sync looks extremly fishy, we need to do
   all page writeback via sync_inodes_(sb) anyway, and doing this in
   parallel from pdflush just introduced tons of potential race
   opportunities
 - now if sync_filesystems just ends up calling __fsync_super for
   the normal sync path I wonder if there really is a point unifying
   it with the periodic write_super case.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ