Re: [PATCH 1/4] vfs: introduce try_to_writeback_inodes_sb(_nr)

2012-04-27 Thread Miao Xie
于 2012年04月26日 23:12, Josef Bacik 写道: On Thu, Apr 26, 2012 at 03:55:52PM +0800, Xie Miao wrote: On Thu, Apr 26, 2012 at 11:11 AM, Dave Chinner da...@fromorbit.com wrote: writeback_inodes_sb(_nr) grabs s_umount lock when it want to start writeback, it may bring us deadlock problem when doing

Re: [PATCH 1/4] vfs: introduce try_to_writeback_inodes_sb(_nr)

2012-04-26 Thread Xie Miao
On Thu, Apr 26, 2012 at 11:11 AM, Dave Chinner da...@fromorbit.com wrote: writeback_inodes_sb(_nr) grabs s_umount lock when it want to start writeback, it may bring us deadlock problem when doing umount. So we introduce new functions -- try_to_writeback_inodes_sb(_nr) -- which use

Re: [PATCH 1/4] vfs: introduce try_to_writeback_inodes_sb(_nr)

2012-04-26 Thread Josef Bacik
On Thu, Apr 26, 2012 at 03:55:52PM +0800, Xie Miao wrote: On Thu, Apr 26, 2012 at 11:11 AM, Dave Chinner da...@fromorbit.com wrote: writeback_inodes_sb(_nr) grabs s_umount lock when it want to start writeback, it may bring us deadlock problem when doing umount. So we introduce new

[PATCH 1/4] vfs: introduce try_to_writeback_inodes_sb(_nr)

2012-04-25 Thread Miao Xie
writeback_inodes_sb(_nr) grabs s_umount lock when it want to start writeback, it may bring us deadlock problem when doing umount. So we introduce new functions -- try_to_writeback_inodes_sb(_nr) -- which use down_read_trylock() instead of down_read() to avoid that deadlock problem. This idea came

Re: [PATCH 1/4] vfs: introduce try_to_writeback_inodes_sb(_nr)

2012-04-25 Thread Dave Chinner
On Thu, Apr 26, 2012 at 10:57:43AM +0800, Miao Xie wrote: writeback_inodes_sb(_nr) grabs s_umount lock when it want to start writeback, it may bring us deadlock problem when doing umount. So we introduce new functions -- try_to_writeback_inodes_sb(_nr) -- which use down_read_trylock() instead