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]
Message-ID: <20120905155403.GL17430@twin.jikos.cz>
Date:	Wed, 5 Sep 2012 17:54:04 +0200
From:	David Sterba <dave@...os.cz>
To:	Miao Xie <miaox@...fujitsu.com>
Cc:	Linux Kernel <linux-kernel@...r.kernel.org>,
	Linux Btrfs <linux-btrfs@...r.kernel.org>,
	Linux Fsdevel <linux-fsdevel@...r.kernel.org>,
	Linux Ext4 <linux-ext4@...r.kernel.org>,
	viro <viro@...iv.linux.org.uk>,
	Christoph Hellwig <hch@...radead.org>,
	Kamal Mostafa <kamal@...onical.com>
Subject: Re: [PATCH 1/2 RESEND] vfs: re-implement
 writeback_inodes_sb(_nr)_if_idle() and rename them

On Wed, Aug 29, 2012 at 02:17:12PM +0800, Miao Xie wrote:
> writeback_inodes_sb(_nr)_if_idle() is re-implemented by replacing down_read()
> with down_read_trylock() because
> - If ->s_umount is write locked, then the sb is not idle. That is
>   writeback_inodes_sb(_nr)_if_idle() needn't wait for the lock.
> - writeback_inodes_sb(_nr)_if_idle() grabs s_umount lock when it want to start
>   writeback, it may bring us deadlock problem when doing umount.
>   (Ex. Btrfs has such a problem, see the following URL
>        http://marc.info/?l=linux-btrfs&m=133540923510561&w=2)
> 
> The name of these two functions is cumbersome, so rename them to
> try_to_writeback_inodes_sb(_nr).
> 
> This idea came from Christoph Hellwig.
> Some code is from the patch of Kamal Mostafa.
> 
> Signed-off-by: Miao Xie <miaox@...fujitsu.com>
Tested-by: David Sterba <dsterba@...e.cz>

> ---
> Many users who use btrfs met the deadlock problem caused by writeback_inodes_sb(_nr)_if_idle(),
> so I send this patch again and hope it will be received as soon as possible if nobody objects.

Yes please, this makes testing of the 'autodefrag' mount option hard as
the deadlock occurs frequently upon umount (when there's a background
snapshot cleanup in progress).

>From the user's POV, the autodefrag improves performance, it's not yet
on by default until it proves to be stable, the deadlocks were standing
in the way for long.

thanks,
david
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ